Compare commits

...

762 Commits

Author SHA1 Message Date
Safihre
cc831e16d8 Set version to 3.4.2 2021-10-15 08:28:14 +02:00
Safihre
b8dc46ad01 Merge branch '3.4.x' 2021-10-15 08:24:21 +02:00
Safihre
d8ab19087d Update text files for 3.4.2 2021-10-15 08:19:00 +02:00
Safihre
ec8a79eedd Revert to using regex based sample detection
Closes #1964
2021-10-13 18:24:48 +02:00
Safihre
f1e2a8e9d8 Prevent double guessit parsing 2021-10-12 09:02:03 +02:00
Safihre
4042a5fe5d Update text files for 3.4.2RC3 2021-10-08 10:41:27 +02:00
Safihre
a4752751ed Fix tavern for Python 3.6 and run tests on Python 3.10 (Linux-only) 2021-10-08 10:34:14 +02:00
Safihre
e23ecf46d1 Correct behavior of Sorter when no filename and/or extension is supplied
Closes #1962, #1957
2021-10-08 10:24:44 +02:00
Safihre
70a8c597a6 Only fail jobs if the sorter should have renamed 2021-10-08 09:58:17 +02:00
Safihre
fa639bdb53 Use general detection of RAR-files in file-extension correction
Correct file_extension test
2021-10-08 09:58:17 +02:00
Safihre
233bdd5b1d Update text files for 3.4.2RC2 2021-10-06 15:00:44 +02:00
Safihre
a0ab6d35c7 Require at least 1 category to be set for Sorting and warn if not set
Before 3.4.0, only for TV sorting we allowed to set 0 categories. But for Movies and Date Sorting we did require at least 1 category to be set. This was harmonized in 3.4.0, breaking existing setups. Added warning for those users.
The Sorting behavior is different from Notifications: in Notifications selecting Default only(!) means to apply it to all categories.
However, that has never been the case for Sorting. So for now added a bit more help texts to the Affected categories box on both pages.
2021-10-06 14:50:00 +02:00
Sander
bd29680ce7 make .cbz a well-known extension, so that no extension is added (#1960) 2021-10-06 14:49:54 +02:00
Sander
7139e92554 make .cbr a well-known extension, so that no extension (".rar") is added (#1959) 2021-10-05 12:19:55 +02:00
Safihre
897df53466 Check for puremagic and guessit first and add comments about cherrypy 2021-10-04 08:57:58 +02:00
Safihre
58281711f6 Always show number of MB missing
https://forums.sabnzbd.org/viewtopic.php?f=2&t=25573
2021-10-04 08:57:51 +02:00
Safihre
b524383aa3 Job failure due to Sorting-problems was not shown in the interface 2021-10-01 15:35:09 +02:00
Safihre
75a16e3588 Update text files for 3.4.2RC1 2021-09-30 09:04:12 +02:00
Safihre
1453032ad6 rXX files are popular extensions and don't need renames
Closes #1955
2021-09-29 13:53:47 +02:00
Safihre
824ab4afad Do not search whole file when checking if txt or nzb file 2021-09-29 13:53:37 +02:00
Safihre
73dd41c67f Only run process_unpacked_par2 when cleanup happened
Relates to https://forums.sabnzbd.org/viewtopic.php?f=1&t=25552
2021-09-29 13:53:32 +02:00
Safihre
59ee77355d Make add_parfile return if it could actually add the file
Maybe it was long finished, which could result in crashes.
Closes #1953
2021-09-29 13:53:20 +02:00
Safihre
5c758773ad Do not rename in decode_par2 if the filename didn't change
Closes #1952
2021-09-29 13:53:14 +02:00
Safihre
46de49df06 Set version to 3.4.1 2021-09-23 09:21:11 +02:00
Safihre
d1c54a9a74 Merge branch 'develop' 2021-09-23 08:50:17 +02:00
Safihre
447a7b684c Update text files for 3.4.1 2021-09-23 08:50:04 +02:00
Safihre
82379481dd Revert "Un-pin version of PyInstaller"
This reverts commit a95714710b.
2021-09-23 08:44:44 +02:00
puzzledsab
06f9e28170 Don't show undefined if metric is bytes in speedometer slider (#1951) 2021-09-22 13:52:57 +02:00
Safihre
e7527c45cd Set version to 3.4.0 2021-09-17 22:01:19 +02:00
Safihre
7d5207aa67 Merge branch 'develop' 2021-09-17 20:46:31 +02:00
Safihre
d89b6f814b Update text files for 3.4.0 2021-09-17 20:41:13 +02:00
SABnzbd Automation
fad69356c1 Update translatable texts 2021-09-17 18:38:28 +00:00
Safihre
2285c6e430 Small refactor of the new content-disposition parsing 2021-09-17 20:36:34 +02:00
p0ps
c1b9b727e6 Correctly parse the filename in content-disposition header. (#1946)
* Implement regex to match the filename in the content-disposition header.

The following srings will match:
filename=Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb; filename*=UTF-8''Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb
filename=Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb;
filename*=UTF-8''Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb

* Missed quote

* Implement the mailbox/Message solution
* Add basic tests

* Add `attachment;`

* Add example with attachment.

* Fix some linting.
* Added edge case tests.

* Added comment.

* Added test to include path elements.

* Only try the content-disposition header when it has `filename` in it

* Project uses double quotes.

* Update test.
* Add `attachment;`

* black formatter

* remove release names.

* trailing commas

* quote enclosures
2021-09-11 22:56:17 +02:00
Safihre
a95714710b Un-pin version of PyInstaller 2021-09-08 09:12:18 +02:00
Safihre
82268b58e2 Update Python build version to 3.9.7 2021-09-01 23:45:30 +02:00
Safihre
0dd7e71fd1 Update text files for 3.4.0 RC 1 2021-09-01 23:35:26 +02:00
Safihre
63f1d2905f Correct reference to Sorter vs BaseSorter
Closes #1941
2021-08-14 09:35:50 +02:00
SABnzbd Automation
ea9b409a04 Update translatable texts 2021-08-13 10:11:22 +00:00
Safihre
8957a8421d Update text files for 3.4.0 Beta 2 2021-08-13 12:10:42 +02:00
SABnzbd Automation
7c171081c6 Update translatable texts 2021-08-13 07:50:29 +00:00
Safihre
e4520e9e16 Prevent crashing Assembler from missing saved_articles
Closes #1933
2021-08-13 09:49:41 +02:00
SABnzbd Automation
336c373dd0 Update translatable texts 2021-08-02 13:05:22 +00:00
Safihre
fc721f31c5 Only run recover_par2_names if all_ok 2021-08-02 15:04:31 +02:00
Safihre
062ed9f7b8 decode_par2 should return a list
Yeah Typing
2021-08-01 17:10:18 +02:00
SABnzbd Automation
59a915cdac Update translatable texts 2021-08-01 14:43:07 +00:00
Safihre
191f7d2152 Warning instead of Info when we restart due to crashed threads
Closes #1936
2021-08-01 16:42:09 +02:00
puzzledsab
a76e9c2c1f Always deobfuscate names from par2 (#1935)
* Always deobfuscate names from par2

* Different par2 test

* Different par2 test take 2

* Make par2 filename decoding optional and add some typing

* Rename variable
2021-07-30 16:01:30 +02:00
SABnzbd Automation
9d616459b7 Update translatable texts 2021-07-28 12:32:51 +00:00
Safihre
82fa42d182 Correct sorting test 2021-07-28 14:26:08 +02:00
Safihre
0c36aaa5ff nzo.correct_password was not always defined
Closes #1932
2021-07-25 17:35:44 +02:00
Safihre
a9761464a0 Only run Direct Unpack if enable_unrar=1 2021-07-25 10:28:55 +02:00
Safihre
355d02faa3 Sorting would always update final path even if disabled 2021-07-25 09:58:13 +02:00
jcfp
1052f37d02 create a record for the successful password (#1919)
* create a record for the successful password

* make get_all_passwords not return all, expand nzo.correct_password to directunpacker
2021-07-23 14:35:00 +02:00
Safihre
92b023599b Correct the build process to include guessit 2021-07-12 11:56:00 +02:00
jcfp
0c0dc946d8 avoid logging empty bytes object in directunpacker (#1924) 2021-07-11 20:32:07 +02:00
Safihre
9301edaee8 Make "Multi-operations" persistent after a page reload 2021-07-08 21:14:00 +03:00
Safihre
cf3136781d Make "Show All / Show Failed" persistent after a page reload 2021-07-08 09:30:15 +03:00
Safihre
d17368a9d2 Update text files for 3.4.0 Beta 1 2021-07-05 17:48:10 +03:00
Safihre
acfdef0c19 Update references to 3.4.0 2021-07-05 17:48:10 +03:00
Sander
1f4c7239d7 Continue after par2 renaming (#1921)
* record new files generated based on par2

* record new files generated based on par2

* test first par2 based renaming, then deobfuscate obfuscated names

* remove commented-out line

* corrected contents zip-file

* try again, github

* try again, github
2021-07-05 16:54:50 +03:00
Safihre
2aa0dbd93d Transfer /status/ functions to API-functions
TODO: Update documentation and maybe some tests
2021-07-04 18:03:58 +03:00
Safihre
a9135280ba Duplicate detection would always trigger based on backup dir 2021-07-03 10:41:28 +03:00
Safihre
0352ed79fa Update UnRar to 6.0.2 and MultiPar to 1.3.1.8
Closes #1915
2021-07-03 10:07:23 +03:00
jcfp
87454c9b10 enforce local ranges for broadcasts (#1920) 2021-07-02 12:00:15 +03:00
SABnzbd Automation
1afec3aa95 Update translatable texts 2021-07-01 07:59:55 +00:00
Safihre
a7a3334c9a Duplicate check based on md5 was performed before md5 was calculated
The side effect of this change is also that if you have an nzb-backup dir with the file already present that this second will be found duplicate, even before the first job has finished in the queue. Relates to #727
2021-07-01 10:46:51 +03:00
SABnzbd Automation
dc1f9bb252 Update translatable texts 2021-06-30 14:09:30 +00:00
jcfp
b2cbb8c8d0 Use guessit for sorting and sample detection (#1916)
* Use guessit for sorting and sample detection

* Fix bad logic in is_sample

* address comments, pt. 1

* address comments pt. 2

* address comments, pt. 3

* don't reference title before assignment

* whoops... overlooked the lowercasing

* add another title safeguard

* prevent uninitialized use of variable

* fix for jobs that should not be sorted

* don't list excluded guessit props in the interface

* insert linebreak between guessit props under pattern key

* use constant for excluded props

* dump COUNTRY_REP

* block rebulk log spam

* remove redundant season default; don't set for episodes

* make substitution regex a raw str
2021-06-30 17:08:54 +03:00
SABnzbd Automation
399de15792 Update translatable texts 2021-06-29 05:39:21 +00:00
Safihre
9ef30625a6 Add additional explanation to Deobfuscate final filenames 2021-06-29 08:38:13 +03:00
Sander
9b870e64d2 Use puremagic to deobfuscate file extensions (#1914)
* correct_extension: basics, including unittest

* correct_extension: basics, including unittest

* correct_extension: puremagic into requirements.txt

* correct_extension: introduce a main for testing from CLI

* correct_extension: parse all parameters on CLI as files

* correct_extension: parse all parameters on CLI as files

* correct_extension: CLI parameter "-p" for privacy output

* correct_extension: has_common_extension() and most_likely_extension()

* correct_extension: has_common_extension() and most_likely_extension()

* correct_extension: add extension if file has no commonly used extension

* correct_extension: Black happy ... hopefully

* correct_extension: Black happy ... hopefully

* correct_extension: process feedback, mainly the extenions lists ^H^H^H^ tuples

* correct_extension: process feedback, mainly the extenions lists ^H^H^H^ tuples

* correct_extension: process feedback, mainly the extenions lists ^H^H^H^ tuples

* correct_extension: process feedback, mainly the extenions lists ^H^H^H^ tuples

* correct_extension: cleaned up

* correct_extension: cleaned up ... github-black now happy?

* correct_extension: cleaned up ... github-black now happy?

* correct_extension: cleaned up ... github-black now happy?

* correct_extension: cleaned up ... github-black now happy?

* correct_extension: cleaned up ... github-black now happy?

* correct_extension: easier if-then-logic, check if new_extension_to_add is filled.

* correct_extension: if puremagic does recoging txt or nzb, check ourselves

* correct_extension: if puremagic does recoging txt or nzb, check ourselves

* correct_extension: only files!

* correct_extension: only files!

* correct_extension: rNN files not common extension, plus easier testing

* correct_extension: clean-up ... no more boolean extension_too

* correct_extension: requirements.txt, solved a TODO, and use get_ext()

* correct_extension: a comment added

* correct_extension: correct typing, correct txt and nzb extension

* correct_extension: extensions always with dots, bug fix in what_is_most_likely_extension()

* correct_extension: back on track?

* correct_extension: back on track?

* correct_extension: better comments
2021-06-29 08:27:08 +03:00
puzzledsab
c90a93661b Changes to determining can_be_slowed (#1891)
* Changes to determining can_be_slowed

* Add return type for get_stable_speed and make can_be_slowed local
2021-06-20 22:58:54 +02:00
Safihre
654302e691 Set version to 3.3.1 2021-06-18 13:52:58 +02:00
Safihre
ee673b57fd Merge branch '3.3.x' 2021-06-18 13:51:48 +02:00
Safihre
2be374b841 Update text files for 3.3.1 2021-06-18 13:51:33 +02:00
SABnzbd Automation
d8349764ed Update translatable texts 2021-06-15 09:32:33 +00:00
Safihre
232740fc2e Set version to develop 2021-06-15 11:31:53 +02:00
Safihre
88b5810d8e Open Status Info - Connections when clicking on the speed graph 2021-06-14 11:00:54 +02:00
puzzledsab
906e1eda89 Keep password order 2021-06-13 16:21:41 +02:00
Safihre
3fa528224f Automatically publish release when all files are present 2021-06-11 17:48:44 +02:00
Safihre
ece02cc4fa Automatically publish release when all files are present 2021-06-11 17:39:30 +02:00
Safihre
876ad60ddf Update text files for 3.3.1RC1 2021-06-11 14:59:25 +02:00
Safihre
862da354ac Add direct opening of tabs by URL to Glitter tab-layout 2021-06-11 14:28:31 +02:00
SABnzbd Automation
edc1f734b7 Update translatable texts 2021-06-10 14:46:41 +00:00
Safihre
49f4ced8e0 Remove redundant file_has_articles check
Unknown encodings are caught in the decoder already
2021-06-10 16:45:52 +02:00
Safihre
7bc0a6d140 Some Config functions were broken due to interface refactor 2021-06-08 11:45:31 +02:00
Safihre
968a347664 Remove unused Glitter code 2021-06-07 16:49:19 +02:00
Safihre
1740b16a0f Add direct opening of tabs by URL to Glitter tab-layout 2021-06-07 16:31:06 +02:00
Safihre
be5a71ce47 Add more typing to nzbstuff functions 2021-06-06 10:22:09 +02:00
Safihre
2d195e9584 Update NzbQueue functions after all the refactors 2021-06-05 22:45:45 +02:00
Safihre
8fd477b979 Include wiki URL in Internal internet access denied message 2021-06-05 15:56:20 +02:00
Safihre
2d7005655c Clean timeline_total of BPSMeter
Received multiple reports that somehow it could get corrupt values in there
2021-06-05 15:56:16 +02:00
Safihre
7322f8348a Filtering active post-proc queue by category was broken 2021-06-05 15:56:09 +02:00
Safihre
e3e3a12e73 Correct example in test_name_extractor 2021-06-05 15:56:04 +02:00
Safihre
b975489ddd Queue repair pop-over would not be cleared 2021-06-05 15:55:27 +02:00
Safihre
5cefa5f2c4 Include wiki URL in Internal internet access denied message 2021-06-05 15:50:11 +02:00
Safihre
4da9e64737 Clean timeline_total of BPSMeter
Received multiple reports that somehow it could get corrupt values in there
2021-06-05 15:38:08 +02:00
Safihre
37f2b1abe2 Import constants by name 2021-06-04 13:00:13 +02:00
Safihre
6d729d27cd Filtering active post-proc queue by category was broken 2021-06-03 11:50:48 +02:00
Safihre
ec40cbc2ed Correct example in test_name_extractor 2021-06-01 12:02:52 +02:00
Safihre
0575f1710d Build release when creating the tag 2021-06-01 11:20:07 +02:00
Safihre
77cdd057a4 Filenames should end after the extension 2021-06-01 11:19:49 +02:00
Safihre
15823e6fe8 Filenames should end after the extension 2021-06-01 11:18:08 +02:00
Safihre
e8206fbdd9 Set version to 3.3.0 2021-06-01 07:35:13 +02:00
Jiri van Bergen
589f15a77b Merge branch '3.3.x' 2021-06-01 07:34:59 +02:00
jcfp
7dbde008af Regex for unwanted extensions (#1907)
* allow regexp for unwanted extensions

* housekeeping

* use rss.convert_filter

* improve function name

* move convert_filter to misc
2021-06-01 07:28:19 +02:00
Safihre
7bb443678a Build release when creating the tag 2021-06-01 07:18:41 +02:00
Safihre
6390415101 Update text files for 3.3.0 2021-06-01 07:16:42 +02:00
Sander
4abf192e11 deobfuscate: bugfix for collections if extension in CAPITALS (#1904) 2021-06-01 07:06:21 +02:00
Safihre
d8ebd647a2 Refactor passing of API-output type 2021-05-30 13:54:44 +02:00
Safihre
ece0d7fabe Clear test-queue before running move_nzf_bulk test 2021-05-29 21:21:51 +02:00
SABnzbd Automation
679a712e16 Update translatable texts 2021-05-29 07:24:07 +00:00
Safihre
18ad9e22f5 Could not dismiss warnings
Closes #1905
2021-05-29 09:21:54 +02:00
Safihre
152029c85b Remove Plush-related code 2021-05-29 09:21:54 +02:00
Sander
e91de667e0 deobfuscate: bugfix for collections if extension in CAPITALS (#1904) 2021-05-26 22:25:40 +02:00
SABnzbd Automation
7f21b8263b Update translatable texts 2021-05-25 08:06:34 +00:00
Safihre
f65acc9f95 Remove Plush
Closes #1902
2021-05-25 10:05:21 +02:00
Safihre
1fed37f9da Notify users that Plush will be removed in 3.4.0
Relates to #1902
2021-05-25 09:28:10 +02:00
Safihre
6a61bacd60 Additional cleanup of interface.py functions (2) 2021-05-24 09:31:13 +02:00
SABnzbd Automation
fb9489f470 Update translatable texts 2021-05-23 07:54:03 +00:00
Safihre
87da19caa3 Additional cleanup of interface.py functions 2021-05-23 09:53:12 +02:00
Safihre
378f6fe485 Cleanup of interface.py functions
Glitter uses a lot of legacy functions. They should be moved to actual API-calls so we can drop even more functions from interface.py.
2021-05-22 19:20:55 +02:00
puzzledsab
65a8886e61 Keep password order 2021-05-22 10:51:50 +02:00
Safihre
8fdb259270 Update text files for 3.3.0RC2
draft release
2021-05-20 08:04:06 +02:00
Safihre
98b0b46dda Only use active servers in stop_idle_jobs 2021-05-17 23:04:22 +02:00
Safihre
861fb9e3d5 Always update the number of servers
init_server(None, newid) would not trigger a recount
2021-05-17 23:04:22 +02:00
Safihre
644bcee14e Remove max_art_opt
Moved to Specials in 2.2.x and never heard anyone complain about it. So time to get rid of it.
2021-05-17 23:04:22 +02:00
Safihre
933d9e92d1 Re-work the Server's reset article queue 2021-05-17 23:04:22 +02:00
jcfp
9fb03a25f6 allow missing extension for unwanted check (#1896) 2021-05-16 21:02:06 +02:00
Safihre
0b1f7827fc Add additional unrar output when checking passworded files 2021-05-14 22:09:11 +02:00
Safihre
49f21e2c9d macOS Python set to 3.9.5 2021-05-14 22:02:13 +02:00
Safihre
990c0e07cf platform.platform() is not available on all platforms
Closes #1893
2021-05-14 09:08:53 +02:00
Safihre
745459e69f Update text files for 3.3.0RC1
draft release
2021-05-13 15:14:35 +02:00
Safihre
115a6cf5d7 Windows: Update Multipar to 1.3.1.7 2021-05-10 10:44:59 +02:00
Safihre
39aafbbc61 Windows/macOS: Update UnRar to 6.0.1 2021-05-10 10:44:47 +02:00
puzzledsab
93ddc9ce99 Add article queue and change article tries system (#1870)
* Add article queue and change article tries system

* Don't reuse queued articles with get_articles

* Add article_queue to server slots

* Generalize get_articles

* Set fetch_limit to be at least 1

* A little tweaking

* More micro optimization

* Small tweaks

* Remove misplaced reset_article_queue()

* Call reset_article_queue() from plan_server

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-05-07 22:18:50 +02:00
Safihre
3d877eed13 Call BPSmeter.init_server_stats for all servers at end of day 2021-05-07 16:51:47 +02:00
Safihre
308d612c05 Re-init server statistics when clearing 2021-05-07 15:45:17 +02:00
Safihre
9b75f0428d Only call single BPSMeter.update at midnight 2021-05-07 15:41:40 +02:00
Safihre
e6858659fb Prevent ZeroDivisionError's in BPSMeter 2021-05-07 14:06:27 +02:00
Safihre
815058ffcd Fix and extend on BPSMeter optimalizations 2021-05-07 13:40:08 +02:00
puzzledsab
915b540576 BPSMeter optimalizations (#1889)
* Remove stats initalization

* Use update(), remove sum_cached_amount

* Refactor can_be_slowed ifs

* Revert "Refactor can_be_slowed ifs"

This reverts commit 4c9e3e6645.
2021-05-07 13:02:01 +02:00
Safihre
5b06d6925c Sort Downloader.servers by priorty 2021-05-07 09:07:14 +02:00
Safihre
ef875fa720 Remove unused Downloader.server_dict 2021-05-07 08:46:13 +02:00
Safihre
994a7d044f Config restart-check faster because shutdown is now much faster 2021-05-07 08:32:45 +02:00
Safihre
80cd7f39b4 Show server in download-rapport even if it was disabled later on 2021-05-07 07:15:37 +02:00
Safihre
93bf45cde6 Simplify build_status by removing server connection details for Plush 2021-05-06 22:44:19 +02:00
Safihre
b4adc064a0 Remove subject nzf.subject property as it is unused
Since 3.0.0 we always fill the nzf.filename
2021-05-06 22:33:20 +02:00
Safihre
7e81d0bcbb Update text files for 3.3.0Beta4
draft release
2021-05-06 10:36:47 +02:00
SABnzbd Automation
33b59f091e Update translatable texts 2021-05-06 08:26:04 +00:00
Safihre
ea3dc1f2f4 Add validation of translations 2021-05-06 10:00:10 +02:00
SABnzbd Automation
5d3e68a6a5 Update translatable texts 2021-05-06 07:31:48 +00:00
Safihre
64f2ec3ffe Setting RSS rate would result in crash
Closes #1890
2021-05-06 09:30:55 +02:00
Safihre
c80014ec7d Use __slots__ on Downloader thread object 2021-05-03 22:57:00 +02:00
Safihre
6515720d55 Use __slots__ on Server object (#1887) 2021-05-03 16:34:12 +02:00
puzzledsab
605c5cbfd8 Check busy threads less often if nothing is wrong (#1884)
* Check busy threads less often if nothing is wrong

* Simplify variable usage

* Use local constant for server check delaying
2021-05-03 15:51:16 +02:00
puzzledsab
77e97d1a89 Check header before entering parse_par2_packet (#1885)
* Check header before entering parse_par2_packet

* Stop using offset variable
2021-05-03 13:35:11 +02:00
Safihre
f17d959770 Remove unused code to support Windows Vista 2021-05-02 13:06:45 +02:00
Safihre
22f1d2f642 Stop scanning the par2 file once we have the information of all files 2021-05-02 10:16:17 +02:00
jcfp
7d3907fa0e also test with (partially) exploded ipv4-mapped addresses (#1880) 2021-05-01 19:45:53 +02:00
Safihre
9588fe8d94 Simplify startup logging 2021-05-01 18:38:24 +02:00
Sander
3b3ffdb8d1 Show cpu architecture (#1879)
* show CPU architecture in logging.info

* show CPU architecture in logging.info ... make black happy

* show CPU architecture in logging.info ... comment

* show CPU architecture in logging.info ... comment

* show CPU architecture in logging.info ... comment

* show CPU architecture in logging.info ... oneliner
2021-05-01 17:16:09 +02:00
Safihre
cdd7e6931a Post-processing would crash if there is no files to unpack 2021-05-01 16:50:15 +02:00
puzzledsab
4c3df012a6 Don't slice data and stop reading par2 files when duplicate filename is found (#1878)
* Don't slice data

* Stop reading par2 files when duplicate filename is found
2021-05-01 16:10:40 +02:00
Safihre
b0eaf93331 Extend unit test for par2file to check logging of par2 creator 2021-05-01 12:24:11 +02:00
Safihre
55c03279ca Optimize par2 file parsing 2021-05-01 12:06:00 +02:00
Safihre
c4f0753f5a Add basic unit tests for par2file 2021-05-01 12:03:31 +02:00
puzzledsab
a9bd25873e Store status_code as attribute (#1877)
* Store status_code as attribute

* Do reading of code in try
2021-05-01 07:26:44 +02:00
jcfp
5ab6de8123 cut closer to the middle to avoid random test failures (#1874) 2021-04-30 10:45:51 +02:00
jcfp
75deb9d678 add --disable-file-log to systemd service (#1873) 2021-04-30 09:26:55 +02:00
Safihre
b5ce0e0766 Allow setting inet_exposure from command line
Closes #1872
2021-04-30 09:23:30 +02:00
Safihre
43817aef20 Update text files for 3.3.0Beta3
draft release
2021-04-29 11:01:12 +02:00
jcfp
81a7a58299 support prefix and netmask for local_ranges (#1871)
* support prefix and netmask for local_ranges

* housekeeping
2021-04-29 08:35:46 +02:00
puzzledsab
4ae1c21b6f Minor optimizations (#1869) 2021-04-28 12:15:10 +02:00
Safihre
8ffa3e5d4c Add unit tests for sanitize_files 2021-04-27 22:51:43 +02:00
Safihre
ac6ebe1f99 Only reset the NZF try_list when adding par2 files
We can rely on the article try list, or at least we should be able to..
2021-04-27 17:56:13 +02:00
Safihre
a5c07e7873 Reset fetcher and fetcher_priority when resetting article try_list
Closes #1863
2021-04-27 16:48:34 +02:00
SABnzbd Automation
94c4f6008d Update translatable texts 2021-04-27 10:16:05 +00:00
Safihre
615c296023 sanitize_files_in_folder would ignore the newfiles
Would result in deobfuscate not working.
This needs unittests!
Closes #1868
2021-04-27 12:09:46 +02:00
SABnzbd Automation
d227611ee8 Update translatable texts 2021-04-26 21:34:41 +00:00
Safihre
acf00c723f Remove all xmlns from NZB-file data
https://forums.sabnzbd.org/viewtopic.php?f=2&t=25342
2021-04-26 23:33:47 +02:00
Safihre
adb3913daa Only remove the failed server in NzbQueue.reset_try_lists
Closes #1866
2021-04-26 11:48:48 +02:00
Safihre
faf1a44944 Black formatting update 2021-04-26 10:52:11 +02:00
Safihre
9f5cb9ffff Read All Feeds was broken
Closes #1865
2021-04-26 10:14:20 +02:00
SABnzbd Automation
068c653a2a Update translatable texts 2021-04-25 09:03:10 +00:00
Safihre
b1c922bb75 Post-proc queue was not filtered by nzo_ids 2021-04-25 11:02:04 +02:00
Safihre
4879fbc6d4 CRC/yenc errors would be counted twice as bad articles 2021-04-24 21:53:23 +02:00
Safihre
e7dc81eb38 Update text files for 3.3.0Beta2
draft release
2021-04-23 17:24:50 +02:00
Safihre
c2fa08598e Update text files for 3.3.0Beta1
draft release
2021-04-23 12:09:17 +02:00
Safihre
d23ca4a38e Add tests for dual-stack notation in check_access 2021-04-23 11:44:54 +02:00
Safihre
078b608582 Set Python for macOS release to 3.9.4 2021-04-23 11:17:29 +02:00
Safihre
a64457973f Apply NzbQueueLocker to end_job to prevent multiple post-processing
Closes #1862, #1862
2021-04-22 22:46:15 +02:00
SABnzbd Automation
00ef13fe9f Update translatable texts 2021-04-22 19:36:51 +00:00
Safihre
b4a7f2fdf6 Get rind of dual-stack notation when checking local_ranges 2021-04-22 21:36:13 +02:00
Safihre
a482bb7acc Add unittests for secured_expose 2021-04-22 21:36:13 +02:00
Safihre
ce46eeac49 Change permissions-level for Config-related API-calls 2021-04-22 21:36:13 +02:00
Safihre
110dbf6cca Correct invalid checking of API sub-call permissions
Some calls that should have been "full API" only were available with "basic API".
2021-04-22 21:36:13 +02:00
Safihre
c93de2dd6f Correct set_config fixture in unittests 2021-04-22 21:36:13 +02:00
Safihre
be88f5152f Default to block non-LAN traffic for empty Local network ranges 2021-04-22 21:36:13 +02:00
puzzledsab
efda5bab4d Make num_decoders configurable through special variables (#1860) 2021-04-19 14:02:28 +02:00
jcfp
d491eb1af0 fix use of dir (#1855) 2021-04-16 16:25:20 +02:00
jcfp
e249dbfc67 try sys.executable, but keep "python" as fallback (#1856) 2021-04-16 16:25:00 +02:00
Safihre
c994ae5798 Log all requests, not just API calls
Closes #1857
2021-04-16 13:30:56 +02:00
Safihre
cba61bd8fb Highlight even more the warning about exposed hosts 2021-04-15 10:04:33 +02:00
Sander
a72440ee6b make results from Status -> Performace copy-pasteable (#1849) 2021-04-11 14:58:05 +02:00
Safihre
cd3ed40ff3 Just always show the history statistic 2021-04-05 13:58:09 +02:00
Safihre
cf3ce5e31d Show history statistics even if history is empty
Closes #1843
2021-04-05 10:47:02 +02:00
Sander
bdcbc5e011 Internetspeed improve code style (#1848)
* interspeed: better styling

* interspeed: better styling

* interspeed: better styling

* interspeed: better styling ... logging style

* interspeed: tackle Windows' time granularity

* internetspeed: more feedback on naming
2021-04-04 21:01:02 +02:00
SABnzbd Automation
c2d3ce348f Update translatable texts 2021-04-04 13:49:24 +00:00
Safihre
970d580e4b Ignore duplicate files inside messy NZB's 2021-04-04 15:48:21 +02:00
Safihre
d2f9721576 Changed leftover str.encode to general utob function 2021-04-01 07:38:03 +02:00
Safihre
8a39e5827b Foldernames should always be stripped from dots and spaces at the end 2021-04-01 07:28:08 +02:00
Safihre
a9d86a7447 Set version to 3.2.1 2021-03-31 10:24:42 +02:00
Safihre
2abe4c3cef Merge branch '3.2.x' 2021-03-31 09:25:49 +02:00
Safihre
0542c25003 Update text files for 3.2.1
draft release
2021-03-31 09:24:31 +02:00
puzzledsab
1b8ee4e290 Show server expiration date in server summary (#1841) 2021-03-31 08:57:38 +02:00
Safihre
51128cba55 Do not notify warning/errors from same source twice
Closes #1842
2021-03-30 17:30:07 +02:00
Safihre
89c8b6a0a5 Do not notify warning/errors from same source twice
Closes #1842
2021-03-30 17:29:39 +02:00
Safihre
238f0a6108 Do not discard data for CrcError's
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25278
2021-03-30 16:05:34 +02:00
Safihre
3612432581 Do not discard data for CrcError's
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25278
2021-03-30 16:05:04 +02:00
puzzledsab
19950569cb Show server expiration date in server summary (#1841) 2021-03-29 20:26:20 +02:00
Safihre
deca000a1b Revert some improvements to the encrypted RAR-detection
Closes #1840
2021-03-29 14:05:52 +02:00
Safihre
a19553dddd Revert some improvements to the encrypted RAR-detection
Closes #1840
2021-03-29 14:05:39 +02:00
SABnzbd Automation
c383a5b120 Update translatable texts 2021-03-29 05:24:15 +00:00
Safihre
dab7243ccd Show Article availability number of articles in a nicer format 2021-03-29 07:23:37 +02:00
Sander
ccf15ab4a3 Diskspace macOS large drives (#1838)
* disk_free_macos_clib_statfs64() to report correct available disk space on MacOS

* disk_free_macos_clib_statfs64() ... correct call

* feedback processed into better code, and improved comments

* MACOSLIBC into __init__. And some comments about gnu libc

* import ctypes.util

* log ctypes.get_errno() in case of problems

* more cleanup and clarifications based on feedback

* mention python bug report in comment

* ... to trigger the CI again

* ... typo
2021-03-27 20:48:23 +01:00
Safihre
25a3ef2b3e Another try to fix the Snapcraft builds 2021-03-27 18:53:10 +01:00
Safihre
9bdaae8d9f Try to fix the Snapcraft builds 2021-03-27 11:03:56 +01:00
SABnzbd Automation
4115651998 Update translatable texts 2021-03-27 09:15:52 +00:00
Safihre
58349082df Prompt before renaming item that is being directly unpacked
Closes #1825
2021-03-27 10:14:10 +01:00
Safihre
39cccb5653 Update text files for 3.2.1RC2
draft release
2021-03-24 10:13:43 +01:00
Safihre
aa75828296 Add title for long Config Server names 2021-03-21 16:56:21 +01:00
Safihre
f6838dc985 Improvements to the encrypted RAR-detection 2021-03-20 18:32:11 +01:00
Safihre
8cd4d92395 Make get_all_passwords return only unique passwords
If the filename and the NZB specified the same one it could occur 2 or 3 times.
2021-03-20 18:32:05 +01:00
Safihre
10eaf6e278 Improvements to the encrypted RAR-detection 2021-03-20 18:28:06 +01:00
Safihre
04e22571e9 Make get_all_passwords return only unique passwords
If the filename and the NZB specified the same one it could occur 2 or 3 times.
2021-03-20 17:53:01 +01:00
Safihre
3bf9906f45 Update text files for 3.2.1RC1
draft release
2021-03-18 10:30:05 +01:00
Safihre
9f7daf96ef Update URL for Python 3 information 2021-03-18 09:10:39 +01:00
Sander
67de4df155 deobfuscate: no globber, but use given filelist (#1830) 2021-03-18 09:10:31 +01:00
Safihre
bc51a4bd1c Remove old compatibility code from BPSMeter that causes crash on startup
Closes #1827
2021-03-18 09:10:23 +01:00
Sander
bb54616018 deobfuscate: rename accompanying (smaller) files with same basename, and no renaming of collections with same extension (#1826)
* deobfuscate: rename accompanying (smaller) files with same basename

* deobfuscate: do not rename collections of same extension

* deobfuscate: collection ... much easier with one loop, thanks safihre.

* deobfuscate: globber_full, and cleanup

* deobfuscate: unittest test_deobfuscate_big_file_small_accompanying_files

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension
2021-03-18 09:10:18 +01:00
Safihre
6bcff5e014 More space for the RSS table
Closes #1824
2021-03-18 09:10:09 +01:00
Safihre
bc8b9e7c8b Update URL for Python 3 information 2021-03-18 09:09:43 +01:00
Sander
b6213654ef deobfuscate: no globber, but use given filelist (#1830) 2021-03-16 19:47:21 +01:00
Safihre
9ba17d5338 Remove old compatibility code from BPSMeter that causes crash on startup
Closes #1827
2021-03-15 12:58:02 +01:00
Sander
dde453744d deobfuscate: rename accompanying (smaller) files with same basename, and no renaming of collections with same extension (#1826)
* deobfuscate: rename accompanying (smaller) files with same basename

* deobfuscate: do not rename collections of same extension

* deobfuscate: collection ... much easier with one loop, thanks safihre.

* deobfuscate: globber_full, and cleanup

* deobfuscate: unittest test_deobfuscate_big_file_small_accompanying_files

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension
2021-03-14 21:31:30 +01:00
Safihre
a86273f213 More space for the RSS table
Closes #1824
2021-03-14 12:05:17 +01:00
Safihre
2b312dfa6f Update documentation links to 3.3.x 2021-03-14 11:10:20 +01:00
puzzledsab
8970a03a9a Use binary mode to make write test more accurate on Windows (#1815) 2021-03-10 22:23:10 +01:00
Safihre
3ad717ca35 Single indexer categories would be saved with "," between each letter 2021-03-10 22:23:10 +01:00
jcfp
b14f72c67a fix config auto_sort setting, broken by #1666 (#1813)
* fix config auto_sort setting, broken by #1666

* oops I did it again
2021-03-10 22:23:10 +01:00
Safihre
45d036804f Show name of item to be deleted from queue/history in confirm dialog 2021-03-10 22:23:10 +01:00
Safihre
8f606db233 Add traceback when failing to read the password file
Closes #1810
2021-03-10 22:23:10 +01:00
Safihre
3766ba5402 pre-create subdir if needed (POSIX, par2) (#1802)
* pre-create subdir it needed

* pre-create subdir it needed: check if already exists

* use os.makedirs() to handle subdir1/subdir2/blabla

* protect against malicous "..", and better naming

* check for Windows \ and POSIX /

* check again within path, typo and formatting

* regex: square brackets

* cleanup: only "/" can occur in par2

* cleanup: better logging

* unit test: testing of filesystem.renamer()

* if subdir specified in par2: let filesystem.renamer() do all the work

* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.

* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.

* more comments in code

* use filesystem.create_all_dirs(), less logging, clearer "..", and other feedback from Safihre

* make remote black happy too

* Small changes in wording of comments and error

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-03-10 22:23:10 +01:00
jxyzn
e851813cef Sanitize names possibly derived from X-DNZB-EpisodeName (#1806) 2021-03-10 22:15:23 +01:00
Safihre
800c7182c1 Add simple unit test for test_validate_single_tag 2021-03-10 22:10:32 +01:00
Safihre
cbbd5faf24 Single indexer categories would be saved with "," between each letter 2021-03-10 20:01:57 +01:00
puzzledsab
bb9c8f04e2 Use binary mode to make write test more accurate on Windows (#1815) 2021-03-10 19:52:48 +01:00
puzzledsab
50469903dc Reduce the number of full BPSMeter.update calls by caching the amounts (#1801)
* Don't do a full calculation for every call to BPSMeter.update()

* Log current bps in MB/s

* Use to_units

* Add an bps update after disconnect or shutdown

* Switch to force_full_update being default

* Force update if bandwidth limit is set

* Fixed the real problem

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-03-10 19:51:57 +01:00
jcfp
b8f6cf11d6 fix config auto_sort setting, broken by #1666 (#1813)
* fix config auto_sort setting, broken by #1666

* oops I did it again
2021-03-07 18:37:02 +01:00
jcfp
f0d4f76e0f remove unused import of same_file (#1812) 2021-03-07 15:17:16 +01:00
SABnzbd Automation
05f0a12d16 Update translatable texts 2021-03-07 08:19:47 +00:00
Safihre
a1cad730ad Show name of item to be deleted from queue/history in confirm dialog 2021-03-07 09:18:57 +01:00
SABnzbd Automation
3e8c738496 Update translatable texts 2021-03-01 19:17:48 +00:00
Safihre
940dd3e3c0 Add traceback when failing to read the password file
Closes #1810
2021-03-01 20:16:54 +01:00
SABnzbd Automation
6de4e1a401 Update translatable texts 2021-02-28 10:43:23 +00:00
Sander
0a8747f600 pre-create subdir if needed (POSIX, par2) (#1802)
* pre-create subdir it needed

* pre-create subdir it needed: check if already exists

* use os.makedirs() to handle subdir1/subdir2/blabla

* protect against malicous "..", and better naming

* check for Windows \ and POSIX /

* check again within path, typo and formatting

* regex: square brackets

* cleanup: only "/" can occur in par2

* cleanup: better logging

* unit test: testing of filesystem.renamer()

* if subdir specified in par2: let filesystem.renamer() do all the work

* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.

* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.

* more comments in code

* use filesystem.create_all_dirs(), less logging, clearer "..", and other feedback from Safihre

* make remote black happy too

* Small changes in wording of comments and error

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-02-28 11:42:49 +01:00
thezoggy
68a5e7c8f7 3.2.x cleanup (#1808)
* Update uni_config bootstrap css to same version of js (3.3.7).
* small accessibility change, removed thin dot border on focus

* Ignore VS Code settings folder

* cherry picked 'Fix disabled select for Glitter Night'

* glitter night - fix search border color
2021-02-27 14:48:00 +01:00
thezoggy
4d49ad9141 3.2.x cleanup (#1808)
* Update uni_config bootstrap css to same version of js (3.3.7).
* small accessibility change, removed thin dot border on focus

* Ignore VS Code settings folder

* cherry picked 'Fix disabled select for Glitter Night'

* glitter night - fix search border color
2021-02-27 14:47:44 +01:00
Safihre
c3d4bf5428 Fix disabled select for Glitter Night
Closes #1807
2021-02-27 09:45:56 +01:00
Safihre
0cac0bc761 Run black with --diff to show what is wrong
Closes #1803
2021-02-26 16:46:39 +01:00
Safihre
05427b7b3b Always run rar_renamer if no rar-files are present 2021-02-26 16:42:13 +01:00
Safihre
16618b3af2 Set version to 3.2.0 2021-02-26 10:30:00 +01:00
Safihre
0e5c0f664f Merge branch '3.2.x' 2021-02-26 10:29:39 +01:00
Safihre
7be9281431 Update text files for 3.2.0
draft release
2021-02-26 09:56:47 +01:00
Safihre
ee0327fac1 Update macOS build Python to 3.9.2 2021-02-26 09:44:51 +01:00
Safihre
9e73f9b5e0 Update macOS build Python to 3.9.2 2021-02-26 09:44:24 +01:00
Safihre
9930de3e7f Log all nzo_info when adding NZB's
Relates to #1806
2021-02-26 09:18:14 +01:00
Sander
e8503e89c6 handle gracefully if no malloc_trim() available (#1800) 2021-02-26 09:18:00 +01:00
puzzledsab
1d9ed419eb Remove some redundant ifs (#1791) 2021-02-26 09:17:29 +01:00
SABnzbd Automation
5ec41bafbe Update translatable texts 2021-02-23 09:09:41 +00:00
jxyzn
cb67cc8c3d Sanitize names possibly derived from X-DNZB-EpisodeName (#1806) 2021-02-23 10:08:53 +01:00
Safihre
d35619805f Log all nzo_info when adding NZB's
Relates to #1806
2021-02-23 10:08:23 +01:00
SABnzbd Automation
cb26758d53 Update translatable texts 2021-02-18 19:58:44 +00:00
Sander
9783674890 handle gracefully if no malloc_trim() available (#1800) 2021-02-18 20:58:06 +01:00
SABnzbd Automation
270eeda3e2 Update translatable texts 2021-02-14 16:06:00 +00:00
jcfp
24d3d064bb add unwanted extensions whitelist mode (#1798)
* add unwanted extensions whitelist mode

* only call get_ext once

* remove unneeded .lower()
2021-02-14 17:05:26 +01:00
Sander
e8eec80696 Long hex name obfuscated (#1796)
* "0675e29e9abfd2.f7d069dab0b853283cc1b069a25f82.6547" is obfuscated

* "0675e29e9abfd2.f7d069dab0b853283cc1b069a25f82.6547" is obfuscated
2021-02-11 15:01:24 +01:00
jcfp
c366504868 add resolution pattern key to sorting (#1794) 2021-02-10 14:12:06 +01:00
SABnzbd Automation
c7b54856c5 Update translatable texts 2021-02-09 05:37:40 +00:00
puzzledsab
10c56e08d4 Remove some redundant ifs (#1791) 2021-02-09 06:36:59 +01:00
Safihre
0207652e3e Update text files for 3.2.0RC2
draft release
2021-02-08 21:02:38 +01:00
Safihre
0f1e99c5cb Update translatable texts 2021-02-08 13:29:16 +01:00
SABnzbd Automation
4af51b4a76 Update translatable texts 2021-02-08 12:24:13 +00:00
puzzledsab
f134bc7efb Right-to-Left support for Glitter and Config (#1776)
* Add rtl on main page

* Adjustments to rtl

* Forgot to add black check for this checkout

* Remove unnecessary style

* Remove more redundant attributes

* Some more reordering and alignment

* Align sorting and nzb drop downs

* Update NZB details and shutdown page

* Fix format

* Fix SABnzbd Config title tag

* Change file list header direction

* Set rtl variables in build_header instead and test dir="rtl" in config pages

* Revert some changes and handle styling using CSS

* Move more items to CSS

* Config RTL

* Move even more to CSS

* Small tweak

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-02-08 13:23:03 +01:00
puzzledsab
dcd7c7180e Do full server check when there are busy_threads (#1786)
* Do full server check when there are busy_threads

* Reduce next_article_search delay to 0.5s
2021-02-08 13:19:38 +01:00
jcfp
fbbfcd075b fix bonjour with localhost, retire LOCALHOSTS constant (#1782)
* fix bonjour with localhost, retire LOCALHOSTS constant

* rename probablyipv[46] functions to is_ipv[46]_addr

* refuse to send ssdp description_xml to outsiders
2021-02-08 13:19:30 +01:00
Safihre
65cc03da14 Small refactor of pre-queue code 2021-02-06 17:28:23 +01:00
SABnzbd Automation
e908cb0df5 Update translatable texts 2021-02-06 14:32:26 +00:00
puzzledsab
ae2cee3fda Right-to-Left support for Glitter and Config (#1776)
* Add rtl on main page

* Adjustments to rtl

* Forgot to add black check for this checkout

* Remove unnecessary style

* Remove more redundant attributes

* Some more reordering and alignment

* Align sorting and nzb drop downs

* Update NZB details and shutdown page

* Fix format

* Fix SABnzbd Config title tag

* Change file list header direction

* Set rtl variables in build_header instead and test dir="rtl" in config pages

* Revert some changes and handle styling using CSS

* Move more items to CSS

* Config RTL

* Move even more to CSS

* Small tweak

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-02-06 15:31:51 +01:00
SABnzbd Automation
0467ed7ffc Update translatable texts 2021-02-06 14:11:17 +00:00
puzzledsab
d5453b4aa4 Do full server check when there are busy_threads (#1786)
* Do full server check when there are busy_threads

* Reduce next_article_search delay to 0.5s
2021-02-06 15:10:44 +01:00
jcfp
7096a785db fix bonjour with localhost, retire LOCALHOSTS constant (#1782)
* fix bonjour with localhost, retire LOCALHOSTS constant

* rename probablyipv[46] functions to is_ipv[46]_addr

* refuse to send ssdp description_xml to outsiders
2021-02-05 18:48:14 +01:00
Safihre
f42d2e4140 Rename Glitter Default to Light and make Auto the new Default 2021-02-05 15:01:28 +01:00
Sam Edwards
88882cebbc Support for auto night mode switching in Glitter (#1783) 2021-02-05 15:01:13 +01:00
Safihre
17a979675c Do not re-release from GA when the release tag is pushed 2021-02-05 15:01:04 +01:00
Safihre
4642850c79 Set macOS Python installer target to "/" 2021-02-05 15:01:00 +01:00
Safihre
c80db13c28 Rename Glitter Default to Light and make Auto the new Default 2021-02-05 14:20:14 +01:00
SABnzbd Automation
b971045cd2 Update translatable texts 2021-02-05 05:33:44 +00:00
Sam Edwards
61d4ccbf1b Support for auto night mode switching in Glitter (#1783) 2021-02-05 06:32:59 +01:00
SABnzbd Automation
c3b237466c Update translatable texts 2021-02-02 21:59:00 +00:00
jcfp
29c727319d Test adding nzbs (#1760)
* add tests for adding nzbs

* restore clean_cache_dir fixture, unbreak utils tests

* include tests for partial and malformed nzbs

* test handling of prio from nzb metadata category

* update params of test_adding_nzbs_malformed

* add metadata to sabnews nzb creator

* also test with size_limit

* test prio with dupe detection

* remove leftover todo entry

* move pause and cleanup to fixture; rename functions
2021-02-02 22:58:20 +01:00
Safihre
52c5dc589d Do not re-release from GA when the release tag is pushed 2021-02-01 17:04:39 +01:00
SABnzbd Automation
35cad9bf22 Update translatable texts 2021-02-01 15:19:54 +00:00
Safihre
b108876017 Set macOS Python installer target to "/" 2021-02-01 16:13:37 +01:00
Safihre
52bfff953a Set text files to 3.3.0-develop 2021-02-01 16:12:42 +01:00
Safihre
65278c4489 Update text files for 3.2.0RC1
draft release
2021-02-01 15:57:24 +01:00
Safihre
3a4a925ab0 Restore "--console" command line switch
Closes #1775
2021-02-01 13:57:41 +01:00
Safihre
6ef5d41c25 Python cache failed because build script reset work directory
So we store the download outside the work directory
2021-02-01 09:54:45 +01:00
Safihre
b9b9f46fbe Disable macOS Python download cache
I am not sure why this doesn't work..
2021-01-31 22:40:12 +01:00
Safihre
8d014e579d The installer-command removes the pkg file, breaking macOS GA cache 2021-01-31 22:31:59 +01:00
SABnzbd Automation
f2fc9f10f9 Update translatable texts 2021-01-31 20:01:25 +00:00
Safihre
f131155fd8 Update badges to GitHub Actions 2021-01-31 21:00:16 +01:00
Safihre
691e24a1d8 Build macOS 10.9+ compatible binary 2021-01-30 22:32:59 +01:00
jcfp
794a6f4454 fix another script validation issue (#1774)
* fix another script validation issue

* add test for changing script to str None

* cleanup change_script tests
2021-01-30 14:25:53 +01:00
Safihre
41bf8525cf Server disconnect was never triggered 2021-01-29 19:29:10 +01:00
SABnzbd Automation
6ebf486c09 Update translatable texts 2021-01-29 10:10:07 +00:00
Safihre
899ae94fcf Trigger malloc_trim when the queue is empty
See #1736
2021-01-29 11:09:14 +01:00
Safihre
d3cd5019d9 Small code change 2021-01-27 21:26:28 +01:00
SABnzbd Automation
1e4719558f Update translatable texts 2021-01-27 20:13:04 +00:00
Safihre
29ab83b9c0 Prospective par2 to add blocks from all sets in a job
Obfuscation is just too much nowadays.
2021-01-27 17:21:54 +01:00
puzzledsab
4b4d170ce1 Stop importing nzbs after shutdown request 2021-01-27 13:45:25 +01:00
SABnzbd Automation
8b0a12e0ba Update translatable texts 2021-01-27 11:29:35 +00:00
Safihre
430318ead7 Force installer to only run on Windows 8 and above
Closes #1770
2021-01-27 12:28:35 +01:00
Safihre
32f6ec63f2 Add NSIS-file to automated pot-file updates 2021-01-27 12:26:55 +01:00
Safihre
a3181c8f76 Check for Windows 8 or above in the installer 2021-01-27 12:23:24 +01:00
Safihre
412d169f58 Rename of the 32bit legacy release
"/" not supported by GA
2021-01-27 11:36:38 +01:00
Safihre
d1c2e6e0dd Build the 32bit Windows release on Python 3.8 to support Windows 7 2021-01-27 11:30:08 +01:00
Safihre
4f9ac56de0 Rename GITHUB_TOKEN to AUTOMATION_GITHUB_TOKEN 2021-01-27 11:26:14 +01:00
jcfp
9641dc82f9 fix cfg script validation on startup 2021-01-27 10:03:24 +01:00
Safihre
e68413b73c Filename parser should always output a filename with at least 1 char
Closes #1768
2021-01-26 22:52:07 +01:00
Safihre
a7386a25bd Update text files for 3.2.0Beta2
draft release
2021-01-26 20:45:50 +01:00
SABnzbd Automation
53f512e864 Update translatable texts 2021-01-26 19:17:46 +00:00
Safihre
283e643606 Always log the exact IP-address we are connecting to
Closes #1764
2021-01-26 20:16:51 +01:00
Safihre
fc1aa2db83 Mark test_download_unicode_made_on_windows as xfail on all platforms 2021-01-25 09:27:30 +01:00
SABnzbd Automation
0fc1e02519 Update translatable texts 2021-01-25 06:37:21 +00:00
jcfp
67581bf3f6 Validate input value for scripts (#1765)
* verify input values for scripts

* update and parametrise test_api_queue_change_job_script

* fortify cfg with script validation, fix test

* add typing to is_valid_script function :)

* move list_scripts function to filesystem

* also move windows-specific pathext stuff
2021-01-25 07:36:41 +01:00
Safihre
b7e4ca4d87 Correct server-tests after Downloader changes 2021-01-24 11:23:52 +01:00
Safihre
0594fc60c0 Rework shutdown and NewsWrapper handling in Downloader 2021-01-24 11:13:12 +01:00
Safihre
5a6c51219c Only parse interface settings when they are set 2021-01-24 10:39:32 +01:00
SABnzbd Automation
815542bf25 Update translatable texts 2021-01-24 08:57:26 +00:00
Safihre
0c5bd817a9 Small refactor of NNTP connection 2021-01-24 09:56:48 +01:00
Safihre
9b8a317351 Upgrade notice about totals10.sab
Closes #1744
2021-01-23 21:34:23 +01:00
SABnzbd Automation
7a9d8e021a Update translatable texts 2021-01-23 20:27:52 +00:00
puzzledsab
297ec1b8a1 Warn when a server has downloaded a certain amount of bytes or a given date is reached (#1762)
* First working version

* Remove pprint

* Black

* Use date type and move to 5 minute polling

* Give hints about intended usage in explain text

* Use scheduled tasks and some smaller changes

* Black

* Remove hidden fields from form

* Cleanup

* This is not the easiest part to get right

* Black hook take 3

* Rework the server check tasks

* Show quota left for server

* Move Server description

Co-authored-by: Safihre <safihre@sabnzbd.org>

Closes #1455
2021-01-23 21:27:17 +01:00
Safihre
f04f6684e0 Correct refactor of database.py
Sending invalid nzo_id's resulted in crashes.
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25163
2021-01-23 16:18:26 +01:00
SABnzbd Automation
91870c6712 Update translatable texts 2021-01-22 13:57:11 +00:00
jcfp
9c48fcf5f8 correct msg for rar renamer (#1763) 2021-01-22 14:54:31 +01:00
Safihre
ee41cfc618 Correct Windows Service restart
Broke it in the previous commit.
2021-01-21 20:58:00 +01:00
Safihre
ae30f89a2d Use basic restart for Windows binaries
Python 3.9 changed the output of Py_GetArgcArgv on Windows, causing the restart of the binaries to fail.
2021-01-21 20:55:31 +01:00
Safihre
dfcce3a974 Sometimes Multipar says failed, but we can try again with extra blocks
https://forums.sabnzbd.org/viewtopic.php?f=2&t=25155
2021-01-21 20:35:31 +01:00
Safihre
59423df0cb Program shutdown could be too fast to complete the last response 2021-01-21 20:26:40 +01:00
Safihre
ee08c486bc Allow newer cheroot-versions 2021-01-21 20:15:01 +01:00
puzzledsab
a56c522068 Save all interface values if useGlobalOptions is true (#1761)
* Save all interface values if useGlobalOptions is true

* Try to fix the tests

* New test test

* Another test test

* Remove default value for interface_settings
2021-01-21 19:31:33 +01:00
Sander
6d40eba496 Filename limit in sanitize_filename() to avoid traceback (#1721)
* urlgrabber limit filename to avoid tracebacks

* urlgrabber limit filename to avoid tracebacks: black

* urlgrabber limit filename to avoid tracebacks: black

* filename_limit ... 2020-01-15

* filename_limit: into sanitize_filename()

* filename_limit: black and typo and logging

* filename_limit: debug show full filename

* filename_limit: unittests

* sanitize_filename(): take care of feedback: one ASCII method, handly silly extension lengths

* sanitize_filename(): tests/test_filesystem.py ... make black happy

* sanitize_filename(): typo in comment

* sanitize_filename(): test_filesystem.py ... black

* sanitize_filename(): more unittests, and DEF_FILE_MAX (yet without GUI option)

* sanitize_filename(): always use DEF_FILE_MAX

* sanitize_filename(): black

* sanitize_filename(): handle UTF8 correct (>1 byte). DEF_FILE_MAX = 255

* sanitize_filename: measure bytes (not chars), DEF_FILE_MAX = 255 - 6, no test-writing in unittests

* sanitize_filename: constants.py ... black

* sanitize_filename: comment about extension

* DEF_FILE_MAX = 255 - 10 again, to solve adding ".nzb.gz" elsewhere
2021-01-19 22:03:13 +01:00
Safihre
c772df9d65 Add sleep to gc_stats test to stabilize the overal tests 2021-01-19 09:03:03 +01:00
Sander Jonkers
2a73f26f2a is_probably_obfuscated(): count underscores as spacedots 2021-01-18 20:47:02 +01:00
Safihre
a750ade5a4 Server statistics reset on restart if start_paused is enabled
Closes #1753
Oops.
2021-01-18 13:44:55 +01:00
Safihre
06b37c02f1 Use with-statement for the DOWNLOADER_CV 2021-01-18 13:11:53 +01:00
Safihre
d129607d5c Fix exit_sab for macOS binary 2021-01-17 20:51:33 +01:00
Safihre
e6d812bbd8 Set default Bandwith percentage to 100
Oops, should have done a long time ago. Otherwise by default it will exceed 100%.
2021-01-17 20:49:19 +01:00
Safihre
9cc921098e Allow longer time for test after queue-repair 2021-01-17 13:11:50 +01:00
Safihre
38213c1a91 Use Condition based system for the DirScanner 2021-01-17 12:56:52 +01:00
Safihre
44d74924e6 Rework program shutdown and restart to always use the same path 2021-01-17 12:42:34 +01:00
Safihre
5eaf0c12d3 Use Condition based system for program shutdown
Prevent delays when shutting down because the main loop isn't ready.
2021-01-17 12:21:07 +01:00
Sander Jonkers
7c2b433f7b happyeyeballs.py: by default, do NOT prefer IPv6 anymore 2021-01-17 11:56:46 +01:00
Safihre
30e692cefe Handle shutdown of SSDP using Condition's so it doesn't block
Closes #1750
2021-01-17 07:26:57 +01:00
Safihre
396fb42b11 Additional refactoring of socket-handling in Downloader 2021-01-16 19:42:54 +01:00
Safihre
c8d882712e Remove write_fds
Sockets are connected in blocking mode, so there's no need to wait for them to be writeable. Only after the connect we switch to non-blocking mode.
2021-01-16 19:42:54 +01:00
Safihre
9667aad1cb Rework the handling of socket fileno's 2021-01-16 19:42:54 +01:00
Safihre
4471303aae Simplify delay if no articles were found for a server 2021-01-16 19:42:54 +01:00
Safihre
fe2ec8cc94 Downloader shutdown same as the other threads 2021-01-15 22:07:02 +01:00
SABnzbd Automation
25440c6fec Update translatable texts 2021-01-15 06:17:01 +00:00
puzzledsab
8c2d7243cc can_be_slowed with some modifications (#1748) 2021-01-15 07:16:13 +01:00
Safihre
49e67a0bef Change calls to parent class to super() 2021-01-12 09:11:46 +01:00
SABnzbd Automation
1dfa937bff Update translatable texts 2021-01-09 20:46:43 +00:00
Safihre
a3c6bbc1b5 Resolve typing problems 2021-01-09 21:46:01 +01:00
Safihre
241e8b6842 Refactor and typing of download functions 2021-01-09 10:05:55 +01:00
SABnzbd Automation
8660faaeb7 Update translatable texts 2021-01-06 13:05:04 +00:00
Safihre
687deab6bc Trigger garbage collection every 5 minutes
Relates to #1736
2021-01-06 14:04:22 +01:00
Safihre
17ec3cbf4b Always lowercase category name
Closes #1738
2021-01-04 09:12:23 +01:00
Safihre
f75609c98c Trigger garbage collection at the end of the queue
Relates to #1736
2021-01-04 09:12:23 +01:00
Safihre
5bd65cc06a Remove close-button on update message
Closes #1740
2021-01-04 07:37:17 +01:00
Safihre
e2177577be Additional release notes 2021-01-04 07:36:11 +01:00
SABnzbd Automation
a695744c7c Update translatable texts 2021-01-03 19:44:48 +00:00
Safihre
c2a89731c9 Update text files for 3.2.0Beta1
draft release
2021-01-03 20:44:04 +01:00
Safihre
f0bfb08c2e Update copyright year to 2021 2021-01-03 20:43:19 +01:00
Safihre
764f7df6a7 Limit the number of TryList resets
This might cause problems, but it's worth a try. It seems we resetted the trylists so often, this would cause a lot of extra CPU cycles to try all articles again.
2021-01-03 13:14:43 +01:00
Safihre
c310822945 Add some typing to downloader.py 2021-01-03 12:06:59 +01:00
Safihre
4cedd051b6 Correct "Form element for Add NZB window was not closed breaking ..." 2021-01-02 18:30:43 +01:00
Safihre
d36fe1ab12 Update wiki links for 3.2.x 2021-01-02 18:27:49 +01:00
SABnzbd Automation
9a14125c6b Update translatable texts 2021-01-02 15:53:05 +00:00
Sander
1a4ba51dec SSDP logging and interval_timer (#1734)
* SSDP: also log the User-Agent

* SSDP: also log the User-Agent

* SSDP: also log the User-Agent

* SSDP: ssdp_broadcast_interval in seconds, configurable via GUI -> Specials

* SSDP: ssdp_broadcast_interval as optional parater to the SSDP class

* SSDP: less is more: start_ssdp(*args, **kwargs):

* SSDP: less is more: start_ssdp(*args, **kwargs):

* SSDP: handle if no User-Agent specified

* SSDP: small change

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-01-02 16:49:55 +01:00
Safihre
826fb3f110 Release directly from GitHub Actions 2021-01-01 20:59:44 +01:00
Safihre
9f42eb3ad7 Update building workflow to support 32bit Windows and Notarization 2021-01-01 20:59:44 +01:00
Safihre
fbbc333221 Increase Maximum number of connections per server to 1000
Closes #1732
Cause, why not.
2021-01-01 14:57:03 +01:00
SABnzbd Automation
e62792b0da Update translatable texts 2021-01-01 11:51:24 +00:00
Safihre
dbc435c4e1 Update UnRar to 6.0.0 and MultiPar to 1.3.1.3 2021-01-01 12:29:38 +01:00
puzzledsab
ada2f2498e Don't crash if nzf is gone (#1731)
* Don't crash if nzf is gone

* Catch AttributeError and add comment
2020-12-31 17:24:25 +01:00
SABnzbd Automation
c736446872 Update translatable texts 2020-12-31 15:38:07 +00:00
puzzledsab
a1e7d5b36f Pause on full Complete Download Folder and regularly check if there is enough space to resume (#1724)
* Add pause on full Complete Download Folder and optional time limit for full disk pause

* Use nzo.bytes_tried in completed dir disk full check

* It's so black or white

* Don't pause on full download disk until it's necessary and don't apply timed pause to temporary disk

* Simpler ifs

* Compare with downloaded bytes, not remaining

* Fix comparison

* Increase pause check to 90% finished

* Subtract par2 files and increase limit to 95%

* Use checkbox for automatic resume and task scheduler for checking free space

* Make canceling resume task a separate method

* Black

* Replace some logging.debug with logging.info

* Remove sabnzbd.directunpacker.abort_all

* Rewrite explain-fulldisk_autoresume explanation

* Ignore complete_free if 0

* Style changes

* Remove scheduled task if the downloading is continued

* 'Every few minutes'

* Fix unchecking of fulldisk_autoresume in config page and don't do autoresume task if it has been disabled

* Black is rather picky

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-31 16:37:01 +01:00
SABnzbd Automation
24fd5a5e0b Update translatable texts 2020-12-31 14:24:54 +00:00
Sander
bc4557432a Test download 10GB (#1730)
* Test download 10GB

* "1000MB" renamed to "1 GB" in the GUI
2020-12-31 15:24:13 +01:00
Tim Gates
5df4a76367 docs: fix simple typo, sturct -> struct
There is a small typo in sabnzbd/utils/rarfile.py.

Should read `struct` rather than `sturct`.
2020-12-28 23:22:01 +01:00
Safihre
48d566fd98 Form element for Add NZB window was not closed breaking other windows
https://forums.sabnzbd.org/viewtopic.php?f=13&t=25121
2020-12-28 21:42:51 +01:00
Safihre
f9cd328b3a Update encryption check to handle partially assembled files
https://forums.sabnzbd.org/viewtopic.php?f=3&p=123147
In SABnzbd 3.x we write incomplete files to the disk instead of waiting for a file to be 100% complete.
So the password check fails because it will check part001 and automatically continue to part002. Instead of crashing with a "can't find part002" (this we expect) it finds a incomplete part002 and crashes with a different error that we don't catch.
Alternatively it can crash due to starting to check on part002 while part001 isn't there yet. This used to work, but broke now.
2020-12-28 17:35:40 +01:00
SABnzbd Automation
a24c13d8ce Update translatable texts 2020-12-26 12:43:26 +00:00
jcfp
8b5494d0a6 add selecting by nzo_id(s) for api queue and history output (#1718)
* add select by nzo_id to history api

* add select by nzo_id to queue api

* add tests for selecting by nzo_ids

* Do not run codesign step on pull requests

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-26 13:42:42 +01:00
Safihre
7f0e8f5591 Correctly keep track of article statistics 2020-12-26 13:20:40 +01:00
SABnzbd Automation
14f4e09676 Update translatable texts 2020-12-25 22:31:25 +00:00
puzzledsab
c5aa61e191 Use x- instead of X- with lowered line in decoder 2020-12-25 23:30:43 +01:00
SABnzbd Automation
c50efd7efd Update translatable texts 2020-12-25 00:32:40 +00:00
Safihre
c23c239ce9 Show article statistics in Config Servers
Closes #1226
2020-12-25 01:31:51 +01:00
SABnzbd Automation
5a1b92f060 Update translatable texts 2020-12-24 14:09:23 +00:00
Safihre
b7375b5a8e Keep track of article statistics for each server
Basis for #1226, still need to work on displaying the information.
2020-12-24 15:08:38 +01:00
Safihre
c42b5b2bb6 Prevent flash of unstled content of the Add NZB button
Before Knockout is active, the number of columns is 6 because of the foreach-loop.
2020-12-24 10:26:33 +01:00
Safihre
809783cd53 Build binary release for each commit and pull request (#1708)
* Build binary release for each commit and pull request

* Codesign macOS release
2020-12-24 09:57:21 +01:00
SABnzbd Automation
b5c5a18216 Update translatable texts 2020-12-23 22:14:02 +00:00
Safihre
49b4dca12c Improvements to the "Add NZB" modal window
Closes #1560
2020-12-23 23:13:18 +01:00
Safihre
37b03e6e37 RSS error messages with HTML characters would not be displayed 2020-12-23 20:35:59 +01:00
Safihre
70b92b5961 Make sure RSS titles with HTML characters can be modified 2020-12-23 20:23:04 +01:00
Safihre
f31da2a8e6 Make it possible to edit RSS Titles
Closes #1706
2020-12-23 20:22:36 +01:00
SABnzbd Automation
c68ff15f38 Update translatable texts 2020-12-23 16:50:40 +00:00
Safihre
bd1fe2b1cd Notify through Notifications if new version is available 2020-12-23 17:49:42 +01:00
Safihre
a1f3914054 Correct notification category for failed URL fetches 2020-12-23 17:39:15 +01:00
SABnzbd Automation
2d9dc48076 Update translatable texts 2020-12-23 10:43:18 +00:00
puzzledsab
c80c120153 Add multiple extra queue/history columns and option for unlimited width (#1714)
* Add option for unlimited width

* Add skintext

* Select multiple extra columns

* Fix some markup

* Suggested changes

* Retrigger tests

* Make it possible to select multiple history columns as well

* Do not show extra columns on <1200px

* Fix Add NZB-row

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-23 11:42:41 +01:00
Safihre
b75c23772e Remove unused function is_obfuscated_filename 2020-12-23 11:38:50 +01:00
SABnzbd Automation
d9a94bc59c Update translatable texts 2020-12-23 10:37:58 +00:00
Safihre
e446ab4762 Log which filename we are checking for obfuscation 2020-12-23 11:36:57 +01:00
SABnzbd Automation
2a656d437e Update translatable texts 2020-12-22 21:57:44 +00:00
Sander
7473cd2264 Warning for enabling HTTPS (#1715)
* GUI show warning for enabling HTTPS

* GUI show warning for enabling HTTPS. Make black happy

* GUI show warning for enabling HTTPS: warning in separate string

* GUI show warning for enabling HTTPS: Warning embedded

* GUI show warning for enabling HTTPS: proper class stuff
2020-12-22 22:57:05 +01:00
Safihre
9fb1c0fbbb Remove Glitter fade-on-delete
Closes #1710
2020-12-22 17:53:13 +01:00
SABnzbd Automation
4ae0e75dc9 Update translatable texts 2020-12-19 23:26:34 +00:00
Safihre
2632ce537a Refactor of the osxmenu functions
Closes #1683
2020-12-20 00:25:29 +01:00
SABnzbd Automation
4d79261851 Update translatable texts 2020-12-19 12:00:57 +00:00
puzzledsab
fadae5e33e Show per-server speed (issue #1150) (#1704)
* Show current server speed on server config page

* Show server bps on Status and interface page

* Make black happy

* Remove server bps from config page

* Small optimization tweak

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-19 12:59:52 +01:00
puzzledsab
7f702b7025 Make sleep more fine grained and add short sleep when no processing is done (#1697)
* Make sleep more fine grained and add short sleep when no processing is required

* Fix black complaint

* Only calculate sleep time when needed

* Remove empty line

* Add sleep_time variable to Downloader

* Make sure it sleeps in decoder and BPSMeter, even when sleep_time is 0

* Longer sleep for decoder and bandwidth limit delays

* Remove BPSMeter get_stable_speed as it is no longer used

* retrigger checks

* Updates based on feedback

* No more minimum value

* 0.01 it is

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-18 20:01:51 +01:00
SABnzbd Automation
db255a8b7e Update translatable texts 2020-12-15 12:57:36 +00:00
Safihre
47b8d1de39 Don't activate Windows notifications when running as service
Closes #1705
2020-12-15 13:56:33 +01:00
Safihre
01ea1d2910 Keep original priority of duplicate jobs
Closes #1702
2020-12-13 11:46:27 +01:00
Safihre
f5f8aa985e Sort script drop-down list alphabetically
Closes #1699
2020-12-12 19:13:27 +01:00
Safihre
1a848cf5fe Smarter extraction of filenames from NZB-subject 2020-12-12 17:18:58 +01:00
puzzledsab
b748b05fbd Only check idle servers for new articles twice per second (#1696)
* Only check idle servers for new articles twice per second

* Fix black complaint

* Store time.time() in variable in DL loop

* No need to check server for last_busy if it was just set
2020-12-12 17:05:29 +01:00
Safihre
9f2a9c32c0 Switch to GitHub Actions for CI
Removed the par2 files for the unicode job, they caused too much problems. It's a bad "fix" for #1509.
2020-12-12 16:52:43 +01:00
jcfp
92d0b0163a prevent repetition of unwanted extension warnings (#1695) 2020-12-11 21:09:16 +01:00
Safihre
c50e2a4026 Small tweak of where set_download_report is called 2020-12-10 16:06:28 +01:00
Safihre
69ffa159c7 Correctly use dict.keys()
Solves https://forums.sabnzbd.org/viewtopic.php?f=2&t=25087
2020-12-08 10:11:35 +01:00
Sander
81089fc20a obfuscated rar sets: better handling missing rars (#1688)
* obfuscated rar sets: better handlin missing rars

* obfuscated rar sets: make black happy

* rarset: cleanup unused code

* rarset: cleanup unused code

* rarset: wrong is_obfuscated_filename
2020-12-06 16:39:43 +01:00
Sander
3d09f72c90 Fixed pattern obfuscation detection (#1691)
* obfuscated: recognize fixed pattern abc.xyz as obfuscated

* obfuscated: recognize fixed pattern abc.xyz as obfuscated

* obfuscated: recognize fixed pattern abc.xyz as obfuscated - extra test

* obfuscated: recognize fixed pattern abc.xyz as obfuscated - black happy

* obfuscated: recognize fixed pattern abc.xyz as obfuscated - r"bla"
2020-12-03 07:53:16 +01:00
SABnzbd Automation
ef7d84b24d Update translatable texts 2020-11-28 20:37:02 +00:00
Safihre
9b71f8ca4b Use fully customizable date ranges for server graphs
Closes #1645
2020-11-28 21:35:03 +01:00
Safihre
04c3fc77cb On Travis use Python 3.9 now it is stable
Closes #1677
2020-11-27 15:21:35 +01:00
Safihre
c6cc6f4537 Correct Git-commit detection when running in different folder
Closes #1676, #1675
2020-11-27 15:19:29 +01:00
Sander
f31a4440f1 diskspeed: follow pylint's advice, and more pytesting (#1678)
* diskspeed: follow pylint's advice, and more pytesting

* diskspeed: improved hint, catch relevant exceptions

* diskspeed: lower tun time to 0.5 s (as we run it twice)

* diskspeed: make black and pylint happier

* Delete somefile.txt
2020-11-27 14:34:42 +01:00
jcfp
84b1e60803 fix sabnews regex deprecation warning (#1685) 2020-11-26 21:11:33 +01:00
jcfp
a434a5f25d Explicitly set mode for gzip.GzipFile() (#1684) 2020-11-26 21:10:46 +01:00
Safihre
09e844a63f Do not crash in Queue Repair if there was no resulting NZO
Closes #1649
2020-11-22 12:49:04 +01:00
jcfp
c55e114131 normalize shebang for utils, example script (#1679) 2020-11-17 08:55:37 +01:00
Sander
575fbc06aa IPv4 IPv6 library based testing (#1673)
* IPv4 IPv6 library based testing

* IPv4 IPv6 library based testing ... make black happy again
2020-11-13 17:19:52 +01:00
Sander
19376805de Ssdp for real ... more improvements (#1656)
* Add base implementation of SSDP util

* SSDP+XML: working setup #1

* SSDP+XML: with socket ... as sock

* SSDP+XML: unique UUIDs

* SSDP+XML: simpler constructions of XML URL

* SSDP+XML: cleaner SSDP and XML, steady UUID in XML, better logging

* SSDP+XML: UUIDs into __init__(). Better, innit?

* SSDP+XML: Make black happy again

* SSDP+XML: Make black happy again ... now for interface.py

* SSDP+XML: creation of SSDP message and XML to __init__()

* SSDP+XML: changes based on feedback

* SSDP+XML: no more SABnzbd references in ssdp.py. No network is OK now.

* SSDP+XML: references to specs for SSDP and the XML

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-11-13 15:17:15 +01:00
Safihre
e8d6eebb04 Set version to 3.1.1 2020-11-11 22:04:44 +01:00
Safihre
864c5160c0 Merge branch '3.1.x' 2020-11-11 22:01:20 +01:00
Safihre
99b5a00c12 Update text files for 3.1.1 2020-11-11 21:56:15 +01:00
jcfp
5ea6a31bc2 Api tests (#1668)
* fix deprecation warning in sabnews regex

* enable text, xml returns from get_api_result

* add api tests

* add functional api tests

* add tavern.yaml files to test data

* explicitly add lxml to work around pip dependency issues

* prevent pytest from picking up the tavern files

* Revert "fix deprecation warning in sabnews regex"

This reverts commit 4f0b7131e7.

* address minor issues

* integrate fixtures into conftest

* black :/

* harden queue repair test

* try a workaround for extremely slow test runs on windoze

* Correct server detection in functional tests

* move scripts dir inside SAB_CACHE_DIR

* also relocate the generated script

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-11-08 18:37:48 +01:00
Safihre
2714ffe04d Do not crash if we cannot format the error message 2020-11-08 15:09:52 +01:00
Safihre
85ee1f07d7 Do not crash if we cannot format the error message 2020-11-08 15:06:50 +01:00
exizak42
e58b4394e0 Separate email message lines are with CRLF (#1671)
SMTP protocol dictates that all lines are supposed to be separated
with CRLF and not LF (even on LF-based systems). This change ensures
that even if the original byte string message is using `\n` for line
separators, the SMTP protocol will still work properly.

This resolves sabnzbd#1669

Fix code formatting
2020-11-08 14:44:44 +01:00
exizak42
c38eac0e46 Separate email message lines are with CRLF (#1671)
SMTP protocol dictates that all lines are supposed to be separated
with CRLF and not LF (even on LF-based systems). This change ensures
that even if the original byte string message is using `\n` for line
separators, the SMTP protocol will still work properly.

This resolves sabnzbd#1669

Fix code formatting
2020-11-06 16:19:38 +01:00
Safihre
fccc57fd52 It was not possible to set directory-settings to empty values 2020-11-06 16:15:08 +01:00
Safihre
1e91a57bf1 It was not possible to set directory-settings to empty values 2020-11-06 16:14:53 +01:00
Safihre
39cee52a7e Update text files for 3.1.1RC1 2020-11-02 20:03:43 +01:00
Safihre
72068f939d Improve handling of binary restarts (macOS / Windows) 2020-11-02 19:57:57 +01:00
jcfp
fea309da11 fix order for sorting queue by avg_age (#1666) 2020-11-01 19:37:30 +01:00
Safihre
d867881162 Deobfuscate-during-download did not work
https://forums.sabnzbd.org/viewtopic.php?f=3&t=25037
2020-11-01 15:39:41 +01:00
Safihre
096d0d3cad Deobfuscate-during-download did not work
https://forums.sabnzbd.org/viewtopic.php?f=3&t=25037
2020-11-01 15:35:09 +01:00
SABnzbd Automation
af9a7d2fb3 Update translatable texts 2020-11-01 13:22:36 +00:00
Safihre
259584b24f Less strict validation in test_functional_downloads due to #1509 2020-11-01 14:21:29 +01:00
SABnzbd Automation
38f61f64c7 Update translatable texts 2020-10-30 16:40:42 +00:00
Safihre
3e9bfba4d6 Improve handling of binary restarts (macOS / Windows) 2020-10-30 17:39:48 +01:00
Safihre
be26c7f080 mode=reset_quota api call returned nothing
Closes #1661
2020-10-28 16:16:49 +01:00
Safihre
2472ab0121 Python 3.5 does not know ssl.PROTOCOL_TLS_SERVER
Closes #1658
2020-10-27 15:52:28 +01:00
jcfp
6b8befdc67 Fix nzbstuff scan_password, expand tests (#1659)
* fixes for scan_password, expand tests

* correct typ0

* correct check for index of {{
2020-10-27 07:31:07 +01:00
Safihre
423e4e429b Add functional test for Queue Repair
Relates to #1649
2020-10-24 12:03:24 +02:00
Safihre
00421717b8 Queue Repair would fail if Rating is enabled
Closes #1649
2020-10-24 11:10:03 +02:00
SABnzbd Automation
53aba47915 Update translatable texts 2020-10-23 16:24:37 +00:00
jcfp
87f90b004f randomize age for generated nzb files in sabnews (#1655)
* randomize age for generated nzb files

Useful for testing queue sorting function of the api. Timestamp values are randomly chosen between september '93 and now.

* Sigh.
2020-10-23 18:23:56 +02:00
SABnzbd Automation
0b96afb055 Update translatable texts 2020-10-22 16:35:48 +00:00
Safihre
8e99ebe5ef Remove path length limitation on admin_dir and download_dir 2020-10-22 18:34:59 +02:00
Safihre
6e06d954fe Refactor of config.py and added typing hints to config.py and others 2020-10-22 16:10:24 +02:00
jcfp
497abb83da only replace the first occurence of "script_" (#1651)
* only replace the first occurence of "script_"

Use of str.replace() without a count replaces all occurences. As a result, scripts with filenames such as "my_script_for_sab.py" would be mangled when trying to set them as action on queue completion.

* also modify the check of the action var
2020-10-22 16:03:31 +02:00
Safihre
7ffebd97b9 Use constant for all localhost-definitions 2020-10-22 12:04:07 +02:00
SABnzbd Automation
55a5855720 Update translatable texts 2020-10-21 09:02:34 +00:00
Safihre
adc828dc8a Pin GitHub-actions versions 2020-10-21 11:01:28 +02:00
Safihre
ae96d93f94 Set version to 3.1.0 2020-10-16 17:02:28 +02:00
Safihre
8522c40c8f Merge branch '3.1.x' 2020-10-16 16:58:58 +02:00
Safihre
23f86e95f1 Update text files for 3.1.0 2020-10-16 16:42:35 +02:00
Safihre
eed2045189 After pre-check the job was not restored to the original spot 2020-10-16 16:27:51 +02:00
Safihre
6c5c9e0147 After pre-check the job was not restored to the original spot 2020-10-16 16:15:42 +02:00
Safihre
baa9ffb948 Applying Filters to a feed would result in crash
Closes #1634
2020-10-15 18:07:18 +02:00
Safihre
217785bf0f Applying Filters to a feed would result in crash
Closes #1634
2020-10-15 18:07:06 +02:00
Safihre
92541fec23 Allow failure of download_unicode_made_on_windows test due to bug #1633 2020-10-13 12:35:49 +02:00
Safihre
b1f6448ae0 Update import of sabnzbd.getipaddress 2020-10-12 23:52:34 +02:00
Safihre
fc72cf0451 Use same AppVeyor image as used for the releases 2020-10-12 23:18:30 +02:00
Sander
c76d931b01 bonjour/zeroconf improved (#1638)
* bonjour/zeroconf improved

* bonjour/zeroconf improved black formatting

* bonjour/zeroconf improved import
2020-10-12 23:17:56 +02:00
jcfp
02ef37d381 localhost is all of 127.0.0.0/8 not just /16 2020-10-11 11:42:11 +02:00
Safihre
329b420c0d Use same AppVeyor image as used for the releases 2020-10-09 22:43:32 +02:00
SABnzbd Automation
10049d0c1f Update translatable texts 2020-10-09 20:27:13 +00:00
Safihre
1e602d86bd Only start Direct Unpack after all first-articles are recieved 2020-10-09 22:26:23 +02:00
Safihre
f22ab0068e Notify Plush users that the skin is no longer maintained 2020-10-09 09:42:37 +02:00
SABnzbd Automation
3700e45e7f Update translatable texts 2020-10-09 07:37:00 +00:00
Safihre
36196a176e Update text for "Post-Process Only Verified Jobs"
Closes #1632
2020-10-09 09:36:18 +02:00
Safihre
72907de5ef Use newer version of black pipeline 2020-10-08 10:53:11 +02:00
Safihre
9a7385789e Show commit hash when running from GitHub sources 2020-10-07 20:50:25 +02:00
Safihre
d13893d1c7 Direct Unpack parsing was broken
Closes #1630
2020-10-07 20:31:34 +02:00
Safihre
1a8031c75d Use browser URL on last page of Wizard
Closes #1617
2020-10-07 12:35:24 +02:00
Safihre
9d10261a9f Reset decoded_data variable in Decoder and some style changes 2020-10-04 22:27:18 +02:00
Safihre
d0a7ff00fc Reference the right GitHub-issue 2020-10-04 22:27:18 +02:00
Safihre
b80d0ee458 URLGrabber would leave reference to NzbObject 2020-10-04 22:27:18 +02:00
Safihre
53069492b1 Add tests to verify no objects are left in memory after downloading 2020-10-04 22:27:18 +02:00
Safihre
3e2dad4a7e Properly manage all references to Nzo/Nzf/Article objects 2020-10-04 22:27:18 +02:00
Safihre
fca1e5355e Remove unused code 2020-10-02 11:42:49 +02:00
SABnzbd Automation
47c0fd706f Update translatable texts 2020-10-02 09:35:35 +00:00
Safihre
4c4ffb2f54 For reliability use internal webserver to test RSS feed parsing
We already have all the dependencies due to pytest-httpbin
2020-10-02 11:34:43 +02:00
Safihre
6aef50dc5d Update text files for 3.1.0RC3 2020-10-02 11:34:21 +02:00
SABnzbd Automation
ade477c6e5 Update translatable texts 2020-10-02 08:24:35 +00:00
Safihre
719b966709 Reset updated .pot files after pytest 2020-10-02 10:23:37 +02:00
SABnzbd Automation
2085c04717 Update translatable texts 2020-09-30 20:30:08 +00:00
Safihre
12a4e34075 Remove unused global DIR_APPDATA variable 2020-09-30 22:29:27 +02:00
SABnzbd Automation
13dd81ebbd Update translatable texts 2020-09-30 11:56:39 +00:00
Safihre
a9492eb25f Small refactor of the GUI-logger 2020-09-30 13:55:52 +02:00
SABnzbd Automation
4dabbb7590 Update translatable texts 2020-09-29 20:38:18 +00:00
Safihre
64b78bddd6 CI pipeline optimizations
Remove PPA (not needed)
Remove LGTM (not used)
Stop logging all API-requests
2020-09-29 22:37:15 +02:00
Safihre
5a02554380 Allow aborting at any point during external post-processing
Closes #1271
2020-09-29 22:37:15 +02:00
Safihre
c312f3917f Resolve unresolved references
dd
2020-09-29 22:37:15 +02:00
Safihre
30654af261 Scheduler refactor and add additional typing 2020-09-29 22:37:15 +02:00
Safihre
29aa329038 Notify users of Deobfuscate.py that it is now part of SABnzbd 2020-09-29 14:09:04 +02:00
Safihre
16b6e3caa7 Notify users of Deobfuscate.py that it is now part of SABnzbd 2020-09-29 14:08:51 +02:00
Safihre
3de4c99a8a Only set the "Waiting" status when the job hits post-processing
https://forums.sabnzbd.org/viewtopic.php?f=11&t=24969
2020-09-29 13:51:15 +02:00
Safihre
cfbb0d3bf6 Only set the "Waiting" status when the job hits post-processing
https://forums.sabnzbd.org/viewtopic.php?f=11&t=24969
2020-09-29 13:28:31 +02:00
Safihre
980aa19a75 Only run Windows Service code when executed from the executables
Could be made to work with the from-sources code.. But seems like very small usecase.
Closes #1623
2020-09-29 10:42:23 +02:00
Safihre
388f77ea52 Only run Windows Service code when executed from the executables
Could be made to work with the from-sources code.. But seems like very small usecase.
Closes #1623
2020-09-29 10:42:06 +02:00
SABnzbd Automation
139c2f3c14 Update translatable texts 2020-09-28 20:46:14 +00:00
Safihre
dab544bc93 Use HistoryDB as a contextmanager 2020-09-28 22:44:57 +02:00
Safihre
0070fce88d sqlite Row object does not support get-operation 2020-09-28 16:05:04 +02:00
Safihre
c27ecfe339 Revert "Fixes after the RSS and Rating-refactor"
This reverts commit 746de90700.
2020-09-28 15:09:22 +02:00
Safihre
746de90700 Fixes after the RSS and Rating-refactor 2020-09-27 17:57:29 +02:00
Safihre
c580f1aff7 Skip DirectUnpack parsing when there is nothing new yet 2020-09-27 17:57:10 +02:00
Safihre
93b429af8b We do not need to trim incomplete paths on Windows anymore 2020-09-27 17:57:10 +02:00
Safihre
f0e2e783a8 Force UnRar and Multipar to output UTF8 2020-09-27 17:57:10 +02:00
Safihre
fb4b57e056 Update text files for 3.1.0RC2 2020-09-27 17:19:34 +02:00
Safihre
9c2af4281a Set execute bit on Deobfuscate.py 2020-09-27 17:18:47 +02:00
Safihre
03638365ea Set execute bit on Deobfuscate.py 2020-09-27 17:17:30 +02:00
Safihre
157cb1c83d Handle failing RSS-feeds for feedparser 6.0.0+
Closes #1621
Now throws warnings (that can be disabled, helpfull_warnings) if readout failed.
2020-09-27 13:32:38 +02:00
SABnzbd Automation
c12e25217b Update translatable texts 2020-09-27 11:32:35 +00:00
Safihre
d5d0903591 Handle failing RSS-feeds for feedparser 6.0.0+
Closes #1621
Now throws warnings (that can be disabled, helpfull_warnings) if readout failed.
2020-09-27 13:31:51 +02:00
Safihre
72bde214a3 Missed one RSSReader replacement
Closes #1625
2020-09-27 12:46:44 +02:00
Safihre
3ae2cbcd2c Prevent unnecessary trackbacks from Rating.py 2020-09-27 09:29:24 +02:00
Safihre
82b3f210f6 Refactor RSS to fit the rest of the threads 2020-09-27 09:22:51 +02:00
Safihre
b8e67c558d Add NzbRatingV2 to rating.py for backwards compatibility
Closes #1624
2020-09-27 09:02:33 +02:00
Safihre
371bcfbf5b Correct function-calls in scheduler.py
Leftover from previous refactor.
2020-09-27 08:58:34 +02:00
Safihre
d75f1ed966 Small refactor of unpack_history_info 2020-09-26 11:34:49 +02:00
Safihre
5e4c3e0fa4 Small refactor of diskspace function 2020-09-26 10:13:32 +02:00
Safihre
2c2642a92a Small changes to rating.py and additional typing 2020-09-25 15:30:07 +02:00
SABnzbd Automation
afa0a206bc Update translatable texts 2020-09-25 11:47:00 +00:00
Safihre
e51f11c2b1 Do not crash if attributes file is not present 2020-09-25 10:50:19 +02:00
Safihre
1ad0961dd8 Existing files were not parsed when re-adding a job 2020-09-25 10:49:50 +02:00
Safihre
57a8661988 Existing files were not parsed when re-adding a job 2020-09-25 10:49:20 +02:00
Safihre
a57b58b675 Do not crash if attributes file is not present 2020-09-25 10:43:21 +02:00
Safihre
46ff7dd4e2 Do not crash if we can't save attributes, the job might be gone 2020-09-25 10:03:05 +02:00
Safihre
8b051462a8 Do not crash if we can't save attributes, the job might be gone 2020-09-25 10:02:28 +02:00
Safihre
8b067df914 Correctly parse failed_only for Plush 2020-09-23 16:56:57 +02:00
Safihre
3bde8373a3 Correctly parse failed_only for Plush 2020-09-23 16:56:45 +02:00
Safihre
73df161cd0 Remove redundant "do" attribute 2020-09-23 15:40:36 +02:00
Safihre
9c83fd14bc Improve typing hints after rework of main threads 2020-09-23 13:13:36 +02:00
Safihre
ab020a0654 Rework the naming of the main SABnzbd threads 2020-09-23 13:13:36 +02:00
Safihre
14e77f3f9b Add typing hints to some SABnzbd-specific objects and general functions
Bye, Python 3.5.
Also includes fixes that I found because I added these type hints!
2020-09-23 13:13:36 +02:00
SABnzbd Automation
730d717936 Update translatable texts 2020-09-21 20:12:52 +00:00
Safihre
ef43b13272 Assume RarFile parses the correct filepaths for the RAR-volumes
Parsing UTF8 from command-line still fails.
https://forums.sabnzbd.org/viewtopic.php?p=122267#p122267
2020-09-21 22:12:43 +02:00
Safihre
e8e9974224 work_name would not be sanatized when adding NZB's
Closes #1615
Now with tests, yeah.
2020-09-21 22:12:34 +02:00
Safihre
91a7a83cd5 Assume RarFile parses the correct filepaths for the RAR-volumes
Parsing UTF8 from command-line still fails.
https://forums.sabnzbd.org/viewtopic.php?p=122267#p122267
2020-09-21 21:31:25 +02:00
Safihre
6fb586e30f work_name would not be sanatized when adding NZB's
Closes #1615
Now with tests, yeah.
2020-09-20 11:57:29 +02:00
SABnzbd Automation
05b069ab8e Update translatable texts 2020-09-19 09:12:20 +00:00
Safihre
33a9eca696 More text-file updates for 3.2.0-develop 2020-09-19 11:11:38 +02:00
SABnzbd Automation
2b969c987c Update translatable texts 2020-09-19 08:59:41 +00:00
Safihre
f6c15490cc Set version to 3.2.0-develop and drop Python 3.5 support 2020-09-19 10:58:49 +02:00
SABnzbd Automation
da5e95595d Update translatable texts 2020-09-19 08:49:15 +00:00
Safihre
56343b9d19 Update text files for 3.1.0RC1 2020-09-19 10:48:33 +02:00
SABnzbd Automation
d2a4f5cbe5 Update translatable texts 2020-09-18 14:03:31 +00:00
Safihre
bf5f071e9d Show a clear error if user tries to set the Complete Folder as a subfolder of the Complete folder 2020-09-18 16:02:42 +02:00
Sander Jonkers
5d14aac430 deobfuscate: exclude BR files stuff, subdir unittest 2020-09-18 16:02:29 +02:00
Sander
f69f895418 Deobfuscate newfiles (#1612)
* deobfuscate: based on newfiles

* deobfuscate: based on newfiles, black-cleaned

* deobfuscate: yet another black try

* deobfuscate: with upgraded black module

* deobfuscate: improved unittests

* deobfuscate: improved unittests

* deobfuscate: improved unittests

* deobfuscate: removed deobfuscate_dir()

* deobfuscate: extra unittests: lite and nasty

* deobfuscate: black try again

* deobfuscate: black try again, and again
2020-09-16 22:08:10 +02:00
jcfp
e572c34743 show program name and version in tooltip (#1611) 2020-09-14 10:47:46 +02:00
Safihre
feebbb9f04 Merge branch '3.0.x' 2020-09-13 16:40:43 +02:00
Safihre
bc4f06dd1d Limit feedparser<6.0.0 for 3.0.x 2020-09-13 16:40:14 +02:00
SABnzbd Automation
822f3a760f Update translatable texts 2020-09-13 14:39:37 +00:00
Safihre
274c236860 Add Python 3.9 to Travis and limit feedparser for Python 3.5 2020-09-13 16:38:50 +02:00
SABnzbd Automation
29d074732d Update translatable texts 2020-09-13 11:05:24 +00:00
Safihre
097cec5283 Remove fallback in load_attribs
As it was included in 3.0.x, it can already be removed.
2020-09-13 13:01:54 +02:00
Safihre
f0ee73f03b Only check for ratings when rating (indexer integration) is enabled 2020-09-12 17:37:10 +02:00
Safihre
691110af2c Refactor the fetching of the history
Remove "completeness", make sure the active post-proc queue is also filtered.
Closes #595
sdfsdfsd
2020-09-12 17:37:10 +02:00
Safihre
1c7d3cc66d Update text files for 3.1.0Beta2 2020-09-12 11:09:02 +02:00
Safihre
58df97961b Do not crash on par2-only jobs
Closes #1608
2020-09-12 10:49:27 +02:00
Safihre
61cefb3308 Warn about Python 3.5 support being dropped after 3.1.0
Closes #1607
2020-09-12 10:31:43 +02:00
Safihre
694b0178e6 Revert "Add typing hints to some SABnzbd-specific objects"
This reverts commit b143767f8d.
2020-09-12 10:21:53 +02:00
Safihre
48ae414941 Skip counting of downloaded bytes of postponed files
So we no longer see 110/100MB completed.
Articles could keep coming in after the par2 files were already postponed. When postponing the articles the bytes_tried are already decreased.
2020-09-11 17:28:45 +02:00
Safihre
b143767f8d Add typing hints to some SABnzbd-specific objects 2020-09-11 17:26:30 +02:00
Sander
11de24ad4f Deobfuscate final files: more intelligence, default obfuscated = True, (#1603)
* Deobfuscate final files: more intelligence, default obfuscated = True, more unit testing

* Deobfuscate final files: typo's

* Deobfuscate final files: cleanup of is_probably_obfuscated
2020-09-11 16:39:24 +02:00
Safihre
a9c5f2e184 Move priorities constant to constants 2020-09-11 16:08:51 +02:00
Safihre
ed3ad27560 Show version in Windows tray icon tooltip
Closes #1604
2020-09-11 15:56:49 +02:00
Safihre
a6632b6e3e Consistency in build_history_info
Would show long-path notation for active history
2020-09-11 15:56:49 +02:00
SABnzbd Automation
2d49e7b4ce Update translatable texts 2020-09-11 13:31:09 +00:00
Safihre
c097ad828d Rework ArticleCache locking
Closes #1602
2020-09-11 15:29:52 +02:00
Safihre
7125ee469f Correct: Duplicate Detection doesn't look at History filenames
fbb637e5e3
Closes #1601
2020-09-08 12:44:25 +02:00
Safihre
f91646f956 Log when sending a notification 2020-09-08 09:27:09 +02:00
SABnzbd Automation
5bd86b6fb7 Update translatable texts 2020-09-07 14:25:10 +00:00
Safihre
e12ed3e6f1 Style changes of database.py 2020-09-07 16:20:48 +02:00
Safihre
33a5d34bbf Regression: Duplicate Detection doesn't look at History filenames
In py3-merge this code was lost.
fbb637e5e3
2020-09-07 16:05:13 +02:00
SABnzbd Automation
94662f5831 Update translatable texts 2020-09-06 17:07:41 +00:00
Safihre
a37ffe5b4d Remove unnecessary WARNING label workaround 2020-09-06 19:04:14 +02:00
Safihre
fa1b421dad Special files-in-nzb sorting for Unwanted Extensions did not work
And general rework of the sorting.
2020-09-06 19:00:01 +02:00
SABnzbd Automation
93727c52ae Update translatable texts 2020-09-06 14:41:19 +00:00
Safihre
0108730004 Set a maximum on the maximum length of a foldername
Closes #1597
2020-09-06 16:40:39 +02:00
Safihre
10b97e708a Move the parsing of priority=PAUSED when adding NZB's
Closes #1600
2020-09-06 16:27:04 +02:00
SABnzbd Automation
cfa23ca27e Update translatable texts 2020-09-05 09:03:12 +00:00
Safihre
5290eaefc7 Fix styling of mult-edit box
Closes #1596
2020-09-05 11:02:34 +02:00
Safihre
2626b715ab Skip os.makedirs on Windows if the folder already exists
https://bugs.python.org/issue41705
https://forums.sabnzbd.org/viewtopic.php?f=3&t=24939&p=122017
2020-09-03 21:40:54 +02:00
Safihre
99bc350f5f Input for run_command needs to be a list in unrar_check
https://www.reddit.com/r/SABnzbd/comments/ilocdd/unrar_version_warning/
2020-09-03 15:35:04 +02:00
Safihre
ee38441779 On Windows we do need startupinfo in POpen to prevent popups
https://forums.sabnzbd.org/viewtopic.php?f=11&t=24944
2020-09-03 15:29:58 +02:00
Safihre
f0d31e0dc2 Update text files for 3.1.0 Beta 1 2020-09-02 10:48:39 +02:00
Safihre
4a08b47c07 Allow all versions of feedparser again 2020-09-02 10:03:27 +02:00
Safihre
2d588a6498 Disable the relative URL resolver in feedparser
kurtmckee/feedparser/issues/209
2020-09-01 14:52:31 +02:00
Safihre
510ec977b8 Compatibility with feedparser 6.0.0
Closes #1567
2020-09-01 13:54:58 +02:00
Safihre
420a3d385d Let CherryPy handle relative URL-redirection
Need for proxies!
https://forums.sabnzbd.org/viewtopic.php?f=2&t=24925
https://forums.sabnzbd.org/viewtopic.php?f=11&t=24790
2020-09-01 09:29:29 +02:00
Safihre
30185d1dbe Strip slash of the end of url_base as it breaks the code
Closes #1590
2020-08-31 14:00:40 +02:00
Safihre
971e4fc909 Merge branch '3.0.x' 2020-08-30 20:58:31 +02:00
Safihre
51cc765949 Update text files for 3.0.2 2020-08-30 20:50:45 +02:00
Safihre
642f949ae9 Add more locking to ArticleCache
Recieved bug-reports
2020-08-30 20:33:29 +02:00
Safihre
872804e1f4 Remove the article_list from ArticleCache 2020-08-30 20:16:02 +02:00
Safihre
b5a1575d5a Do not crash in Assembler when file already deleted
Relates to #1509
Hopefully it stops the failing tests.
2020-08-30 19:57:02 +02:00
SABnzbd Automation
95197f94be Update translatable texts 2020-08-30 14:05:42 +00:00
Safihre
fedab57f29 Skip repair if all sets were previously verified succesfully
Closes #1580
2020-08-30 16:05:04 +02:00
Safihre
3054c568ac Move Post-Processing notification to the right spot 2020-08-30 15:54:07 +02:00
Safihre
19c6a4fffa Propagation delay label was shown even if no delay was activated 2020-08-29 16:46:16 +02:00
Safihre
c0fcc34f52 Do not use long-path notation in real_path on Windows
Turns out long-path notation makes os.path.abspath not trim the final \ of a path. It does remove it on Linux or on non-long-paths. So we just remove the long path during modification and add it back at the end.
Closes #1588.
2020-08-29 10:09:53 +02:00
Safihre
521e2bd7aa Rename TOP_PRIORITY to FORCE_PRIORITY
To match the front-end naming.
2020-08-29 09:12:18 +02:00
Safihre
db4db08550 Update UnRar to 5.91
Relates to #1544
2020-08-29 09:07:29 +02:00
Safihre
977f0204a7 Update Multipar to 1.3.1.0
Relates to #1544
2020-08-29 09:03:04 +02:00
Safihre
78d12ddb03 Propagation delay label was shown even if no delay was activated 2020-08-28 21:36:49 +02:00
Safihre
105ac32d2f Reading RSS feed with no categories set could result in crash
Closes #1589
2020-08-28 10:16:49 +02:00
Safihre
57550675d2 Removed logging in macOS sabApp that resulted in double logging 2020-08-28 10:16:41 +02:00
Safihre
433dcab02b Update code-style 2020-08-28 10:12:29 +02:00
Safihre
c57563d5ca Reading RSS feed with no categories set could result in crash
Closes #1589
2020-08-28 10:02:43 +02:00
Safihre
fcc4a44695 Removed logging in macOS sabApp that resulted in double logging 2020-08-28 09:52:56 +02:00
Safihre
7d9f9b4d1f Add UTF8 BOM manually to NSIS file 2020-08-26 14:58:38 +02:00
Safihre
f790a9601f Change the macOS power assertion to NoIdleSleep 2020-08-26 08:50:43 +02:00
Safihre
13d44d1ed9 Correct tests for build_and_run_command 2020-08-26 08:49:21 +02:00
Safihre
d57ecd4eaa Add test for build_and_run_command 2020-08-25 15:27:27 +02:00
Safihre
f14e5ba400 No longer use shell=True in Popen-calls on Windows and use python.exe
I cannot find a reason why we should.
2020-08-25 15:27:27 +02:00
SABnzbd Automation
5638f435ba Update translatable texts 2020-08-25 12:12:00 +00:00
Safihre
6b7b8a8203 Refactor usage of Popen-calls 2020-08-25 13:27:14 +02:00
Safihre
942f95364e End-of-queue-script did not run on Windows due to long-path
https://forums.sabnzbd.org/viewtopic.php?f=3&t=24918

Will refactor this so they all call 1 function.
2020-08-24 11:28:25 +02:00
Safihre
e997fb6679 Check if name is a string before switching to nzbfile in addfile
Closes #1584
2020-08-24 09:05:02 +02:00
Safihre
3b8a96de23 Very basic unittests of NZO-object 2020-08-23 09:04:28 +02:00
Safihre
75d6d10649 Link to 3.1.x Configuration pages on Wiki 2020-08-22 17:28:53 +02:00
SABnzbd Automation
26736657fd Update translatable texts 2020-08-22 15:19:19 +00:00
Safihre
27b6194d53 Set version.py to develop again
As not to trigger update checks
2020-08-22 17:18:35 +02:00
SABnzbd Automation
5c158db350 Update translatable texts 2020-08-22 15:15:10 +00:00
Safihre
f54c173479 Refactor Deobfuscate final filenames
Now uses standard SABnzbd functions.
@sanderjo
2020-08-22 17:14:26 +02:00
SABnzbd Automation
d51b337045 Update translatable texts 2020-08-21 18:16:17 +00:00
Safihre
3d693a7b8d Move deobfuscate_final_filenames to Config > Switches
Right where it belongs
2020-08-21 20:15:35 +02:00
Sander
99f34ab71d Deobfuscate / rename final files (#1558)
* Deobfuscate / rename final files

* black formatted ...

* Deobfuscate / rename final files: unittests

* Deobfuscate / rename final files: unittests

* Deobfuscate / rename final files: unittests formatting

* Deobfuscate / rename final files: unittests of real renaming

* Deobfuscate / rename final files: unittests of real renaming - black formatting ...

* Deobfuscate / rename final files: unittests of real renaming - no subdir "data" as travis was complaining

* Deobfuscate / rename final files: into other directory, nicer logging, nicer naming

* Deobfuscate / rename final files: black formatting

* Deobfuscate / rename final files: other order of tests

* Deobfuscate / rename final files: only if all_ok and not nzb_list

* Deobfuscate final files: retry commit

* Deobfuscate final files: feedback from Safihre

* Deobfuscate final files: create option in Special interface

* deobfuscate filenames: better logging, typo's
2020-08-21 19:54:50 +02:00
SABnzbd Automation
cd2f95ac90 Update translatable texts 2020-08-21 17:44:51 +00:00
Safihre
bacea59c0c Remove ABOUT.txt as all info is in README 2020-08-21 19:43:39 +02:00
SABnzbd Automation
f7e84a8f11 Update translatable texts 2020-08-21 13:22:05 +00:00
Safihre
1452ddd5e4 Do not crash if certifi certificates are not available
This could happen on Windows, due to overactive virus scanners
2020-08-21 15:21:21 +02:00
Safihre
abdbdd63f4 Priority was not parsed correctly if supplied as string 2020-08-21 15:08:39 +02:00
Safihre
a92d2b585e Permissions would be set even if user didn't set any
Windows developers like me shouldn't do permissions stuff..
2020-08-21 15:04:46 +02:00
Safihre
3dae1bd104 Converting jobs from 3.0.1 to 3.0.2/3.1.0 would fail 2020-08-20 11:23:53 +02:00
Safihre
e07c0c0981 Set version to 3.1.0-develop 2020-08-19 22:22:28 +02:00
Safihre
b7dcd051b1 Split the make_mo.py command for NSIS 2020-08-19 22:21:19 +02:00
Safihre
25223c8b85 Make sure we force the final_name to string on legacy get_attrib_file 2020-08-19 16:20:46 +02:00
Safihre
d7b1a73777 NzbFile comparison could crash when comparing finished_files
https://forums.sabnzbd.org/viewtopic.php?f=3&t=24902&p=121748
2020-08-19 08:37:10 +02:00
Safihre
df19d4d323 Extend tests of create_all_dirs to cover apply_umask=False 2020-08-18 13:59:39 +02:00
Safihre
41ca217931 Merge branch '3.0.x' 2020-08-18 11:05:50 +02:00
Safihre
10bc4ed611 Combine pip calls 2020-08-17 15:37:00 +02:00
Safihre
b063055e78 Redesigned the saving of attributes
Now uses pickle, so that the type of the property is preserved.
Made flexible, so that more properties can be easily added later.
Closes #1575
2020-08-16 18:27:29 +02:00
jcfp
4f1f422701 set appname for notify2 2020-08-16 16:43:17 +02:00
SABnzbd Automation
7e44a3759f Update translatable texts 2020-08-16 07:53:43 +00:00
Safihre
0a5a4ec0da List Cheetah minimal version in requirements.txt 2020-08-16 09:52:53 +02:00
SABnzbd Automation
c9a5280c7a Update translatable texts 2020-08-16 07:06:42 +00:00
Safihre
c953498a9d Correct spelling error warning_helpful
1f554816b6
Thanks @albino1
2020-08-16 09:05:58 +02:00
SABnzbd Automation
c0ec8fcea2 Update translatable texts 2020-08-15 06:33:49 +00:00
Safihre
7562444763 Convert functions to staticmethod if applicable 2020-08-14 22:45:34 +02:00
Safihre
747add419e Permissions should only be applied if requested
Corrects 050b925f7b
2020-08-14 22:41:00 +02:00
Safihre
f242053d6c Also parse warning_helpfull correctly for translations 2020-08-14 22:27:09 +02:00
Safihre
235df91a37 Improvements for "Redesigned job availability-check"
Always check for every failed article. Fixed bug in loading of NZO from pickled files.
2020-08-14 22:25:26 +02:00
Safihre
97ffa0bac2 Temporarily set cheroot version due to it breaking our tests
cherrypy/cheroot/issues/312
2020-08-14 15:22:22 +02:00
Safihre
c6bc7d93f4 Redesigned job availability-check
Closes #1505
More efficient and works on single-file-jobs
2020-08-14 15:11:59 +02:00
SABnzbd Automation
bcc7573756 Update translatable texts 2020-08-12 15:34:17 +00:00
Safihre
1f554816b6 Add option to disable helpful warnings
Closes #1112
2020-08-12 17:33:35 +02:00
Safihre
411463bc57 All Errors and Warnings should be translated 2020-08-12 17:07:28 +02:00
Safihre
1c26685c8c Remove unused parameter of bpsmeter.update 2020-08-12 16:42:58 +02:00
Safihre
1dd4afa5e2 Generalize use of certifi module 2020-08-12 10:45:48 +02:00
Safihre
f9d4477cb1 Basic authentication option was broken
Closes #1571
2020-08-10 15:32:52 +02:00
Safihre
6cbee09950 Also retry "Access Denied" on Windows due to virus scanners
Closes #1569
2020-08-09 17:50:44 +02:00
Safihre
bcf6a5bd09 Permissions were not set correctly when creating directories (#1568)
Restores changes made in d2e0ebe
2020-08-07 15:22:27 +02:00
Safihre
0087940898 Merge branch '3.0.x' into master 2020-08-02 09:46:41 +02:00
kaiffeetasse
a00092f5cc Also find passwords which are not at the end of the file (#1562)
* Also find passwords which are not at the end of the file

* reformat file according to black code formatter

* Revert "reformat file according to black code formatter"

This reverts commit c7b16a12

* reformat file according to sabnzbd code conventions in black code formatter

* add tests for scan_password in nzbstuff.py

* add instructions on how to format code when contributing to this repo

* Revert "add instructions on how to format code when contributing to this repo"

This reverts commit ef6efd25

* add tests for file name extraction

* fix tests
2020-08-01 15:01:17 +02:00
Safihre
b36b345ef3 Function from_units should always return float
Probably closes #1557
2020-07-20 08:39:43 +02:00
Safihre
029d97e21c Add forgotten value for new notification option on MacOS
Oopsie
68ad931728
2020-07-19 22:17:03 +02:00
SABnzbd Automation
13331e0709 Update translatable texts 2020-07-19 16:38:28 +00:00
Safihre
68ad931728 Added separated notification for "Added NZB" and "Pause / Resume"
Closes #1049
2020-07-19 18:37:46 +02:00
Safihre
475aa60bcd Update translate-link in SABnzbd 2020-07-19 13:01:27 +02:00
Safihre
2937d8a022 Password input box on "Add NZB" screen
Closes #1554
2020-07-19 09:30:21 +02:00
Safihre
6627510a59 Default-text for Automatically sort queue 2020-07-16 22:29:21 +02:00
Safihre
ac9448cacc RAR-renamer should be run on badly named RAR-files
https://forums.sabnzbd.org/viewtopic.php?f=2&t=24514&p=121433
2020-07-15 14:02:10 +02:00
Safihre
2d7b6717a9 Only really run pre-script when it is set 2020-07-12 14:20:44 +02:00
Safihre
c4aad2a4bd Always use Default-priority when creating NZB-objects
Closes #1552
2020-07-12 14:02:42 +02:00
Safihre
4566f23984 Revert "Use pyOpenSSL for HTTPS in CherryPy"
This reverts commit 084b2b357f.
2020-07-12 08:44:24 +02:00
Safihre
b6621fc333 Feedparser 6.0.0 not yet supported
Our custom parsers need to be ported for Feedparser 6.0.0 support.
2020-07-04 11:14:29 +02:00
Safihre
084b2b357f Use pyOpenSSL for HTTPS in CherryPy
Closes #1548, #1519
2020-07-04 11:11:38 +02:00
Safihre
aa5c63f467 Run Transifex push/pull in GitHub actions
The GitHub integration of Transifex isn't feature-complete. Using the client on every commit gives us more control over all the settings.
2020-07-01 20:23:22 +02:00
Safihre
c365065cdb Search-icon would be shown on top of drop-downs
Closes #1545
2020-06-30 12:57:48 +02:00
Safihre
e4a42de095 Always report API paused status as a boolean
Closes #1542
2020-06-30 10:26:06 +02:00
SABnzbd Automation
245935b7ac Update translatable texts 2020-06-29 15:58:04 +00:00
Safihre
2540a8174f Squashed Transifex update (3) 2020-06-29 17:57:22 +02:00
SABnzbd Automation
38c0a75759 Update translatable texts 2020-06-29 11:56:29 +00:00
Safihre
eac5f20937 Use GNU gettext formatting for POT-translation files 2020-06-29 13:56:06 +02:00
transifex-integration[bot]
a71a2a7a4b Translate /po/main/SABnzbd.pot in fr
translation completed for the source file '/po/main/SABnzbd.pot'
on the 'fr' language.
2020-06-28 10:44:51 +00:00
SABnzbd Automation
856fdd3493 Update translatable texts 2020-06-28 10:25:00 +00:00
Safihre
cbd54bdfe8 Add Github workflow to automatically update translatable texts 2020-06-28 12:24:00 +02:00
Safihre
f294f8c740 Unify header used in POT-files
Removing header generated by pygettext so it doesn't change all the time
2020-06-28 12:19:19 +02:00
transifex-integration[bot]
3079976165 Translate /po/main/SABnzbd.pot in de
translation completed for the source file '/po/main/SABnzbd.pot'
on the 'de' language.
2020-06-28 08:42:46 +00:00
Safihre
020005e89b Squashed Transifex update (2) 2020-06-28 09:46:23 +02:00
Safihre
b73a6d2a7f Squashed Transifex update
Oops, sorry guys.. Setting up the new service takes a bit of trial and error.
2020-06-27 23:06:52 +02:00
Safihre
af5acd16f7 Correct translation template file 2020-06-27 21:17:09 +02:00
transifex-integration[bot]
9d98dbb2a6 Translate /po/main/SABnzbd.pot in he
translation completed for the source file '/po/main/SABnzbd.pot'
on the 'he' language.
2020-06-27 17:05:20 +00:00
Safihre
01406ca2e7 Switch to Transifex for translations 2020-06-27 19:00:09 +02:00
Safihre
8f21533e76 Set version to 2.3.9 2019-05-24 11:39:14 +02:00
Safihre
89996482a1 Merge branch '2.3.x' 2019-05-24 09:33:12 +02:00
Safihre
03c10dce91 Update text files for 2.3.9 2019-05-24 09:32:34 +02:00
Safihre
bd5331be05 Merge branch 'develop' into 2.3.x 2019-05-24 09:12:02 +02:00
Safihre
46e1645289 Correct typo in release notes 2019-05-18 10:56:39 +02:00
Safihre
4ce3965747 Update text files for 2.3.9RC2 2019-05-18 09:56:05 +02:00
Safihre
9d4af19db3 Merge branch 'develop' into 2.3.x 2019-05-18 09:45:20 +02:00
Safihre
48e034f4be Update text files for 2.3.9RC1 2019-05-07 13:50:20 +02:00
Safihre
f8959baa2f Revert "Notify develop-users that we will switch to Python 3"
This reverts commit fb238af7de.
2019-05-07 13:35:13 +02:00
Safihre
8ed5997eae Merge branch 'develop' into 2.3.x 2019-05-07 13:10:10 +02:00
Safihre
daf9f50ac8 Set version to 2.3.8 2019-03-18 11:10:56 +01:00
Safihre
6b11013c1a Merge branch '2.3.x' 2019-03-18 11:09:35 +01:00
327 changed files with 29226 additions and 23532 deletions

View File

View File

@@ -7,14 +7,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Black Code Formatter
uses: lgeiger/black-action@v1.0.1
uses: lgeiger/black-action@master
with:
args: >
SABnzbd.py
sabnzbd
scripts
tools
builder
tests
--line-length=120
--target-version=py35
--target-version=py36
--check
--diff

114
.github/workflows/build_release.yml vendored Normal file
View File

@@ -0,0 +1,114 @@
name: Build binaries and source distribution
on: [push, pull_request]
jobs:
build_windows:
name: Build Windows binary
runs-on: windows-latest
env:
AUTOMATION_GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9 (64bit)
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Install Python dependencies (64bit)
run: |
python --version
pip install --upgrade pip wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -r builder/requirements.txt
- name: Build source distribution
run: python builder/package.py source
- name: Upload source distribution
uses: actions/upload-artifact@v2
with:
path: "*-src.tar.gz"
name: Source distribution
- name: Build Windows standalone binary and installer (64bit)
run: python builder/package.py installer
- name: Upload Windows standalone binary (64bit)
uses: actions/upload-artifact@v2
with:
path: "*-win64-bin.zip"
name: Windows Windows standalone binary (64bit)
- name: Upload Windows installer (64bit)
uses: actions/upload-artifact@v2
with:
path: "*-win-setup.exe"
name: Windows installer
- name: Set up Python 3.8 (32bit and legacy)
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x86
- name: Install Python dependencies (32bit and legacy)
run: |
python --version
pip install --upgrade pip wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -r builder/requirements.txt
- name: Build Windows standalone binary (32bit and legacy)
run: python builder/package.py binary
- name: Upload Windows standalone binary (32bit and legacy)
uses: actions/upload-artifact@v2
with:
path: "*-win32-bin.zip"
name: Windows Windows standalone binary (32bit and legacy)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python builder/package.py release
build_macos:
name: Build macOS binary
runs-on: macos-latest
env:
SIGNING_AUTH: ${{ secrets.SIGNING_AUTH }}
NOTARIZATION_USER: ${{ secrets.NOTARIZATION_USER }}
NOTARIZATION_PASS: ${{ secrets.NOTARIZATION_PASS }}
AUTOMATION_GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
# If updated, make sure to also set LSMinimumSystemVersion in SABnzbd.spec
PYTHON_VERSION: 3.9.7
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- uses: actions/checkout@v2
- name: Cache Python download
id: cache-python-download
uses: actions/cache@v2
with:
path: ~/python.pkg
key: macOS-Python-${{ env.PYTHON_VERSION }}
- name: Get Python
if: steps.cache-python-download.outputs.cache-hit != 'true'
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg -o ~/python.pkg
- name: Install Python
run: sudo installer -pkg ~/python.pkg -target /
- name: Install Python dependencies
run: |
python3 --version
pip3 install --upgrade pip wheel
pip3 install --upgrade -r requirements.txt
pip3 install --upgrade -r builder/requirements.txt
- name: Import macOS codesign certificates
uses: apple-actions/import-codesign-certs@v1
if: env.SIGNING_AUTH
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Build macOS binary
run: |
python3 builder/package.py app
python3 builder/make_dmg.py
- name: Upload macOS binary
uses: actions/upload-artifact@v2
with:
path: "*-osx.dmg"
name: macOS binary (not notarized)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python3 builder/package.py release

View File

@@ -0,0 +1,40 @@
name: CI Tests
on: [push, pull_request]
jobs:
test:
name: Test ${{ matrix.name }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-20.04]
include:
# TODO: Update to 3.10 when all packages are available, currently lxml is missing
- name: macOS
os: macos-latest
python-version: "3.9"
- name: Windows
os: windows-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
if: runner.os == 'Linux'
run: sudo apt-get install unrar p7zip-full par2 chromium-chromedriver
- name: Install Python dependencies
run: |
python --version
pip install --upgrade pip wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -r tests/requirements.txt
- name: Test SABnzbd
run: pytest -s

36
.github/workflows/translations.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Update translatable texts
on:
push:
branches:
- develop
jobs:
translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate translatable texts
run: |
python3 tools/extract_pot.py
- name: Install Transifex client
# Sudo is needed to link the "tx"-command
run: |
sudo -H python3 -m pip install setuptools wheel
sudo -H python3 -m pip install transifex-client
- name: Push/pull Transifex translations
run: |
tx push --source --parallel
tx pull --all --force --parallel
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Compile translations to validate them
run: |
python3 tools/make_mo.py
- name: Push translatable and translated texts back to repo
uses: stefanzweifel/git-auto-commit-action@v4.5.1
with:
commit_message: Update translatable texts
commit_user_name: SABnzbd Automation
commit_user_email: bugs@sabnzbd.org
commit_author: SABnzbd Automation <bugs@sabnzbd.org>

3
.gitignore vendored
View File

@@ -31,6 +31,9 @@ SABnzbd-*/
*.wp[ru]
.idea
# VScode
.vscode/
# Testing folders
.cache
.xprocess

View File

@@ -1,7 +0,0 @@
path_classifiers:
oldinterfaces:
- interfaces/smpl
- interfaces/Plush
library:
- "*knockout*"
- "**/*min*"

View File

@@ -1,46 +0,0 @@
matrix:
include:
# On Linux we test all supported Python versions
# On macOS we only test the semi-recent version that is included
- os: linux
language: python
python: "3.5"
- os: linux
language: python
python: "3.6"
- os: linux
language: python
python: "3.7"
- os: linux
language: python
python: "3.8"
- os: osx
addons:
chrome: stable
env:
- HOMEBREW_NO_AUTO_UPDATE=1
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
LATEST_CHROMEDRIVER=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) &&
wget --no-verbose -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_mac64.zip &&
sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
else
sudo add-apt-repository ppa:jcfp -y;
sudo apt-get update -q;
sudo apt-get install unrar p7zip-full par2 chromium-chromedriver -y;
ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver;
fi;
- python3 --version
- python3 -m pip install --upgrade pip
- python3 -m pip install --upgrade wheel
- python3 -m pip install --upgrade -r requirements.txt
- python3 -m pip install --upgrade -r tests/requirements.txt
script:
- python3 -m pytest -s
notifications:
email:
on_success: never
on_failure: change

24
.tx/config Normal file
View File

@@ -0,0 +1,24 @@
[main]
host = https://www.transifex.com
[sabnzbd-translations.po-main-sabnzbd-pot--develop]
file_filter = po/main/<lang>.po
minimum_perc = 0
source_file = po/main/SABnzbd.pot
source_lang = en
type = PO
[sabnzbd-translations.po-email-sabemail-pot--develop]
file_filter = po/email/<lang>.po
minimum_perc = 0
source_file = po/email/SABemail.pot
source_lang = en
type = PO
[sabnzbd-translations.po-nsis-sabnsis-pot--develop]
file_filter = po/nsis/<lang>.po
minimum_perc = 0
source_file = po/nsis/SABnsis.pot
source_lang = en
type = PO

View File

@@ -1,16 +0,0 @@
*******************************************
*** This is SABnzbd ***
*******************************************
SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically,
thanks to its friendly web-based user interface and advanced
built-in post-processing options that automatically verify, repair,
extract and clean up posts downloaded from Usenet.
SABnzbd also has a fully customizable user interface,
and offers a complete API for third-party applications to hook into.
There is an extensive Wiki on the use of SABnzbd.
https://sabnzbd.org/wiki/
Please also read the file "ISSUES.txt"

View File

@@ -1,5 +1,5 @@
(c) Copyright 2007-2020 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2021 by "The SABnzbd-team" <team@sabnzbd.org>
The SABnzbd-team is:

View File

@@ -1,10 +1,10 @@
SABnzbd 3.0.0
SABnzbd
-------------------------------------------------------------------------------
0) LICENSE
-------------------------------------------------------------------------------
(c) Copyright 2007-2020 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2021 by "The SABnzbd-team" <team@sabnzbd.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -41,7 +41,7 @@ Use the "Help" button in the web-interface to be directed to the Help Wiki.
-------------------------------------------------------------------------------
3) INSTALL pre-built macOS binaries
-------------------------------------------------------------------------------
Download the DMG file, mount and drag the SABnzbd icon to Programs.
Download the DMG file, mount and drag the SABnzbd icon to Applications.
Just like you do with so many apps.
-------------------------------------------------------------------------------
@@ -52,7 +52,7 @@ Specific guides to install from source are available for Windows and macOS:
https://sabnzbd.org/wiki/installation/install-macos
https://sabnzbd.org/wiki/installation/install-from-source-windows
Only Python 3.5 and above is supported.
Only Python 3.6 and above is supported.
On Linux systems you need to install:
par2 unrar unzip python3-setuptools python3-pip

View File

@@ -14,15 +14,15 @@
For these the server blocking method is not very favourable.
There is an INI-only option that will limit blocks to 1 minute.
no_penalties = 1
See: https://sabnzbd.org/wiki/configuration/3.0/special
See: https://sabnzbd.org/wiki/configuration/3.4/special
- Some third-party utilties try to probe SABnzbd API in such a way that you will
often see warnings about unauthenticated access.
If you are sure these probes are harmless, you can suppress the warnings by
setting the option "api_warnings" to 0.
See: https://sabnzbd.org/wiki/configuration/3.0/special
See: https://sabnzbd.org/wiki/configuration/3.4/special
- On OSX you may encounter downloaded files with foreign characters.
- On macOS you may encounter downloaded files with foreign characters.
The par2 repair may fail when the files were created on a Windows system.
The problem is caused by the PAR2 utility and we cannot fix this now.
This does not apply to files inside RAR files.
@@ -33,25 +33,14 @@
We cannot solve this problem, because the Operating System (read Windows)
prevents the removal.
- Memory usage can sometimes have high peaks. This makes using SABnzbd on very low
memory systems (e.g. a NAS device or a router) a challenge.
In particular on Synology (SynoCommunity) the device may report that SABnzbd is using
a lot of memory even when idle. In this case the memory is usually not actually used by
SABnzbd and will be available if required by other apps or the system. More information
can be found in the discussion here: https://github.com/SynoCommunity/spksrc/issues/2856
- SABnzbd is not compatible with some software firewall versions.
The Microsoft Windows Firewall works fine, but remember to tell this
firewall that SABnzbd is allowed to talk to other computers.
- When SABnzbd cannot send notification emails, check your virus scanner,
firewall or security suite. It may be blocking outgoing email.
- When you are using external drives or network shares on OSX or Linux
- When you are using external drives or network shares on macOS or Linux
make sure that the drives are mounted.
The operating system will simply redirect your files to alternative locations.
You may have trouble finding the files when mounting the drive later.
On OSX, SABnzbd will not create new folders in /Volumes.
On macOS, SABnzbd will not create new folders in /Volumes.
The result will be a failed job that can be retried once the volume has been mounted.
- If you use a mounted drive as "temporary download folder", it must be present when SABnzbd

View File

@@ -1,4 +1,4 @@
(c) Copyright 2007-2020 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2021 by "The SABnzbd-team" <team@sabnzbd.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: SABnzbd
Version: 3.0.2RC2
Summary: SABnzbd-3.0.2RC2
Version: 3.4.2
Summary: SABnzbd-3.4.2
Home-page: https://sabnzbd.org
Author: The SABnzbd Team
Author-email: team@sabnzbd.org

View File

@@ -1,11 +1,11 @@
SABnzbd - The automated Usenet download tool
============================================
[![Travis CI](https://travis-ci.org/sabnzbd/sabnzbd.svg?branch=develop)](https://travis-ci.org/sabnzbd/sabnzbd)
[![AppVeryor](https://ci.appveyor.com/api/projects/status/github/sabnzbd/sabnzbd?svg=true&branch=develop)](https://ci.appveyor.com/project/Safihre/sabnzbd)
[![Snap Status](https://build.snapcraft.io/badge/sabnzbd/sabnzbd.svg)](https://snapcraft.io/sabnzbd)
![CI tests](https://github.com/sabnzbd/sabnzbd/workflows/CI%20Tests/badge.svg)
![Build binaries](https://github.com/sabnzbd/sabnzbd/workflows/Build%20binaries%20and%20source%20distribution/badge.svg)
[![License](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
SABnzbd is an Open Source Binary Newsreader written in Python.
It's totally free, easy to use, and works practically everywhere.
@@ -18,8 +18,8 @@ If you want to know more you can head over to our website: https://sabnzbd.org.
SABnzbd has a few dependencies you'll need before you can get running. If you've previously run SABnzbd from one of the various Linux packages, then you likely already have all the needed dependencies. If not, here's what you're looking for:
- `python` (Python 3.5 and higher, often called `python3`)
- Python modules listed in `requirements.txt`
- `python` (Python 3.6 and higher, often called `python3`)
- Python modules listed in `requirements.txt`. Install with `python3 -m pip install -r requirements.txt -U`
- `par2` (Multi-threaded par2 installation guide can be found [here](https://sabnzbd.org/wiki/installation/multicore-par2))
- `unrar` (make sure you get the "official" non-free version of unrar)

View File

@@ -1,74 +1,46 @@
Release Notes - SABnzbd 3.0.2 RC 2
Release Notes - SABnzbd 3.4.2
=========================================================
## Bugfixes since 3.0.1
- Priority was not parsed correctly if supplied as through the API.
- API-call `addfile` could fail if `name` and `nzbfile` were used.
- Permissions were still not set correctly when creating directories.
- Jobs with numeric names could crash post-processing.
- Jobs with missing articles could result in crash.
- macOS: changed the power assertion to `NoIdleSleep`.
- Windows: end-of-queue-script did not run on Windows.
- Windows: crash if the virus scanner removed the certificate bundle.
## Bugfixes since 3.4.1
- Sorting requires at least 1 category to be selected since 3.4.0.
Warning will be shown if no category is selected.
- Sorting would fail if `%ext` or `%fn` was not used.
- Job failure due to Sorting-problems was not shown in the History.
- `Ignore Samples` did not remove all sample files.
- Crash when `.par2` files were missing during download.
- Prevent scanning the whole file to identify the correct extension.
- `.rXX`, `.cbz` and `.cbr` extensions were wrongly renamed.
- Processing unpacked `.par2` files would also process source
`.par2` files and could result in duplicate (`.1`) filenames.
- Always show the number of MB missing during download.
## Bugfixes since 3.0.0
- Basic Authentication resulted in crash.
- Permissions were not set correctly when creating directories.
- Windows: base SSL certificate bundle was not included.
## Bugfixes since 3.4.0
- macOS: Failed to run on M1 systems or older macOS versions.
## About the new major version
We have been working for months to upgrade the SABnzbd code from Python 2 to Python 3.
Although it might not sound like a big change, we had to rewrite almost every part of
the code. We also included a number of new features, listed below.
## Changes since 3.3.1
- Extended `Deobfuscate final filenames` to attempt to set the correct
file extension based on the file signature if the file extension is
not present or meaningless.
- Added additional pattern keys that can be used in the `Sort String`
for Sorting, by using the `guessit` package internally for parsing.
- If unpacked files contain `.par2` files they will always be read and
used to rename any matching files.
- Regular expressions can be used to specify `Unwanted extensions`.
- Not all passwords will be tried if a matching one was found.
- Some interface-only options were added as API-call.
- The Plush skin has been removed.
## Big changes in 3.0.0
- Python 3.5 and above are the only supported versions of Python.
- Cache handling is greatly improved, resulting in more stable speeds on some systems.
- Articles failing with CRC errors are now retried on other servers.
- SFV files, even obfuscated, will be used for renaming when there are no par2 files.
- Fully obfuscated RAR-sets with no verification files are detected and extracted.
- Built-in internet bandwidth test.
- Windows Service support was changed. The service will need to be reinstalled!
Documentation: https://sabnzbd.org/wiki/advanced/sabnzbd-as-a-windows-service
- The Windows installer is 64-bit only, for 32-bit please use the standalone package.
## Other changes since 2.3.9
- Files inside an NZB that are fully identical are now skipped automatically.
- Folders of jobs that failed post-processing are renamed to `_FAILED_`.
- Blocking of unwanted extensions that are directly inside an NZB.
- In Python 3 OpenSSL 1.1.1 is used for Windows and macOS, as a result
newsservers manually set to `RC4-MD5` cipher can no longer connect.
Documentation: https://sabnzbd.org/wiki/advanced/ssl-ciphers
- TLS1.3 support for newsserver connections.
- SABYenc, par2 and unrar are now required to start downloading.
- Growl-support was removed.
- The `smpl` skin was removed.
- Using the API with `output=text` to add NZB's will report the `nzo_ids` instead of `ok`.
- Queue-item labels are no longer part of the name but separated in API-property `labels`.
- API-calls `tapi` and `qstatus` were removed.
- On Windows only Multipar is available for repair.
- Linux tray icon support was improved.
- On Linux special permission bits are removed from files after download.
- macOS features such as the menu and notifications now use native code.
## Bugfixes since 2.3.9
- Resolved potential security issue in FAT-filesystem check and Nice and IONice Parameters.
More information: https://github.com/sabnzbd/sabnzbd/security/advisories/GHSA-9x87-96gg-33w2
- Sample removal did not work if only 1 sample file was present.
- Crash on badly formatted RSS-feeds or readout during editing.
- Only really run pre-queue-script when it is set.
- Always report API `paused` status as a boolean.
- Automatic aborting of jobs that can't be completed would sometimes not trigger.
- Windows systems could enter standby state during downloading.
- Some errors thrown by unrar were not caught.
- Files and sockets were not always closed correctly.
- Unwanted extension check was overly aggressively deleting folders
## Bugfixes since 3.3.1
- Duplicate check based on `.nzb` MD5 was performed before it was calculated.
- Enforce `local_ranges` for broadcasts (Bonjour/SSDP).
- Correctly parse the filename in `Content-Disposition` header.
- `Warning` instead of `Info` when there is a restart due to crashed thread.
- Only run Direct Unpack if `enable_unrar` is enabled.
## Upgrade notices
- When upgrading from 2.x.x or older the queue will be converted. Job order,
settings and data will be preserved, but if you decide to go back to 2.x.x
your queue cannot be downgraded again. But you can restore the jobs by going
to the Status page and running Queue Repair.
- The download statistics file `totals10.sab` is updated in 3.2.x
version. If you downgrade to 3.1.x or lower, all detailed download
statistics will be lost.
## Known problems and solutions
- Read the file "ISSUES.txt"
@@ -80,4 +52,4 @@ the code. We also included a number of new features, listed below.
that automatically verify, repair, extract and clean up posts downloaded
from Usenet.
(c) Copyright 2007-2020 by "The SABnzbd-team" \<team@sabnzbd.org\>
(c) Copyright 2007-2021 by "The SABnzbd-team" \<team@sabnzbd.org\>

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
environment:
# We only test the latest Python version
matrix:
- PYTHON: "C:\\Python38-x64"
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- python -m pip install --upgrade pip
- python -m pip install --upgrade wheel
- python -m pip install --upgrade -r requirements.txt
- python -m pip install --upgrade -r tests/requirements.txt
build_script:
- python -m pytest -s

189
builder/SABnzbd.spec Normal file
View File

@@ -0,0 +1,189 @@
# -*- mode: python -*-
import re
import sys
import pkginfo
from PyInstaller.building.api import EXE, COLLECT, PYZ
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.osx import BUNDLE
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
# Add extra files in the PyInstaller-spec
extra_pyinstaller_files = []
# Also modify these in "package.py"!
extra_files = [
"README.txt",
"INSTALL.txt",
"LICENSE.txt",
"GPL2.txt",
"GPL3.txt",
"COPYRIGHT.txt",
"ISSUES.txt",
"PKG-INFO",
]
extra_folders = [
"scripts/",
"licenses/",
"locale/",
"email/",
"interfaces/Glitter/",
"interfaces/wizard/",
"interfaces/Config/",
"scripts/",
"icons/",
]
# Get the version
RELEASE_VERSION = pkginfo.Develop(".").version
# Add hidden imports
extra_hiddenimports = ["Cheetah.DummyTransaction", "cheroot.ssl.builtin", "certifi"]
extra_hiddenimports.extend(collect_submodules("babelfish.converters"))
# Add platform specific stuff
if sys.platform == "darwin":
extra_hiddenimports.extend(["pyobjc", "objc", "PyObjCTools"])
# macOS folders
extra_folders += ["osx/par2/", "osx/unrar/", "osx/7zip/"]
# Add NZB-icon file
extra_pyinstaller_files.append(("builder/osx/image/nzbfile.icns", "."))
# Version information is set differently on macOS
version_info = None
else:
# Build would fail on non-Windows
from PyInstaller.utils.win32.versioninfo import (
VSVersionInfo,
FixedFileInfo,
StringFileInfo,
StringTable,
StringStruct,
VarFileInfo,
VarStruct,
)
# Windows
extra_hiddenimports.append("win32timezone")
extra_folders += ["win/multipar/", "win/unrar/", "win/7zip/"]
# Parse the version info
version_regexed = re.search(r"(\d+)\.(\d+)\.(\d+)([a-zA-Z]*)(\d*)", RELEASE_VERSION)
version_tuple = (int(version_regexed.group(1)), int(version_regexed.group(2)), int(version_regexed.group(3)), 0)
# Detailed instructions are in the PyInstaller documentation
# We don't include the alpha/beta/rc in the counters
version_info = VSVersionInfo(
ffi=FixedFileInfo(
filevers=version_tuple,
prodvers=version_tuple,
mask=0x3F,
flags=0x0,
OS=0x40004,
fileType=0x1,
subtype=0x0,
date=(0, 0),
),
kids=[
StringFileInfo(
[
StringTable(
"040904B0",
[
StringStruct("Comments", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("CompanyName", "The SABnzbd-Team"),
StringStruct("FileDescription", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("FileVersion", RELEASE_VERSION),
StringStruct("LegalCopyright", "The SABnzbd-Team"),
StringStruct("ProductName", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("ProductVersion", RELEASE_VERSION),
],
)
]
),
VarFileInfo([VarStruct("Translation", [1033, 1200])]),
],
)
# Process the extra-files and folders
for file_item in extra_files:
extra_pyinstaller_files.append((file_item, "."))
for folder_item in extra_folders:
extra_pyinstaller_files.append((folder_item, folder_item))
# Add babelfish data files
extra_pyinstaller_files.extend(collect_data_files("babelfish"))
extra_pyinstaller_files.extend(collect_data_files("guessit"))
pyi_analysis = Analysis(
["SABnzbd.py"],
datas=extra_pyinstaller_files,
hiddenimports=extra_hiddenimports,
excludes=["FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter"],
)
pyz = PYZ(pyi_analysis.pure, pyi_analysis.zipped_data)
exe = EXE(
pyz,
pyi_analysis.scripts,
[],
exclude_binaries=True,
name="SABnzbd",
upx=True,
console=False,
append_pkg=False,
icon="icons/sabnzbd.ico",
version=version_info,
)
coll = COLLECT(exe, pyi_analysis.binaries, pyi_analysis.zipfiles, pyi_analysis.datas, name="SABnzbd")
# We need to run again for the console-app
if sys.platform == "win32":
# Enable console=True for this one
console_exe = EXE(
pyz,
pyi_analysis.scripts,
[],
exclude_binaries=True,
name="SABnzbd-console",
upx=True,
append_pkg=False,
icon="icons/sabnzbd.ico",
version=version_info,
)
console_coll = COLLECT(
console_exe,
pyi_analysis.binaries,
pyi_analysis.zipfiles,
pyi_analysis.datas,
upx=True,
name="SABnzbd-console",
)
# Build the APP on macOS
if sys.platform == "darwin":
info_plist = {
"NSUIElement": 1,
"NSPrincipalClass": "NSApplication",
"CFBundleShortVersionString": RELEASE_VERSION,
"NSHumanReadableCopyright": "The SABnzbd-Team",
"CFBundleIdentifier": "org.sabnzbd.sabnzbd",
"CFBundleDocumentTypes": [
{
"CFBundleTypeExtensions": ["nzb"],
"CFBundleTypeIconFile": "nzbfile.icns",
"CFBundleTypeMIMETypes": ["text/nzb"],
"CFBundleTypeName": "NZB File",
"CFBundleTypeRole": "Viewer",
"LSTypeIsPackage": 0,
"NSPersistentStoreTypeKey": "Binary",
}
],
"LSMinimumSystemVersion": "10.9",
"LSEnvironment": {"LANG": "en_US.UTF-8", "LC_ALL": "en_US.UTF-8"},
}
app = BUNDLE(coll, name="SABnzbd.app", icon="builder/osx/image/sabnzbdplus.icns", info_plist=info_plist)

206
builder/make_dmg.py Normal file
View File

@@ -0,0 +1,206 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2017 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import pkginfo
# We need to call dmgbuild from command-line, so here we can setup how
if __name__ == "__main__":
# Check for DMGBuild
try:
import dmgbuild
except:
print("Requires dmgbuild-module, use pip install dmgbuild")
exit()
# Make sure we are in the src folder
if not os.path.exists("builder"):
raise FileNotFoundError("Run from the main SABnzbd source folder: python builder/package.py")
# Check if signing is possible
authority = os.environ.get("SIGNING_AUTH")
# Extract version info and set DMG path
# Create sub-folder to upload later
release = pkginfo.Develop(".").version
prod = "SABnzbd-" + release
fileDmg = prod + "-osx.dmg"
# Path to app file
apppath = "dist/SABnzbd.app"
# Copy Readme
readmepath = os.path.join(apppath, "Contents/Resources/README.txt")
# Path to background and the icon
backgroundpath = "builder/osx/image/sabnzbd_new_bg.png"
iconpath = "builder/osx/image/sabnzbdplus.icns"
# Make DMG
print("Building DMG")
dmgbuild.build_dmg(
filename=fileDmg,
volume_name=prod,
settings_file="builder/make_dmg.py",
defines={"app": apppath, "readme": readmepath, "background": backgroundpath, "iconpath": iconpath},
)
# Resign APP
if authority:
print("Siging DMG")
os.system('codesign --deep -f -i "org.sabnzbd.SABnzbd" -s "%s" "%s"' % (authority, fileDmg))
print("Signed!")
else:
print("Signing skipped, missing SIGNING_AUTH.")
exit()
### START OF DMGBUILD SETTINGS
### COPIED AND MODIFIED FROM THE EXAMPLE ONLINE
application = defines.get("app", "AppName.app")
readme = defines.get("readme", "ReadMe.rtf")
appname = os.path.basename(application)
# .. Basics ....................................................................
# Volume format (see hdiutil create -help)
format = defines.get("format", "UDBZ")
# Volume size (must be large enough for your files)
size = defines.get("size", "100M")
# Files to include
files = [application, readme]
# Symlinks to create
symlinks = {"Applications": "/Applications"}
# Volume icon
#
# You can either define icon, in which case that icon file will be copied to the
# image, *or* you can define badge_icon, in which case the icon file you specify
# will be used to badge the system's Removable Disk icon
#
badge_icon = defines.get("iconpath", "")
# Where to put the icons
icon_locations = {readme: (70, 160), appname: (295, 220), "Applications": (510, 220)}
# .. Window configuration ......................................................
# Window position in ((x, y), (w, h)) format
window_rect = ((100, 100), (660, 360))
# Background
#
# This is a STRING containing any of the following:
#
# #3344ff - web-style RGB color
# #34f - web-style RGB color, short form (#34f == #3344ff)
# rgb(1,0,0) - RGB color, each value is between 0 and 1
# hsl(120,1,.5) - HSL (hue saturation lightness) color
# hwb(300,0,0) - HWB (hue whiteness blackness) color
# cmyk(0,1,0,0) - CMYK color
# goldenrod - X11/SVG named color
# builtin-arrow - A simple built-in background with a blue arrow
# /foo/bar/baz.png - The path to an image file
#
# Other color components may be expressed either in the range 0 to 1, or
# as percentages (e.g. 60% is equivalent to 0.6).
background = defines.get("background", "builtin-arrow")
show_status_bar = False
show_tab_view = False
show_toolbar = False
show_pathbar = False
show_sidebar = False
sidebar_width = 0
# Select the default view; must be one of
#
# 'icon-view'
# 'list-view'
# 'column-view'
# 'coverflow'
#
default_view = "icon-view"
# General view configuration
show_icon_preview = False
# Set these to True to force inclusion of icon/list view settings (otherwise
# we only include settings for the default view)
include_icon_view_settings = "auto"
include_list_view_settings = "auto"
# .. Icon view configuration ...................................................
arrange_by = None
grid_offset = (0, 0)
grid_spacing = 50
scroll_position = (0, 0)
label_pos = "bottom" # or 'right'
text_size = 16
icon_size = 64
# .. List view configuration ...................................................
# Column names are as follows:
#
# name
# date-modified
# date-created
# date-added
# date-last-opened
# size
# kind
# label
# version
# comments
#
list_icon_size = 16
list_text_size = 12
list_scroll_position = (0, 0)
list_sort_by = "name"
list_use_relative_dates = True
list_calculate_all_sizes = (False,)
list_columns = ("name", "date-modified", "size", "kind", "date-added")
list_column_widths = {
"name": 300,
"date-modified": 181,
"date-created": 181,
"date-added": 181,
"date-last-opened": 181,
"size": 97,
"kind": 115,
"label": 100,
"version": 75,
"comments": 300,
}
list_column_sort_directions = {
"name": "ascending",
"date-modified": "descending",
"date-created": "descending",
"date-added": "descending",
"date-last-opened": "descending",
"size": "descending",
"kind": "ascending",
"label": "ascending",
"version": "ascending",
"comments": "ascending",
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>

View File

Binary file not shown.

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

Binary file not shown.

View File

Binary file not shown.

566
builder/package.py Normal file
View File

@@ -0,0 +1,566 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2017 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import glob
import platform
import re
import sys
import os
import time
import shutil
import subprocess
import tarfile
import pkginfo
import github
from distutils.dir_util import copy_tree
VERSION_FILE = "sabnzbd/version.py"
SPEC_FILE = "SABnzbd.spec"
# Also modify these in "SABnzbd.spec"!
extra_files = [
"README.mkd",
"INSTALL.txt",
"LICENSE.txt",
"GPL2.txt",
"GPL3.txt",
"COPYRIGHT.txt",
"ISSUES.txt",
"PKG-INFO",
]
extra_folders = [
"scripts/",
"licenses/",
"locale/",
"email/",
"interfaces/Glitter/",
"interfaces/wizard/",
"interfaces/Config/",
"scripts/",
"icons/",
]
# Support functions
def safe_remove(path):
"""Remove file without erros if the file doesn't exist
Can also handle folders
"""
if os.path.exists(path):
if os.path.isdir(path):
shutil.rmtree(path)
else:
os.remove(path)
def delete_files_glob(name):
"""Delete one file or set of files from wild-card spec"""
for f in glob.glob(name):
if os.path.exists(f):
os.remove(f)
def run_external_command(command):
"""Wrapper to ease the use of calling external programs"""
process = subprocess.Popen(command, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output, _ = process.communicate()
ret = process.wait()
if output:
print(output)
if ret != 0:
raise RuntimeError("Command returned non-zero exit code %s!" % ret)
return output
def run_git_command(parms):
"""Run git command, raise error if it failed"""
return run_external_command(["git"] + parms)
def patch_version_file(release_name):
"""Patch in the Git commit hash, but only when this is
an unmodified checkout
"""
git_output = run_git_command(["log", "-1"])
for line in git_output.split("\n"):
if "commit " in line:
commit = line.split(" ")[1].strip()
break
else:
raise TypeError("Commit hash not found")
with open(VERSION_FILE, "r") as ver:
version_file = ver.read()
version_file = re.sub(r'__baseline__\s*=\s*"[^"]*"', '__baseline__ = "%s"' % commit, version_file)
version_file = re.sub(r'__version__\s*=\s*"[^"]*"', '__version__ = "%s"' % release_name, version_file)
with open(VERSION_FILE, "w") as ver:
ver.write(version_file)
if __name__ == "__main__":
# Was any option supplied?
if len(sys.argv) < 2:
raise TypeError("Please specify what to do")
# Make sure we are in the src folder
if not os.path.exists("builder"):
raise FileNotFoundError("Run from the main SABnzbd source folder: python builder/package.py")
# Extract version info
RELEASE_VERSION = pkginfo.Develop(".").version
# Check if we have the needed certificates
try:
import certifi
except ImportError:
raise FileNotFoundError("Need certifi module")
# Define release name
RELEASE_NAME = "SABnzbd-%s" % RELEASE_VERSION
RELEASE_TITLE = "SABnzbd %s" % RELEASE_VERSION
RELEASE_SRC = RELEASE_NAME + "-src.tar.gz"
RELEASE_BINARY_32 = RELEASE_NAME + "-win32-bin.zip"
RELEASE_BINARY_64 = RELEASE_NAME + "-win64-bin.zip"
RELEASE_INSTALLER = RELEASE_NAME + "-win-setup.exe"
RELEASE_MACOS = RELEASE_NAME + "-osx.dmg"
RELEASE_README = "README.mkd"
# Patch release file
patch_version_file(RELEASE_VERSION)
# To draft a release or not to draft a release?
RELEASE_THIS = "refs/tags/" in os.environ.get("GITHUB_REF", "")
# Rename release notes file
safe_remove("README.txt")
shutil.copyfile(RELEASE_README, "README.txt")
# Compile translations
if not os.path.exists("locale"):
run_external_command([sys.executable, "tools/make_mo.py"])
# Check again if translations exist, fail otherwise
if not os.path.exists("locale"):
raise FileNotFoundError("Failed to compile language files")
# Make sure we remove any existing build-folders
safe_remove("build")
safe_remove("dist")
safe_remove(RELEASE_NAME)
# Copy the specification
shutil.copyfile("builder/%s" % SPEC_FILE, SPEC_FILE)
if "binary" in sys.argv or "installer" in sys.argv:
# Must be run on Windows
if sys.platform != "win32":
raise RuntimeError("Binary should be created on Windows")
# Check what architecture we are on
RELEASE_BINARY = RELEASE_BINARY_32
if platform.architecture()[0] == "64bit":
RELEASE_BINARY = RELEASE_BINARY_64
# Remove any leftovers
safe_remove(RELEASE_BINARY)
# Run PyInstaller and check output
run_external_command([sys.executable, "-O", "-m", "PyInstaller", "SABnzbd.spec"])
# Use special distutils function to merge the main and console directories
copy_tree("dist/SABnzbd-console", "dist/SABnzbd")
safe_remove("dist/SABnzbd-console")
# Remove unwanted DLL's
delete_files_glob("dist/SABnzbd/api-ms-win*.dll")
delete_files_glob("dist/SABnzbd/mfc140u.dll")
delete_files_glob("dist/SABnzbd/ucrtbase.dll")
# Remove other files we don't need
delete_files_glob("dist/SABnzbd/PKG-INFO")
delete_files_glob("dist/SABnzbd/win32ui.pyd")
delete_files_glob("dist/SABnzbd/winxpgui.pyd")
if "installer" in sys.argv:
# Needs to be run on 64 bit
if RELEASE_BINARY != RELEASE_BINARY_64:
raise RuntimeError("Installer should be created on 64bit Python")
# Compile NSIS translations
safe_remove("NSIS_Installer.nsi")
safe_remove("NSIS_Installer.nsi.tmp")
shutil.copyfile("builder/win/NSIS_Installer.nsi", "NSIS_Installer.nsi")
run_external_command([sys.executable, "tools/make_mo.py", "nsis"])
# Remove 32bit external executables
delete_files_glob("dist/SABnzbd/win/par2/multipar/par2j.exe")
delete_files_glob("dist/SABnzbd/win/unrar/UnRAR.exe")
# Run NSIS to build installer
run_external_command(
[
"makensis.exe",
"/V3",
"/DSAB_PRODUCT=%s" % RELEASE_NAME,
"/DSAB_VERSION=%s" % RELEASE_VERSION,
"/DSAB_FILE=%s" % RELEASE_INSTALLER,
"NSIS_Installer.nsi.tmp",
]
)
# Rename the folder
os.rename("dist/SABnzbd", RELEASE_NAME)
# Create the archive
run_external_command(["win/7zip/7za.exe", "a", RELEASE_BINARY, RELEASE_NAME])
if "app" in sys.argv:
# Must be run on macOS
if sys.platform != "darwin":
raise RuntimeError("App should be created on macOS")
# Who will sign and notarize this?
authority = os.environ.get("SIGNING_AUTH")
notarization_user = os.environ.get("NOTARIZATION_USER")
notarization_pass = os.environ.get("NOTARIZATION_PASS")
# Run PyInstaller and check output
run_external_command([sys.executable, "-O", "-m", "PyInstaller", "SABnzbd.spec"])
# Only continue if we can sign
if authority:
files_to_sign = [
"dist/SABnzbd.app/Contents/MacOS/osx/par2/par2-sl64",
"dist/SABnzbd.app/Contents/MacOS/osx/7zip/7za",
"dist/SABnzbd.app/Contents/MacOS/osx/unrar/unrar",
"dist/SABnzbd.app/Contents/MacOS/SABnzbd",
"dist/SABnzbd.app",
]
for file_to_sign in files_to_sign:
print("Signing %s with hardended runtime" % file_to_sign)
run_external_command(
[
"codesign",
"--deep",
"--force",
"--timestamp",
"--options",
"runtime",
"--entitlements",
"builder/osx/entitlements.plist",
"-i",
"org.sabnzbd.sabnzbd",
"-s",
authority,
file_to_sign,
],
)
print("Signed %s!" % file_to_sign)
# Only notarize for real builds that we want to deploy
if notarization_user and notarization_pass and RELEASE_THIS:
# Prepare zip to upload to notarization service
print("Creating zip to send to Apple notarization service")
# We need to use ditto, otherwise the signature gets lost!
notarization_zip = RELEASE_NAME + ".zip"
run_external_command(
["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", "dist/SABnzbd.app", notarization_zip]
)
# Upload to Apple
print("Sending zip to Apple notarization service")
upload_process = run_external_command(
[
"xcrun",
"altool",
"--notarize-app",
"-t",
"osx",
"-f",
notarization_zip,
"--primary-bundle-id",
"org.sabnzbd.sabnzbd",
"-u",
notarization_user,
"-p",
notarization_pass,
],
)
# Extract the notarization ID
m = re.match(".*RequestUUID = (.*?)\n", upload_process, re.S)
if not m:
raise RuntimeError("No UUID created")
uuid = m.group(1)
print("Checking notarization of UUID: %s (every 30 seconds)" % uuid)
notarization_in_progress = True
while notarization_in_progress:
time.sleep(30)
check_status = run_external_command(
[
"xcrun",
"altool",
"--notarization-info",
uuid,
"-u",
notarization_user,
"-p",
notarization_pass,
],
)
notarization_in_progress = "Status: in progress" in check_status
# Check if success
if "Status: success" not in check_status:
raise RuntimeError("Failed to notarize..")
# Staple the notarization!
print("Approved! Stapling the result to the app")
run_external_command(["xcrun", "stapler", "staple", "dist/SABnzbd.app"])
elif notarization_user and notarization_pass:
print("Notarization skipped, tag commit to trigger notarization!")
else:
print("Notarization skipped, NOTARIZATION_USER or NOTARIZATION_PASS missing.")
else:
print("Signing skipped, missing SIGNING_AUTH.")
if "source" in sys.argv:
# Prepare Source distribution package.
# We assume the sources are freshly cloned from the repo
# Make sure all source files are Unix format
src_folder = "srcdist"
safe_remove(src_folder)
os.mkdir(src_folder)
# Remove any leftovers
safe_remove(RELEASE_SRC)
# Add extra files and folders need for source dist
extra_folders.extend(["sabnzbd/", "po/", "linux/", "tools/", "tests/"])
extra_files.extend(["SABnzbd.py", "requirements.txt"])
# Copy all folders and files to the new folder
for source_folder in extra_folders:
copy_tree(source_folder, os.path.join(src_folder, source_folder))
# Copy all files
for source_file in extra_files:
shutil.copyfile(source_file, os.path.join(src_folder, source_file))
# Make sure all line-endings are correct
for input_filename in glob.glob("%s/**/*.*" % src_folder, recursive=True):
base, ext = os.path.splitext(input_filename)
if ext.lower() not in (".py", ".txt", ".css", ".js", ".tmpl", ".sh", ".cmd"):
continue
print(input_filename)
with open(input_filename, "rb") as input_data:
data = input_data.read()
data = data.replace(b"\r", b"")
with open(input_filename, "wb") as output_data:
output_data.write(data)
# Create tar.gz file for source distro
with tarfile.open(RELEASE_SRC, "w:gz") as tar_output:
for root, dirs, files in os.walk(src_folder):
for _file in files:
input_path = os.path.join(root, _file)
if sys.platform == "win32":
tar_path = input_path.replace("srcdist\\", RELEASE_NAME + "/").replace("\\", "/")
else:
tar_path = input_path.replace("srcdist/", RELEASE_NAME + "/")
tarinfo = tar_output.gettarinfo(input_path, tar_path)
tarinfo.uid = 0
tarinfo.gid = 0
if _file in ("SABnzbd.py", "Sample-PostProc.sh", "make_mo.py", "msgfmt.py"):
# Force Linux/OSX scripts as executable
tarinfo.mode = 0o755
else:
tarinfo.mode = 0o644
with open(input_path, "rb") as f:
tar_output.addfile(tarinfo, f)
# Remove source folder
safe_remove(src_folder)
# Release to github
if "release" in sys.argv:
# Check if tagged as release and check for token
gh_token = os.environ.get("AUTOMATION_GITHUB_TOKEN", "")
if RELEASE_THIS and gh_token:
gh_obj = github.Github(gh_token)
gh_repo = gh_obj.get_repo("sabnzbd/sabnzbd")
# Read the release notes
with open(RELEASE_README, "r") as readme_file:
readme_data = readme_file.read()
# Pre-releases are longer than 6 characters (e.g. 3.1.0Beta1 vs 3.1.0, but also 3.0.11)
prerelease = len(RELEASE_VERSION) > 5
# We have to manually check if we already created this release
for release in gh_repo.get_releases():
if release.tag_name == RELEASE_VERSION:
gh_release = release
print("Found existing release %s" % gh_release.title)
break
else:
# Did not find it, so create the release, use the GitHub tag we got as input
print("Creating GitHub release SABnzbd %s" % RELEASE_VERSION)
gh_release = gh_repo.create_git_release(
tag=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=True,
prerelease=prerelease,
)
# Fetch existing assets, as overwriting is not allowed by GitHub
gh_assets = gh_release.get_assets()
# Upload the assets
files_to_check = (
RELEASE_SRC,
RELEASE_BINARY_32,
RELEASE_BINARY_64,
RELEASE_INSTALLER,
RELEASE_MACOS,
RELEASE_README,
)
for file_to_check in files_to_check:
if os.path.exists(file_to_check):
# Check if this file was previously uploaded
if gh_assets.totalCount:
for gh_asset in gh_assets:
if gh_asset.name == file_to_check:
print("Removing existing asset %s " % gh_asset.name)
gh_asset.delete_asset()
# Upload the new one
print("Uploading %s to release %s" % (file_to_check, gh_release.title))
gh_release.upload_asset(file_to_check)
# Check if we now have all files
gh_new_assets = gh_release.get_assets()
if gh_new_assets.totalCount:
all_assets = [gh_asset.name for gh_asset in gh_new_assets]
# Check if we have all files, using set-comparison
if set(files_to_check) == set(all_assets):
print("All assets present, releasing %s" % RELEASE_VERSION)
# Publish release
gh_release.update_release(
tag_name=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=False,
prerelease=prerelease,
)
# Update the website
gh_repo_web = gh_obj.get_repo("sabnzbd/sabnzbd.github.io")
# Check if the branch already exists, only create one if it doesn't
skip_website_update = False
try:
gh_repo_web.get_branch(RELEASE_VERSION)
print("Branch %s on sabnzbd/sabnzbd.github.io already exists, skipping update" % RELEASE_VERSION)
skip_website_update = True
except github.GithubException:
# Create a new branch to have the changes
sb = gh_repo_web.get_branch("master")
print("Creating branch %s on sabnzbd/sabnzbd.github.io" % RELEASE_VERSION)
new_branch = gh_repo_web.create_git_ref(ref="refs/heads/" + RELEASE_VERSION, sha=sb.commit.sha)
# Update the files
if not skip_website_update:
# We need bytes version to interact with GitHub
RELEASE_VERSION_BYTES = RELEASE_VERSION.encode()
# Get all the version files
latest_txt = gh_repo_web.get_contents("latest.txt")
latest_txt_items = latest_txt.decoded_content.split()
new_latest_txt_items = latest_txt_items[:2]
config_yml = gh_repo_web.get_contents("_config.yml")
if prerelease:
# If it's a pre-release, we append to current version in latest.txt
new_latest_txt_items.extend([RELEASE_VERSION_BYTES, latest_txt_items[1]])
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: '%s'" % RELEASE_VERSION_BYTES,
config_yml.decoded_content,
)
else:
# New stable release, replace the version
new_latest_txt_items[0] = RELEASE_VERSION_BYTES
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: ''",
config_yml.decoded_content,
)
new_config_yml = re.sub(
b"latest_stable: '[^']*'",
b"latest_stable: '%s'" % RELEASE_VERSION_BYTES,
new_config_yml,
)
# Also update the wiki-settings, these only use x.x notation
new_config_yml = re.sub(
b"wiki_version: '[^']*'",
b"wiki_version: '%s'" % RELEASE_VERSION_BYTES[:3],
new_config_yml,
)
# Update the files
print("Updating latest.txt")
gh_repo_web.update_file(
"latest.txt",
"Release %s: latest.txt" % RELEASE_VERSION,
b"\n".join(new_latest_txt_items),
latest_txt.sha,
RELEASE_VERSION,
)
print("Updating _config.yml")
gh_repo_web.update_file(
"_config.yml",
"Release %s: _config.yml" % RELEASE_VERSION,
new_config_yml,
config_yml.sha,
RELEASE_VERSION,
)
# Create pull-request
print("Creating pull request in sabnzbd/sabnzbd.github.io for the update")
gh_repo_web.create_pull(
title=RELEASE_VERSION,
base="master",
body="Automated update of release files",
head=RELEASE_VERSION,
)
else:
print("To push release to GitHub, first tag the commit.")
print("Or missing the AUTOMATION_GITHUB_TOKEN, cannot push to GitHub without it.")
# Reset!
run_git_command(["reset", "--hard"])
run_git_command(["clean", "-f"])

9
builder/requirements.txt Normal file
View File

@@ -0,0 +1,9 @@
# Basic build requirements
pyinstaller==4.2
setuptools
pkginfo
certifi
pygithub
# For the OSX build specific
dmgbuild; sys_platform == 'darwin'

View File

@@ -0,0 +1,405 @@
; -*- coding: utf-8 -*-
;
; Copyright 2008-2015 The SABnzbd-Team <team@sabnzbd.org>
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either version 2
; of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Unicode true
!addplugindir builder\win\nsis\Plugins
!addincludedir builder\win\nsis\Include
!include "MUI2.nsh"
!include "registerExtension.nsh"
!include "FileFunc.nsh"
!include "LogicLib.nsh"
!include "WinVer.nsh"
!include "nsProcess.nsh"
!include "x64.nsh"
!include "servicelib.nsh"
;------------------------------------------------------------------
;
; Marco for removing existing and the current installation
; It shared by the installer and the uninstaller.
;
!define RemovePrev "!insertmacro RemovePrev"
!macro RemovePrev idir
; Remove the whole dir
; Users should not be putting stuff here!
RMDir /r "${idir}"
!macroend
;------------------------------------------------------------------
; Define names of the product
Name "${SAB_PRODUCT}"
OutFile "${SAB_FILE}"
InstallDir "$PROGRAMFILES\SABnzbd"
;------------------------------------------------------------------
; Some default compiler settings (uncomment and change at will):
SetCompress auto ; (can be off or force)
SetDatablockOptimize on ; (can be off)
CRCCheck on ; (can be off)
AutoCloseWindow false ; (can be true for the window go away automatically at end)
ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
SetDateSave off ; (can be on to have files restored to their orginal date)
WindowIcon on
SpaceTexts none
;------------------------------------------------------------------
; Vista/Win7 redirects $SMPROGRAMS to all users without this
RequestExecutionLevel admin
FileErrorText "If you have no admin rights, try to install into a user directory."
;------------------------------------------------------------------
;Variables
Var MUI_TEMP
Var STARTMENU_FOLDER
Var PREV_INST_DIR
;------------------------------------------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;Show all languages, despite user's codepage
!define MUI_LANGDLL_ALLLANGUAGES
!define MUI_ICON "dist\SABnzbd\icons\sabnzbd.ico"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "dist\SABnzbd\LICENSE.txt"
!define MUI_COMPONENTSPAGE_NODESC
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\SABnzbd"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "SABnzbd"
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\SABnzbd"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
!insertmacro MUI_PAGE_INSTFILES
; !define MUI_FINISHPAGE_RUN
; !define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
; !define MUI_FINISHPAGE_RUN_TEXT $(MsgRunSAB)
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(MsgShowRelNote)
!define MUI_FINISHPAGE_LINK $(MsgSupportUs)
!define MUI_FINISHPAGE_LINK_LOCATION "https://sabnzbd.org/donate"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!define MUI_UNPAGE_COMPONENTSPAGE_NODESC
!insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_INSTFILES
;------------------------------------------------------------------
; Run as user-level at end of install
; DOES NOT WORK
; Function PageFinishRun
; !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\SABnzbd.exe" "" "" ""
; FunctionEnd
;------------------------------------------------------------------
; Set supported languages
;
; If you edit this list you also need to edit apireg.py in SABnzbd!
;
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "SimpChinese"
;------------------------------------------------------------------
;Reserve Files
;If you are using solid compression, files that are required before
;the actual installation should be stored first in the data block,
;because this will make your installer start faster.
!insertmacro MUI_RESERVEFILE_LANGDLL
;------------------------------------------------------------------
; SECTION main program
;
Section "SABnzbd" SecDummy
SetOutPath "$INSTDIR"
;------------------------------------------------------------------
; Make sure old versions are gone (reg-key already read in onInt)
StrCmp $PREV_INST_DIR "" noPrevInstallRemove
${RemovePrev} "$PREV_INST_DIR"
noPrevInstallRemove:
; add files / whatever that need to be installed here.
File /r "dist\SABnzbd\*"
;------------------------------------------------------------------
; Add firewall rules
liteFirewallW::AddRule "$INSTDIR\SABnzbd.exe" "SABnzbd"
liteFirewallW::AddRule "$INSTDIR\SABnzbd-console.exe" "SABnzbd-console"
;------------------------------------------------------------------
; Add to registery
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" "Installer Language" "$(MsgLangCode)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayName" "SABnzbd ${SAB_VERSION}"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayVersion" '${SAB_VERSION}'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Publisher" 'The SABnzbd Team'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "HelpLink" 'https://forums.sabnzbd.org/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "URLInfoAbout" 'https://sabnzbd.org/wiki/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "URLUpdateInfo" 'https://sabnzbd.org/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Comments" 'The automated Usenet download tool'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayIcon" '$INSTDIR\icons\sabnzbd.ico'
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "EstimatedSize" 25674
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoRepair" -1
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoModify" -1
; write out uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - SafeMode.lnk" "$INSTDIR\SABnzbd.exe" "--server 127.0.0.1:8080 -b1 --no-login"
WriteINIStr "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - Documentation.url" "InternetShortcut" "URL" "https://sabnzbd.org/wiki/"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd ; end of default section
Section $(MsgIcon) desktop
CreateShortCut "$DESKTOP\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe"
SectionEnd ; end of desktop icon section
Section $(MsgAssoc) assoc
${registerExtension} "$INSTDIR\icons\nzb.ico" "$INSTDIR\SABnzbd.exe" ".nzb" "NZB File"
${RefreshShellIcons}
SectionEnd ; end of file association section
Section /o $(MsgRunAtStart) startup
CreateShortCut "$SMPROGRAMS\Startup\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe" "-b0"
SectionEnd ;
;------------------------------------------------------------------
Function .onInit
; We need to modify the dir here for X64
${If} ${RunningX64}
StrCpy $INSTDIR "$PROGRAMFILES64\SABnzbd"
${Else}
MessageBox MB_OK $(MsgOnly64bit)
ExecShell "open" "https://sabnzbd.org/downloads"
Abort
${EndIf}
; Python 3.9 no longer supports Windows 7
${If} ${AtMostWin8}
MessageBox MB_OK $(MsgNoWin7)
ExecShell "open" "https://sabnzbd.org/downloads"
Abort
${EndIf}
;------------------------------------------------------------------
; Change settings based on if SAB was already installed
ReadRegStr $PREV_INST_DIR HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" ""
StrCmp $PREV_INST_DIR "" noPrevInstall
; We want to use the user's costom dir if he used one
StrCmp $PREV_INST_DIR "$PROGRAMFILES\SABnzbd" noSpecialDir
StrCmp $PREV_INST_DIR "$PROGRAMFILES64\SABnzbd" noSpecialDir
; Set what the user had before
StrCpy $INSTDIR "$PREV_INST_DIR"
noSpecialDir:
;------------------------------------------------------------------
; Check what the user has currently set for install options
IfFileExists "$SMPROGRAMS\Startup\SABnzbd.lnk" 0 endCheckStartup
SectionSetFlags ${startup} 1
endCheckStartup:
IfFileExists "$DESKTOP\SABnzbd.lnk" endCheckDesktop 0
SectionSetFlags ${desktop} 0 ; SAB is installed but desktop-icon not, so uncheck it
endCheckDesktop:
Push $1
ReadRegStr $1 HKCR ".nzb" "" ; read current file association
StrCmp "$1" "NZB File" noPrevInstall 0
SectionSetFlags ${assoc} 0 ; Uncheck it when it wasn't checked before
noPrevInstall:
;--------------------------------
; Display language chooser
!insertmacro MUI_LANGDLL_DISPLAY
;------------------------------------------------------------------
; make sure user terminates sabnzbd.exe or else abort
;
loop:
${nsProcess::FindProcess} "SABnzbd.exe" $R0
StrCmp $R0 0 0 endcheck
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgCloseSab) IDOK loop IDCANCEL exitinstall
exitinstall:
${nsProcess::Unload}
Abort
endcheck:
;------------------------------------------------------------------
; make sure both services aren't running
;
!insertmacro SERVICE "running" "SABnzbd" ""
Pop $0 ;response
!insertmacro SERVICE "running" "SABHelper" ""
Pop $1
${If} $0 == true
${OrIf} $1 == true
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgCloseSab) IDOK loop IDCANCEL exitinstall
; exitinstall already defined above
${EndIf}
;------------------------------------------------------------------
; Tell users about the service change
;
!insertmacro SERVICE "installed" "SABHelper" ""
Pop $0 ;response
${If} $0 == true
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgServChange) IDOK removeservices IDCANCEL exitinstall
; exitinstall already defined above
removeservices:
!insertmacro SERVICE "delete" "SABHelper" ""
!insertmacro SERVICE "delete" "SABnzbd" ""
${EndIf}
FunctionEnd
;------------------------------------------------------------------
; Show the shortcuts at end of install so user can start SABnzbd
; This is instead of us trying to run SAB from the installer
;
Function .onInstSuccess
ExecShell "open" "$SMPROGRAMS\$STARTMENU_FOLDER"
FunctionEnd
;--------------------------------
; begin uninstall settings/section
UninstallText $(MsgUninstall)
Section "un.$(MsgDelProgram)" Uninstall
;make sure sabnzbd.exe isnt running..if so shut it down
${nsProcess::KillProcess} "SABnzbd.exe" $R0
${nsProcess::Unload}
DetailPrint "Process Killed"
; add delete commands to delete whatever files/registry keys/etc you installed here.
Delete "$INSTDIR\uninstall.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd"
${RemovePrev} "$INSTDIR"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - SafeMode.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - Documentation.url"
RMDir "$SMPROGRAMS\$MUI_TEMP"
Delete "$SMPROGRAMS\Startup\SABnzbd.lnk"
Delete "$DESKTOP\SABnzbd.lnk"
DeleteRegKey HKEY_CURRENT_USER "Software\SABnzbd"
${unregisterExtension} ".nzb" "NZB File"
${RefreshShellIcons}
SectionEnd ; end of uninstall section
Section /o "un.$(MsgDelSettings)" DelSettings
DetailPrint "Uninstall settings $LOCALAPPDATA"
Delete "$LOCALAPPDATA\sabnzbd\sabnzbd.ini"
RMDir /r "$LOCALAPPDATA\sabnzbd"
SectionEnd
; eof
;--------------------------------
;Language strings
LangString MsgShowRelNote ${LANG_ENGLISH} "Show Release Notes"
LangString MsgSupportUs ${LANG_ENGLISH} "Support the project, Donate!"
LangString MsgCloseSab ${LANG_ENGLISH} "Please close $\"SABnzbd.exe$\" first"
LangString MsgServChange ${LANG_ENGLISH} "The SABnzbd Windows Service changed in SABnzbd 3.0.0. $\nYou will need to reinstall the SABnzbd service. $\n$\nClick `OK` to remove the existing services or `Cancel` to cancel this upgrade."
LangString MsgOnly64bit ${LANG_ENGLISH} "The installer only supports 64-bit Windows, use the standalone version to run on 32-bit Windows."
LangString MsgNoWin7 ${LANG_ENGLISH} "The installer only supports Windows 8.1 and above, use the standalone legacy version to run on older Windows version."
LangString MsgUninstall ${LANG_ENGLISH} "This will uninstall SABnzbd from your system"
LangString MsgRunAtStart ${LANG_ENGLISH} "Run at startup"
LangString MsgIcon ${LANG_ENGLISH} "Desktop Icon"
LangString MsgAssoc ${LANG_ENGLISH} "NZB File association"
LangString MsgDelProgram ${LANG_ENGLISH} "Delete Program"
LangString MsgDelSettings ${LANG_ENGLISH} "Delete Settings"
LangString MsgRemoveOld ${LANG_ENGLISH} "You cannot overwrite an existing installation. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangString MsgRemoveOld2 ${LANG_ENGLISH} "Your settings and data will be preserved."
LangString MsgLangCode ${LANG_ENGLISH} "en"
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd

View File

@@ -0,0 +1,28 @@
!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`
!macro nsProcess::FindProcess _FILE _ERR
nsProcess::_FindProcess /NOUNLOAD `${_FILE}`
Pop ${_ERR}
!macroend
!define nsProcess::KillProcess `!insertmacro nsProcess::KillProcess`
!macro nsProcess::KillProcess _FILE _ERR
nsProcess::_KillProcess /NOUNLOAD `${_FILE}`
Pop ${_ERR}
!macroend
!define nsProcess::CloseProcess `!insertmacro nsProcess::CloseProcess`
!macro nsProcess::CloseProcess _FILE _ERR
nsProcess::_CloseProcess /NOUNLOAD `${_FILE}`
Pop ${_ERR}
!macroend
!define nsProcess::Unload `!insertmacro nsProcess::Unload`
!macro nsProcess::Unload
nsProcess::_Unload
!macroend

View File

@@ -0,0 +1,53 @@
!define registerExtension "!insertmacro registerExtension"
!define unregisterExtension "!insertmacro unregisterExtension"
!define SHCNE_ASSOCCHANGED 0x8000000
!define SHCNF_IDLIST 0
; Source = http://nsis.sourceforge.net/File_Association
; Patched for SABnzbd by swi-tch
!macro registerExtension icon executable extension description
Push "${icon}" ; "full path to icon.ico"
Push "${executable}" ; "full path to my.exe"
Push "${extension}" ; ".mkv"
Push "${description}" ; "MKV File"
Call registerExtension
!macroend
; back up old value of .opt
Function registerExtension
!define Index "Line${__LINE__}"
pop $R0 ; ext name
pop $R1
pop $R2
pop $R3
push $1
push $0
DeleteRegKey HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R1"
WriteRegStr HKCR $R1 "" $R0
WriteRegStr HKCR $R0 "" $R0
WriteRegStr HKCR "$R0\shell" "" "open"
WriteRegStr HKCR "$R0\DefaultIcon" "" "$R3,0"
WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
pop $0
pop $1
!undef Index
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
FunctionEnd
!macro unregisterExtension extension description
Push "${extension}" ; ".mkv"
Push "${description}" ; "MKV File"
Call un.unregisterExtension
!macroend
Function un.unregisterExtension
pop $R1 ; description
pop $R0 ; extension
!define Index "Line${__LINE__}"
DeleteRegKey HKCR $R0
!undef Index
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
FunctionEnd

View File

@@ -0,0 +1,411 @@
; NSIS SERVICE LIBRARY - servicelib.nsh
; Version 1.8.1 - Jun 21th, 2013
; Questions/Comments - dselkirk@hotmail.com
;
; Description:
; Provides an interface to window services
;
; Inputs:
; action - systemlib action ie. create, delete, start, stop, pause,
; continue, installed, running, status
; name - name of service to manipulate
; param - action parameters; usage: var1=value1;var2=value2;...etc.
; (don't forget to add a ';' after the last value!)
;
; Actions:
; create - creates a new windows service
; Parameters:
; path - path to service executable
; autostart - automatically start with system ie. 1|0
; interact - interact with the desktop ie. 1|0
; depend - service dependencies
; user - user that runs the service
; password - password of the above user
; display - display name in service's console
; description - Description of service
; starttype - start type (supersedes autostart)
; servicetype - service type (supersedes interact)
;
; delete - deletes a windows service
; start - start a stopped windows service
; stop - stops a running windows service
; pause - pauses a running windows service
; continue - continues a paused windows service
; installed - is the provided service installed
; Parameters:
; action - if true then invokes the specified action
; running - is the provided service running
; Parameters:
; action - if true then invokes the specified action
; status - check the status of the provided service
;
; Usage:
; Method 1:
; Push "action"
; Push "name"
; Push "param"
; Call Service
; Pop $0 ;response
;
; Method 2:
; !insertmacro SERVICE "action" "name" "param"
;
; History:
; 1.0 - 09/15/2003 - Initial release
; 1.1 - 09/16/2003 - Changed &l to i, thx brainsucker
; 1.2 - 02/29/2004 - Fixed documentation.
; 1.3 - 01/05/2006 - Fixed interactive flag and pop order (Kichik)
; 1.4 - 12/07/2006 - Added display and depend, fixed datatypes (Vitoco)
; 1.5 - 06/25/2008 - Added description of service.(DeSafe.com/liuqixing#gmail.com)
; 1.5.1 - 06/12/2009 - Added use of __UNINSTALL__
; 1.6 - 08/02/2010 - Fixed description implementation (Anders)
; 1.7 - 04/11/2010 - Added get running service process id (Nico)
; 1.8 - 24/03/2011 - Added starttype and servicetype (Sergius)
; 1.8.1 - 21/06/2013 - Added dynamic ASCII & Unicode support (Zinthose)
!ifndef SERVICELIB
!define SERVICELIB
!define SC_MANAGER_ALL_ACCESS 0x3F
!define SC_STATUS_PROCESS_INFO 0x0
!define SERVICE_ALL_ACCESS 0xF01FF
!define SERVICE_CONTROL_STOP 1
!define SERVICE_CONTROL_PAUSE 2
!define SERVICE_CONTROL_CONTINUE 3
!define SERVICE_STOPPED 0x1
!define SERVICE_START_PENDING 0x2
!define SERVICE_STOP_PENDING 0x3
!define SERVICE_RUNNING 0x4
!define SERVICE_CONTINUE_PENDING 0x5
!define SERVICE_PAUSE_PENDING 0x6
!define SERVICE_PAUSED 0x7
!define SERVICE_KERNEL_DRIVER 0x00000001
!define SERVICE_FILE_SYSTEM_DRIVER 0x00000002
!define SERVICE_WIN32_OWN_PROCESS 0x00000010
!define SERVICE_WIN32_SHARE_PROCESS 0x00000020
!define SERVICE_INTERACTIVE_PROCESS 0x00000100
!define SERVICE_BOOT_START 0x00000000
!define SERVICE_SYSTEM_START 0x00000001
!define SERVICE_AUTO_START 0x00000002
!define SERVICE_DEMAND_START 0x00000003
!define SERVICE_DISABLED 0x00000004
## Added by Zinthose for Native Unicode Support
!ifdef NSIS_UNICODE
!define APITAG "W"
!else
!define APITAG "A"
!endif
!macro SERVICE ACTION NAME PARAM
Push '${ACTION}'
Push '${NAME}'
Push '${PARAM}'
!ifdef __UNINSTALL__
Call un.Service
!else
Call Service
!endif
!macroend
!macro FUNC_GETPARAM
Push $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
Push $7
Exch 8
Pop $1 ;name
Exch 8
Pop $2 ;source
StrCpy $0 ""
StrLen $7 $2
StrCpy $3 0
lbl_loop:
IntCmp $3 $7 0 0 lbl_done
StrLen $4 "$1="
StrCpy $5 $2 $4 $3
StrCmp $5 "$1=" 0 lbl_next
IntOp $5 $3 + $4
StrCpy $3 $5
lbl_loop2:
IntCmp $3 $7 0 0 lbl_done
StrCpy $6 $2 1 $3
StrCmp $6 ";" 0 lbl_next2
IntOp $6 $3 - $5
StrCpy $0 $2 $6 $5
Goto lbl_done
lbl_next2:
IntOp $3 $3 + 1
Goto lbl_loop2
lbl_next:
IntOp $3 $3 + 1
Goto lbl_loop
lbl_done:
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Exch 2
Pop $6
Pop $7
Exch $0
!macroend
!macro CALL_GETPARAM VAR NAME DEFAULT LABEL
Push $1
Push ${NAME}
Call ${UN}GETPARAM
Pop $6
StrCpy ${VAR} "${DEFAULT}"
StrCmp $6 "" "${LABEL}" 0
StrCpy ${VAR} $6
!macroend
!macro FUNC_SERVICE UN
Push $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
Push $7
Exch 8
Pop $1 ;param
Exch 8
Pop $2 ;name
Exch 8
Pop $3 ;action
;$0 return
;$4 OpenSCManager
;$5 OpenService
StrCpy $0 "false"
System::Call 'advapi32::OpenSCManager${APITAG}(n, n, i ${SC_MANAGER_ALL_ACCESS}) i.r4'
IntCmp $4 0 lbl_done
StrCmp $3 "create" lbl_create
System::Call 'advapi32::OpenService${APITAG}(i r4, t r2, i ${SERVICE_ALL_ACCESS}) i.r5'
IntCmp $5 0 lbl_done
lbl_select:
StrCmp $3 "delete" lbl_delete
StrCmp $3 "start" lbl_start
StrCmp $3 "stop" lbl_stop
StrCmp $3 "pause" lbl_pause
StrCmp $3 "continue" lbl_continue
StrCmp $3 "installed" lbl_installed
StrCmp $3 "running" lbl_running
StrCmp $3 "status" lbl_status
StrCmp $3 "processid" lbl_processid
Goto lbl_done
; create service
lbl_create:
Push $R1 ;depend
Push $R2 ;user
Push $R3 ;password
Push $R4 ;servicetype/interact
Push $R5 ;starttype/autostart
Push $R6 ;path
Push $R7 ;display
Push $R8 ;description
!insertmacro CALL_GETPARAM $R1 "depend" "n" "lbl_depend"
StrCpy $R1 't "$R1"'
lbl_depend:
StrCmp $R1 "n" 0 lbl_machine ;old name of depend param
!insertmacro CALL_GETPARAM $R1 "machine" "n" "lbl_machine"
StrCpy $R1 't "$R1"'
lbl_machine:
!insertmacro CALL_GETPARAM $R2 "user" "n" "lbl_user"
StrCpy $R2 't "$R2"'
lbl_user:
!insertmacro CALL_GETPARAM $R3 "password" "n" "lbl_password"
StrCpy $R3 't "$R3"'
lbl_password:
!insertmacro CALL_GETPARAM $R4 "interact" "${SERVICE_WIN32_OWN_PROCESS}" "lbl_interact"
StrCpy $6 ${SERVICE_WIN32_OWN_PROCESS}
IntCmp $R4 0 +2
IntOp $6 $6 | ${SERVICE_INTERACTIVE_PROCESS}
StrCpy $R4 $6
lbl_interact:
!insertmacro CALL_GETPARAM $R4 "servicetype" "$R4" "lbl_servicetype"
lbl_servicetype:
!insertmacro CALL_GETPARAM $R5 "autostart" "${SERVICE_DEMAND_START}" "lbl_autostart"
StrCpy $6 ${SERVICE_DEMAND_START}
IntCmp $R5 0 +2
StrCpy $6 ${SERVICE_AUTO_START}
StrCpy $R5 $6
lbl_autostart:
!insertmacro CALL_GETPARAM $R5 "starttype" "$R5" "lbl_starttype"
lbl_starttype:
!insertmacro CALL_GETPARAM $R6 "path" "n" "lbl_path"
lbl_path:
!insertmacro CALL_GETPARAM $R7 "display" "$2" "lbl_display"
lbl_display:
!insertmacro CALL_GETPARAM $R8 "description" "$2" "lbl_description"
lbl_description:
System::Call 'advapi32::CreateService${APITAG}(i r4, t r2, t R7, i ${SERVICE_ALL_ACCESS}, \
i R4, i R5, i 0, t R6, n, n, $R1, $R2, $R3) i.r6'
; write description of service (SERVICE_CONFIG_DESCRIPTION)
System::Call 'advapi32::ChangeServiceConfig2${APITAG}(ir6,i1,*t "$R8")i.R7'
strcmp $R7 "error" 0 lbl_descriptioncomplete
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\$2" "Description" $R8
lbl_descriptioncomplete:
Pop $R8
Pop $R7
Pop $R6
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Pop $R1
StrCmp $6 0 lbl_done lbl_good
; delete service
lbl_delete:
System::Call 'advapi32::DeleteService(i r5) i.r6'
StrCmp $6 0 lbl_done lbl_good
; start service
lbl_start:
System::Call 'advapi32::StartService${APITAG}(i r5, i 0, i 0) i.r6'
StrCmp $6 0 lbl_done lbl_good
; stop service
lbl_stop:
Push $R1
System::Call '*(i,i,i,i,i,i,i) i.R1'
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_STOP}, i $R1) i'
System::Free $R1
Pop $R1
StrCmp $6 0 lbl_done lbl_good
; pause service
lbl_pause:
Push $R1
System::Call '*(i,i,i,i,i,i,i) i.R1'
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_PAUSE}, i $R1) i'
System::Free $R1
Pop $R1
StrCmp $6 0 lbl_done lbl_good
; continue service
lbl_continue:
Push $R1
System::Call '*(i,i,i,i,i,i,i) i.R1'
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_CONTINUE}, i $R1) i'
System::Free $R1
Pop $R1
StrCmp $6 0 lbl_done lbl_good
; is installed
lbl_installed:
!insertmacro CALL_GETPARAM $7 "action" "" "lbl_good"
StrCpy $3 $7
Goto lbl_select
; is service running
lbl_running:
Push $R1
System::Call '*(i,i,i,i,i,i,i) i.R1'
System::Call 'advapi32::QueryServiceStatus(i r5, i $R1) i'
System::Call '*$R1(i, i.r6)'
System::Free $R1
Pop $R1
IntFmt $6 "0x%X" $6
StrCmp $6 ${SERVICE_RUNNING} 0 lbl_done
!insertmacro CALL_GETPARAM $7 "action" "" "lbl_good"
StrCpy $3 $7
Goto lbl_select
lbl_status:
Push $R1
System::Call '*(i,i,i,i,i,i,i) i.R1'
System::Call 'advapi32::QueryServiceStatus(i r5, i $R1) i'
System::Call '*$R1(i, i .r6)'
System::Free $R1
Pop $R1
IntFmt $6 "0x%X" $6
StrCpy $0 "running"
IntCmp $6 ${SERVICE_RUNNING} lbl_done
StrCpy $0 "stopped"
IntCmp $6 ${SERVICE_STOPPED} lbl_done
StrCpy $0 "start_pending"
IntCmp $6 ${SERVICE_START_PENDING} lbl_done
StrCpy $0 "stop_pending"
IntCmp $6 ${SERVICE_STOP_PENDING} lbl_done
StrCpy $0 "running"
IntCmp $6 ${SERVICE_RUNNING} lbl_done
StrCpy $0 "continue_pending"
IntCmp $6 ${SERVICE_CONTINUE_PENDING} lbl_done
StrCpy $0 "pause_pending"
IntCmp $6 ${SERVICE_PAUSE_PENDING} lbl_done
StrCpy $0 "paused"
IntCmp $6 ${SERVICE_PAUSED} lbl_done
StrCpy $0 "unknown"
Goto lbl_done
lbl_processid:
Push $R1
Push $R2
System::Call '*(i,i,i,i,i,i,i,i,i) i.R1'
System::Call '*(i 0) i.R2'
System::Call "advapi32::QueryServiceStatusEx(i r5, i ${SC_STATUS_PROCESS_INFO}, i $R1, i 36, i $R2) i"
System::Call "*$R1(i,i,i,i,i,i,i, i .r0)"
System::Free $R2
System::Free $R1
Pop $R2
Pop $R1
Goto lbl_done
lbl_good:
StrCpy $0 "true"
lbl_done:
IntCmp $5 0 +2
System::Call 'advapi32::CloseServiceHandle(i r5) n'
IntCmp $4 0 +2
System::Call 'advapi32::CloseServiceHandle(i r4) n'
Pop $4
Pop $3
Pop $2
Pop $1
Exch 3
Pop $5
Pop $7
Pop $6
Exch $0
!macroend
Function Service
!insertmacro FUNC_SERVICE ""
FunctionEnd
Function GetParam
!insertmacro FUNC_GETPARAM
FunctionEnd
!undef APITAG
!endif

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -4,7 +4,7 @@
#set global $root = '../../'#
#end if#
<!DOCTYPE HTML>
<html lang="$active_lang">
<html lang="$active_lang" #if $rtl#dir="rtl"#end if#>
<head>
<title>
SABnzbd $T('menu-config')

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Config"#-->
<!--#set global $help_uri="configuration/3.0/configure"#-->
<!--#set global $help_uri="configuration/3.4/configure"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#from sabnzbd.encoding import CODEPAGE#-->
@@ -9,7 +9,7 @@
<tbody>
<tr>
<th scope="row">$T('version'): </th>
<td>$version [$build]</td>
<td>$version [<a href="https://github.com/sabnzbd/sabnzbd/commit/$build" target="_blank">$build</a>]</td>
</tr>
<tr>
<th scope="row">$T('uptime'): </th>
@@ -124,7 +124,7 @@
<div class="colmask">
<div class="padding alt">
<h5 class="copyright">Copyright &copy; 2007-2020 The SABnzbd Team &lt;<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>&gt;</h5>
<h5 class="copyright">Copyright &copy; 2007-2021 The SABnzbd Team &lt;<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>&gt;</h5>
<p class="copyright"><small>$T('yourRights')</small></p>
</div>

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Categories"#-->
<!--#set global $help_uri="configuration/3.0/categories"#-->
<!--#set global $help_uri="configuration/3.4/categories"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
<div class="section">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Folders"#-->
<!--#set global $help_uri="configuration/3.0/folders"#-->
<!--#set global $help_uri="configuration/3.4/folders"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -10,6 +10,7 @@
</div>
<form action="saveDirectories" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" name="output" value="json" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<div class="section">
<div class="col2">
@@ -28,7 +29,7 @@
</div>
<div class="field-pair advanced-settings">
<label class="config" for="download_free">$T('opt-download_free')</label>
<input type="text" name="download_free" id="download_free" value="$download_free" class="smaller_input" />
<input type="text" name="download_free" id="download_free" value="$download_free" class="smaller_input" />
<span class="desc">$T('explain-download_free')</span>
</div>
<div class="field-pair">
@@ -36,6 +37,16 @@
<input type="text" name="complete_dir" id="complete_dir" value="$complete_dir" data-initialdir="$my_home" />
<span class="desc">$T('explain-complete_dir')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="complete_free">$T('opt-complete_free')</label>
<input type="text" name="complete_free" id="complete_free" value="$complete_free" class="smaller_input" />
<span class="desc">$T('explain-download_free') <br>$T('explain-complete_free')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="fulldisk_autoresume">$T('opt-fulldisk_autoresume')</label>
<input type="checkbox" name="fulldisk_autoresume" id="fulldisk_autoresume" value="1" <!--#if int($fulldisk_autoresume) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-fulldisk_autoresume')</span>
</div>
<!--#if not $nt#-->
<div class="field-pair advanced-settings">
<label class="config" for="permissions">$T('opt-permissions')</label>

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="General"#-->
<!--#set global $help_uri="configuration/3.0/general"#-->
<!--#set global $help_uri="configuration/3.4/general"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -10,7 +10,8 @@
</div>
<form action="saveGeneral" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" id="ajax" name="ajax" value=1 />
<input type="hidden" id="ajax" name="ajax" value="1" />
<input type="hidden" name="output" value="json" />
<div class="section">
<div class="col2">
<h3>$T('webServer') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
@@ -32,6 +33,7 @@
<label class="config" for="enable_https">$T('opt-enable_https')</label>
<input type="checkbox" name="enable_https" id="enable_https" value="1" <!--#if int($enable_https) > 0 then 'checked="checked" data-original="1"' else ""#-->/>
<span class="desc">$T('explain-enable_https')</span>
<span class="desc"><span class="label label-warning">$T('warning').upper()</span> $T('explain-enable_https_warning')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="web_dir">$T('opt-web_dir')</label>
@@ -130,12 +132,7 @@
<option value="5" <!--#if $inet_exposure == 5 then 'selected="selected"' else ""#-->>$T('inet-ui') - $T('inet-external_login')</option>
</optgroup>
</select>
<span class="desc">$T('explain-inet_exposure').replace('. ','.<br><span class="label label-warning">'+$T('warning').upper()+'</span> ')</span>
</div>
<div class="field-pair">
<label class="config" for="local_ranges">$T('opt-local_ranges')</label>
<input type="text" name="local_ranges" id="local_ranges" value="$local_ranges" />
<span class="desc">$T('explain-local_ranges')</span>
<span class="desc">$T('explain-inet_exposure')</span>
</div>
<div class="field-pair">
<label class="config" for="apikey_display">$T('opt-apikey')</label>
@@ -259,17 +256,18 @@
// Highlight in case user is not safe
// So when exposed to internet and no password, no external limit or no username/password
var safeCheck = \$('#host, #local_ranges, #inet_exposure, #${pid}_wu, #${pid}_wp')
var safeCheck = \$('#host, #inet_exposure, #${pid}_wu, #${pid}_wp')
function checkSafety() {
if(\$('#host').val() != 'localhost' && \$('#host').val() != '127.0.0.1') {
// No limitation on local-network
if(!\$('#local_ranges').val() || \$('#inet_exposure').val() > 3) {
if(\$('#inet_exposure').val() > 3) {
// And no username and password?
if(!\$('#${pid}_wu').val() || !\$('#${pid}_wp').val()) {
// Add warning icon if not there already
if(!\$('.host-warning').length) {
safeCheck.after('<span class="glyphicon glyphicon-alert host-warning"></span>')
\$('.host-warning').tooltip({'title': '$T('checkSafety')'})
safeCheck.addClass('host-warning-highlight')
}
return
}
@@ -286,7 +284,7 @@
\$('#apikey, #nzbkey').click(function () { \$(this).select() });
\$('#generate_new_apikey').click(function () {
if (confirm("$T('Plush-confirm')")) {
if (confirm("$T('confirm')")) {
$.ajax({
type: "POST",
url: "../../api",
@@ -299,7 +297,7 @@
}
});
\$('#generate_new_nzbkey').click(function () {
if (confirm("$T('Plush-confirm')")) {
if (confirm("$T('confirm')")) {
$.ajax({
type: "POST",
url: "../../api",

View File

@@ -1,12 +1,12 @@
<!--#set global $pane="Email"#-->
<!--#set global $help_uri="configuration/3.0/notifications"#-->
<!--#set global $help_uri="configuration/3.4/notifications"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#def show_notify_checkboxes($section_label)#-->
<!--#for $type in $notify_keys#-->
<!--#for $type in $notify_types#-->
<div class="field-pair">
<label class="config wide" for="${section_label}_prio_$type">
$T($notify_texts[$type]).replace('/', ' / ') <!--#if $type == 'download'#--> / $T('link-pause') / $T('link-resume')<!--#end if#-->
$T($notify_types[$type]).replace('/', ' / ')
</label>
<input type="checkbox" name="${section_label}_prio_$type" id="${section_label}_prio_$type" value="1" <!--#if int($getVar($section_label + '_prio_' + $type)) > 0 then 'checked="checked"' else ""#--> />
</div>
@@ -22,12 +22,14 @@
<option value="$ct" <!--#if $ct in $getVar($section_label + '_cats') then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</select>
<p>$T('defaultNotifiesAll')</p>
</div>
<!--#end def#-->
<div class="colmask">
<form action="saveEmail" method="post" name="fullform" class="fullform" autocomplete="off">
<form action="saveNotify" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" name="output" value="json" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<div class="section" id="email">
<div class="col2">
@@ -39,6 +41,7 @@
<option value="$ct" <!--#if $ct in $email_cats then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</select>
<p>$T('defaultNotifiesAll')</p>
</div>
</div>
<div class="col1">
@@ -46,9 +49,9 @@
<div class="field-pair">
<label class="config" for="email_endjob">$T('opt-email_endjob')</label>
<select name="email_endjob" id="email_endjob">
<option value="0" <!--#if int($email_endjob) == 0 then 'selected="selected"' else ""#--> >$T('email-never')</option>
<option value="1" <!--#if int($email_endjob) == 1 then 'selected="selected"' else ""#--> >$T('email-always')</option>
<option value="2" <!--#if int($email_endjob) == 2 then 'selected="selected"' else ""#--> >$T('email-errorOnly')</option>
<option value="0" <!--#if int($email_endjob) == "0" then 'selected="selected"' else ""#--> >$T('email-never')</option>
<option value="1" <!--#if int($email_endjob) == "1" then 'selected="selected"' else ""#--> >$T('email-always')</option>
<option value="2" <!--#if int($email_endjob) == "2" then 'selected="selected"' else ""#--> >$T('email-errorOnly')</option>
</select>
</div>
<div class="field-pair">
@@ -232,18 +235,18 @@
<span class="desc">$T('explain-prowl_apikey')</span>
</div>
<!--#set $section_label = 'prowl'#-->
<!--#for $type in $notify_keys#-->
<!--#for $type in $notify_types#-->
<div class="field-pair">
<label class="config" for="${section_label}_prio_$type">
$T($notify_texts[$type]).replace('/', ' / ') <!--#if $type == 'download'#--> / $T('link-pause') / $T('link-resume')<!--#end if#-->
$T($notify_types[$type]).replace('/', ' / ')
</label>
<select name="${section_label}_prio_$type" id="${section_label}_prio_$type">
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == -3 then 'selected="selected"' else ""#--> >$T('prowl-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == -2 then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == -1 then 'selected="selected"' else ""#--> >$T('prowl-moderate')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == 0 then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == 1 then 'selected="selected"' else ""#--> >$T('prowl-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == 2 then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == "-3" then 'selected="selected"' else ""#--> >$T('prowl-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == "-2" then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == "-1" then 'selected="selected"' else ""#--> >$T('prowl-moderate')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == "0" then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == "1" then 'selected="selected"' else ""#--> >$T('prowl-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == "2" then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
</select>
</div>
<!--#end for#-->
@@ -298,18 +301,18 @@
<span class="desc">$T('explain-pushover_emergency_expire')</span>
</div>
<!--#set $section_label = 'pushover'#-->
<!--#for $type in $notify_keys#-->
<!--#for $type in $notify_types#-->
<div class="field-pair">
<label class="config" for="${section_label}_prio_$type">
$T($notify_texts[$type]).replace('/', ' / ') <!--#if $type == 'download'#--> / $T('link-pause') / $T('link-resume')<!--#end if#-->
$T($notify_types[$type]).replace('/', ' / ')
</label>
<select name="${section_label}_prio_$type" id="${section_label}_prio_$type">
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == -3 then 'selected="selected"' else ""#--> >$T('pushover-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == -2 then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == -1 then 'selected="selected"' else ""#--> >$T('pushover-low')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == 0 then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == 1 then 'selected="selected"' else ""#--> >$T('pushover-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == 2 then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == "-3" then 'selected="selected"' else ""#--> >$T('pushover-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == "-2" then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == "-1" then 'selected="selected"' else ""#--> >$T('pushover-low')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == "0" then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == "1" then 'selected="selected"' else ""#--> >$T('pushover-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == "2" then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
</select>
</div>
<!--#end for#-->

View File

@@ -1,6 +1,7 @@
<!--#set global $pane="RSS"#-->
<!--#set global $help_uri="configuration/3.0/rss"#-->
<!--#set global $help_uri="configuration/3.4/rss"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import html#-->
<div class="colmask">
<!--#if not $active_feed#-->
<div class="section">
@@ -9,21 +10,21 @@
<p>$T('explain-RSS')</p>
<form action="add_rss_feed" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<table class="catTable">
<table class="catTable addRssTable">
<tr>
<th>&nbsp;</th>
<th>$T('name')</th>
<th>$T('feed') URL</th>
<th>$T('feed') URLs</th>
<th>&nbsp;</th>
</tr>
<tr class="even">
<td>
<input type="checkbox" name="enable" value="1" checked />
</td>
<td>
<input type="text" name="feed" class="smaller_input" value="$feed" />
<td class="new-feed-title">
<input type="text" name="feed" value="$feed" />
</td>
<td>
<td class="new-feed-url">
<input type="text" name="uri" placeholder="$T('addMultipleFeeds')" />
</td>
<td class="nowrap">
@@ -45,9 +46,10 @@
<!--#set $odd = False#-->
<!--#for $feed_item in $feeds#-->
<!--#set $odd = not $odd#-->
<!--#set $feed_item_html = html.escape($feed_item)#-->
<tr class="data-row <!--#if $odd then " alt " else " "#-->">
<td class="chk">
<input type="checkbox" class="toggleFeedCheckbox" name="enable" value="1" <!--#if int($rss[$feed_item]['enable']) !=0 then 'checked="checked"' else ""#--> rel="$feed_item" />
<input type="checkbox" class="toggleFeedCheckbox" name="enable" value="1" <!--#if int($rss[$feed_item]['enable']) !=0 then 'checked="checked"' else ""#--> rel="$feed_item_html" />
</td>
<td class="title">
<a href="?feed=$rss[$feed_item]['link']" class="subscription-title path feed <!--#if int($rss[$feed_item]['enable']) != 0 then 'feed_enabled' else 'feed_disabled'#-->">
@@ -55,10 +57,10 @@
</a>
</td>
<td class="controls">
<button type="button" class="btn btn-default testFeed" rel="$feed_item"><span class="glyphicon glyphicon-sort"></span> $T('button-preFeed')</button>
<button type="button" class="btn btn-default testFeed" rel="$feed_item_html"><span class="glyphicon glyphicon-sort"></span> $T('button-preFeed')</button>
<input type="hidden" name="uri" value="$rss[$feed_item]['uris']" />
<button type="button" class="btn btn-default editFeed" rel="$feed_item"><span class="glyphicon glyphicon-pencil"></span> $T('Edit')</button>
<button type="button" class="btn btn-default delFeed" rel="$feed_item"><span class="glyphicon glyphicon-trash"></span></button>
<button type="button" class="btn btn-default editFeed" rel="$feed_item_html"><span class="glyphicon glyphicon-pencil"></span> $T('rss-edit')</button>
<button type="button" class="btn btn-default delFeed" rel="$feed_item_html"><span class="glyphicon glyphicon-trash"></span></button>
</td>
</tr>
<!--#for $uri_index, $uri in enumerate($rss[$feed_item]['uri'])#-->
@@ -90,7 +92,7 @@
<label class="config narrow" for="rss_rate">$T('opt-rss_rate')</label>
<input type="number" name="rss_rate" id="rss_rate" value="$rss_rate" min="15" max="1440" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> $T('button-save')</button>
<span class="config narrow">&nbsp;&nbsp;$T('Next scan at:')&nbsp;$rss_next</span>
<span class="config narrow">&nbsp;&nbsp;$T('rss-nextscan'): $rss_next</span>
<span class="desc narrow">$T('explain-rss_rate')</span>
</div>
</fieldset>
@@ -106,12 +108,12 @@
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<h2 class="nomargin activeRSS">
<a href="${root}config/rss/">$T('cmenu-rss')</a> &raquo;
<a href="$rss[$active_feed]['uri']" onclick="window.open(this.href); return false;">$active_feed</a>
$active_feed
</h2>
<!--#if $error#-->
<div class="alert alert-danger">
<span class="glyphicon glyphicon-exclamation-sign"></span>
$error
<!--#echo html.escape($error)#-->
</div>
<!--#end if#-->
<form action="upd_rss_feed" method="post">
@@ -508,9 +510,37 @@
</div>
<!--#end if#-->
</div>
</div>
<!-- /colmask -->
<form method="post" action="save_rss_feed" class="modal fade" id="rss_edit_modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Edit') <span id="feed_edit_name_label"></span></h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="feed_edit_new_name">$T('name')</label>
<input type="text" class="form-control" name="feed_new_name" id="feed_edit_new_name" placeholder="$T('name')" size="">
</div>
<div class="form-group">
<label for="feed_edit_url">$T('feed') URLs</label>
<input type="text" class="form-control" name="uri" id="feed_edit_url" placeholder="$T('feed') URLs" size="">
<span class="help-block">$T('addMultipleFeeds')</span>
</div>
<input type="hidden" name="feed" id="feed_edit_old_name" />
<input type="hidden" name="apikey" value="$apikey" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> $T('cancel')</button>
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> $T('rss-accept')</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</form><!-- /.modal -->
<script type="text/javascript" src="${root}staticcfg/js/jquery.tablesort.min.js"></script>
<script type="text/javascript">
function urlencode(str) {
@@ -537,20 +567,16 @@ function urlencode(str) {
\$('.editFeed').click(function(){
var oldURI = \$(this).prev().val();
var newURI = prompt("$T('feed') URL. \n$T('addMultipleFeeds').", oldURI );
if(newURI != "" && newURI !== null) {
var whichFeed = \$(this).attr("rel");
var isEnabled = \$('.toggleFeedCheckbox[rel="'+whichFeed+'"]').attr('checked') == "checked"? 1 : 0;
\$.ajax({
type: "POST",
url: "save_rss_feed",
data: {feed: whichFeed, uri: newURI, enable: isEnabled, apikey: "$apikey" }
}).done(function( msg ) {
location.reload();
});
} else {
return false;
}
var whichFeed = \$(this).attr("rel");
// Fill the values
\$('#feed_edit_name_label').text(whichFeed)
\$('#feed_edit_old_name').val(whichFeed)
\$('#feed_edit_new_name').val(whichFeed)
\$('#feed_edit_url').val(oldURI)
// Show the modal
\$('#rss_edit_modal').modal('show');
});
\$('.delFeed').click(function(e){

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Scheduling"#-->
<!--#set global $help_uri="configuration/3.0/scheduling"#-->
<!--#set global $help_uri="configuration/3.4s/scheduling"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<%
@@ -50,7 +50,7 @@ else:
<select name="action" id="action">
<optgroup label="$T('sch-action')">
<!--#for $action in $actions#-->
<option value="$action" data-action="" data-noarg="<!--#if $action is 'speedlimit' then 0 else 1#-->">$actions_lng[$action]</option>
<option value="$action" data-action="" data-noarg="<!--#if $action == 'speedlimit' then 0 else 1#-->">$actions_lng[$action]</option>
<!--#end for#-->
</optgroup>
<optgroup label="$T('cmenu-servers')">

View File

@@ -1,49 +1,15 @@
<!--#set global $pane="Servers"#-->
<!--#set global $help_uri="configuration/3.0/servers"#-->
<!--#set global $help_uri="configuration/3.4/servers"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--
We need to find how many months we have recorded so far, so we
loop over all the dates to find the lowest value and then use
this to calculate the date-selector and maximum value per month.
-->
<!--#import json#-->
<!--#import datetime#-->
<!--#import sabnzbd.misc#-->
<!--#set month_names = [$T('January'), $T('February'), $T('March'), $T('April'), $T('May'), $T('June'), $T('July'), $T('August'), $T('September'), $T('October'), $T('November'), $T('December')] #-->
<!--#set min_date = datetime.date.today()#-->
<!--#set max_data_all = {}#-->
<!--#for $server in $servers #-->
<!--#if 'amounts' in $server#-->
<!--#set max_data_server = {}#-->
<!--#for date in $server['amounts'][4]#-->
<!--#set split_date = $date.split('-')#-->
<!--#set min_date = min(min_date, datetime.date(int(split_date[0]), int(split_date[1]), 1))#-->
<!--#set month_date = $date[:7]#-->
<!--#if $month_date not in $max_data_server#-->
<!--#set max_data_server[$month_date] = 0#-->
<!--#end if#-->
<!--#set max_data_server[$month_date] = max(max_data_server[$month_date], $server['amounts'][4][$date])#-->
<!--#end for#-->
<!--#for month_date in max_data_server#-->
<!--#if $month_date not in $max_data_all#-->
<!--#set max_data_all[$month_date] = 0#-->
<!--#end if#-->
<!--#set max_data_all[$month_date] = max(max_data_all[$month_date], max_data_server[$month_date])#-->
<!--#end for#-->
<!--#end if#-->
<!--#end for#-->
<!--#set months_recorded = list(sabnzbd.misc.monthrange(min_date, datetime.date.today()))#-->
<!--#$months_recorded.reverse()#-->
<script type="text/javascript">
// Define variable needed for the server-plots
var serverData = {}
<script type="text/javascript" xmlns="http://www.w3.org/1999/html">
// Define variable needed for the server-statistics
var serverBandwithData = {}
var serverArticleTries = {}
var serverArticleFailed = {}
</script>
<div class="colmask">
@@ -53,21 +19,13 @@
<input type="checkbox" id="advanced-settings-button" name="advanced-settings-button"> $T('button-advanced')
</label>
<!--#if $months_recorded#-->
<div class="advanced-buttonSeperator"></div>
<div class="chart-selector-container" title="$T('srv-bandwidth')">
<div class="chart-selector-container" title="$T('selectedDates')">
<span class="glyphicon glyphicon-signal"></span>
<select name="chart-selector" id="chart-selector">
<!--#for $cur_date in months_recorded#-->
<!--#set month_date = '%d-%02d' % ($cur_date.year, $cur_date.month)#-->
<!--#if $month_date not in $max_data_all#-->
<!--#set max_data_all[$month_date] = 0#-->
<!--#end if#-->
<option value="$month_date" data-max="$max_data_all[$month_date]">$month_names[$cur_date.month-1] $cur_date.year</option>
<!--#end for#-->
</select>
<!--#set today = datetime.date.today()#-->
<input type="date" name="chart-start" id="chart-start" value="<!--#echo (today-datetime.timedelta(days=30)).strftime('%Y-%m-%d')#-->"> -
<input type="date" name="chart-end" id="chart-end" value="<!--#echo today.strftime('%Y-%m-%d')#-->">
</div>
<!--#end if#-->
</div>
<div class="section" id="addServerContent" style="display: none;">
<div class="col2">
@@ -76,12 +34,17 @@
<div class="col1">
<form action="addServer" method="post" autocomplete="off" onsubmit="removeObfuscation();">
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="output" value="json" />
<fieldset>
<div class="field-pair">
<label class="config" for="enable">$T('srv-enable')</label>
<input type="checkbox" name="enable" id="enable" value="1" checked="checked" />
<span class="desc">$T('srv-enable')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="displayname">$T('srv-displayname')</label>
<input type="text" name="displayname" id="displayname" />
</div>
<div class="field-pair">
<label class="config" for="host">$T('srv-host')</label>
<input type="text" name="host" id="host" required />
@@ -106,7 +69,7 @@
</div>
<div class="field-pair">
<label class="config" for="connections">$T('srv-connections')</label>
<input type="number" name="connections" id="connections" min="1" max="100" value="8" required />
<input type="number" name="connections" id="connections" min="1" max="1000" value="8" required />
</div>
<div class="field-pair">
<label class="config" for="priority">$T('srv-priority')</label>
@@ -146,8 +109,14 @@
<span class="desc">$T('explain-optional')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="displayname">$T('srv-displayname')</label>
<input type="text" name="displayname" id="displayname" />
<label class="config" for="expire_date">$T('srv-expire_date')</label>
<input type="date" name="expire_date" id="expire_date" />
<span class="desc">$T('srv-explain-expire_date')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="quota">$T('swtag-quota')</label>
<input type="text" name="quota" id="quota" class="smaller_input" />
<span class="desc">$T('srv-explain-quota')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="notes">$T('srv-notes')</label>
@@ -171,12 +140,13 @@
<!--#for $cur, $server in enumerate($servers) #-->
<form action="saveServer" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="output" value="json" />
<input type="hidden" name="server" value="$server['name']" />
<input type="hidden" id="ajax" name="ajax" value=1 />
<div class="section <!--#if int($server['enable']) == 0 then 'server-disabled' else ""#-->">
<div class="col2 <!--#if int($server['enable']) == 0 then 'server-disabled' else ""#-->">
<h3>$server['displayname'] <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3 title="$server['displayname']">$server['displayname'] <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<!--#if int($server['enable']) != 0 #-->
<!--#if $last_prio != $server['priority'] and $cur_prio_color+1 < len($prio_colors) #-->
<!--#set $cur_prio_color = $cur_prio_color+1 #-->
@@ -197,6 +167,10 @@
<div class="col1" style="display:none;">
<input type="hidden" name="enable" id="enable$cur" value="$int($server['enable'])" />
<fieldset>
<div class="field-pair advanced-settings">
<label class="config" for="displayname$cur">$T('srv-displayname')</label>
<input type="text" name="displayname" id="displayname$cur" value="$server['displayname']" />
</div>
<div class="field-pair">
<label class="config" for="host$cur">$T('srv-host')</label>
<input type="text" name="host" id="host$cur" value="$server['host']" required />
@@ -221,7 +195,7 @@
</div>
<div class="field-pair">
<label class="config" for="connections$cur">$T('srv-connections')</label>
<input type="number" name="connections" id="connections$cur" value="$server['connections']" min="1" max="100" required />
<input type="number" name="connections" id="connections$cur" value="$server['connections']" min="1" max="1000" required />
</div>
<div class="field-pair">
<label class="config" for="priority$cur">$T('srv-priority')</label>
@@ -262,8 +236,14 @@
<span class="desc">$T('srv-explain-send_group')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="displayname$cur">$T('srv-displayname')</label>
<input type="text" name="displayname" id="displayname$cur" value="$server['displayname']" />
<label class="config" for="expire_date$cur">$T('srv-expire_date')</label>
<input type="date" name="expire_date" id="expire_date$cur" value="$server['expire_date']" />
<span class="desc">$T('srv-explain-expire_date')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="quota$cur">$T('swtag-quota')</label>
<input type="text" name="quota" id="quota$cur" value="$server['quota']" class="smaller_input" />
<span class="desc">$T('srv-explain-quota')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="notes$cur">$T('srv-notes')</label>
@@ -282,19 +262,34 @@
<div class="col1" style="display:block;">
<!--#if 'amounts' in $server#-->
<div class="server-amounts-text">
<b>$T('srv-bandwidth'):</b><br/>
$T('total'): $(server['amounts'][0])B<br/>
$T('today'): $(server['amounts'][3])B<br/>
$T('thisWeek'): $(server['amounts'][2])B<br/>
$T('thisMonth'): $(server['amounts'][1])B<br/>
<span id="server-data-label-${cur}"></span>: <span id="server-data-value-${cur}"></span>
<p>
<b>$T('srv-bandwidth'):</b><br/>
$T('total'): $(server['amounts'][0])B<br/>
$T('today'): $(server['amounts'][3])B<br/>
$T('thisWeek'): $(server['amounts'][2])B<br/>
$T('thisMonth'): $(server['amounts'][1])B<br/>
$T('selectedDates'): <span id="server-bandwith-value-${cur}"></span>
</p>
<p title="$T('readwiki')">
<b>$T('srv-article-availability'):</b><br/>
$T('selectedDates'): <span id="server-article-value-${cur}"></span>
</p>
<!--#if $server['expire_date']#-->
<p><b>$T('srv-expire_date'):</b> $(server['expire_date'])</p>
<!--#end if#-->
<!--#if $server['quota']#-->
<p><b>$T('quota-left'):</b> $(server['quota_left'])B</p>
<!--#end if#-->
</div>
<div class="server-chart" data-serverid="${cur}"s>
<div class="server-chart" data-serverid="${cur}">
<div id="server-chart-${cur}" class="ct-chart"></div>
</div>
<script type="text/javascript">
// Server data
serverData[${cur}] = <!--#echo json.dumps($server['amounts'][4])#-->
serverBandwithData[${cur}] = <!--#echo json.dumps($server['amounts'][4])#-->
serverArticleTries[${cur}] = <!--#echo json.dumps($server['amounts'][5])#-->
serverArticleFailed[${cur}] = <!--#echo json.dumps($server['amounts'][6])#-->
</script>
<!--#end if#-->
</div>
@@ -331,58 +326,91 @@
}
function showCharts() {
// This month
var theMonth = \$('#chart-selector').val()
var thisDay = new Date()
// Get the constants
const startDate = new Date(\$('#chart-start').val())
const endDate = new Date(\$('#chart-end').val())
const oneDay = 24 * 60 * 60 * 1000
const nrDays = Math.round((endDate-startDate)/oneDay)
// What month are we doing?
var inputDate = new Date(theMonth+'-01')
var baseDate = new Date(inputDate.getUTCFullYear(), inputDate.getUTCMonth(), 1)
var maxDaysInMonth = new Date(baseDate.getFullYear(), baseDate.getMonth()+1, 0).getDate()
// Show only maximum 10 labels to avoid cluttering
const labelStep = Math.round(nrDays/10)
// Set the new maximum
chartOptions.axisY.high = \$('#chart-selector :selected').data('max');
chartOptions.axisY.low = 0
// Save largest value
var maxBandwith = 0
// For each chart
\$('.server-chart').each(function(i, elemn) {
var server_id = \$(elemn).data('serverid')
\$('.server-chart').each(function(j, elemn) {
const server_id = \$(elemn).data('serverid')
var totalBandwithThisRange = 0
var totalArticlesTriedThisRange = 0
var totalArticlesFailedThisRange = 0
// Fill the data array
var data = {
labels: [],
series: [[]]
};
var totalThisMonth = 0
for(var i = 1; i < maxDaysInMonth+1; i++) {
for(var i = 0; i < nrDays+1; i++) {
// Update the date
const checkDate = new Date(startDate)
checkDate.setDate(checkDate.getDate() + i);
// Add X-label
if(i % 3 == 1) {
data['labels'].push(i)
if(i % labelStep === 0) {
data['labels'].push(checkDate.getDate())
} else {
data['labels'].push(NaN)
}
// Get formatted date
baseDate.setDate(i)
var dateCheck = toFormattedDate(baseDate)
// Date we can check in the array
const dateCheck = toFormattedDate(checkDate)
// Add data if we have it
if(dateCheck in serverData[server_id]) {
data['series'][0].push(serverData[server_id][dateCheck])
totalThisMonth += serverData[server_id][dateCheck]
} else if(thisDay.getYear() == baseDate.getYear() && thisDay.getMonth() == baseDate.getMonth() && thisDay.getDate() < i) {
data['series'][0].push(NaN)
if(dateCheck in serverBandwithData[server_id]) {
data['series'][0].push(serverBandwithData[server_id][dateCheck])
totalBandwithThisRange += serverBandwithData[server_id][dateCheck]
maxBandwith = Math.max(maxBandwith, serverBandwithData[server_id][dateCheck])
} else {
data['series'][0].push(0)
}
// Article stats
if(dateCheck in serverArticleTries[server_id]) {
totalArticlesTriedThisRange += serverArticleTries[server_id][dateCheck]
totalArticlesFailedThisRange += serverArticleFailed[server_id][dateCheck]
}
}
// Update the text value
\$('#server-data-label-' + server_id).text(\$('#chart-selector :selected').text())
\$('#server-data-value-' + server_id).text(filesize(totalThisMonth, {round: 1}))
\$('#server-bandwith-value-' + server_id).text(filesize(totalBandwithThisRange, {round: 1}))
// Calculate article success ratio, if available
var articleRatio = Math.round(100 * (1 - totalArticlesFailedThisRange/totalArticlesTriedThisRange))
// If values were missing
if(!isNaN(articleRatio)) {
// Use filesize to convert to unit-display
\$('#server-article-value-' + server_id).text('$T("srv-articles-tried")'.replace('%f', articleRatio).replace('%d', filesize(totalArticlesTriedThisRange, {unix: true, round: 0, spacer: "", base: 1})))
} else {
\$('#server-article-value-' + server_id).text('$T("notAvailable")')
}
// Save bandwidth data in a very ugly way, but we need to do this
// so we can calculate the maximum Y-axis for all graphs
\$(elemn).data("chart-data", data)
})
// Set the maximum
chartOptions.axisY.high = maxBandwith
chartOptions.axisY.low = 0
// Update all the axis with the largest value and draw the graph
\$('.server-chart').each(function(j, elemn) {
const server_id = \$(elemn).data('serverid')
// Show the chart
chart = new Chartist.Line('#server-chart-'+server_id, data, chartOptions);
chart = new Chartist.Line('#server-chart-'+server_id, \$(elemn).data("chart-data"), chartOptions)
chart.on('created', function(context) {
// Make sure to add this as the first child so it's at the bottom
context.svg.elem('rect', {
@@ -391,7 +419,7 @@
width: context.chartRect.width(),
height: context.chartRect.height()+2,
fill: 'none',
stroke: '#B9B9B9',
stroke: '#b9b9b9',
'stroke-width': '1px'
}, '', context.svg, true)
\$('#server-chart-'+server_id+' .ct-label.ct-vertical').each(function(index, elmn) {
@@ -399,6 +427,10 @@
})
});
})
// Limit input to sensible values
\$('#chart-start').attr("max", \$('#chart-end').val())
\$('#chart-end').attr("min", \$('#chart-start').val())
}
// Need to mitigate timezone effects!
@@ -425,7 +457,7 @@
/**
Update charts when changed
**/
\$('#chart-selector').on('change', function(elemn) {
\$('#chart-start, #chart-end').on('change', function(elemn) {
showCharts()
// Lets us leave (needs to be called after the change event)
@@ -492,7 +524,7 @@
\$.ajax({
type: "POST",
url: "../../api",
data: "mode=config&output=json&name=test_server&" + \$(this).parents('form:first').serialize()
data: "mode=config&name=test_server&" + \$(this).parents('form:first').serialize()
}).then(function(data) {
// Let's replace the link
msg = data.value.message.replace('https://sabnzbd.org/certificate-errors', '<a href="https://sabnzbd.org/certificate-errors" class="alert-link" target="_blank">https://sabnzbd.org/certificate-errors</a>')
@@ -515,7 +547,7 @@
});
\$('.delServer').click(function(){
if( confirm("$T('Plush-confirm')") ) {
if( confirm("$T('confirm')") ) {
\$(this).parents('form:first').attr('action','delServer').submit();
// Let us leave!
formWasSubmitted = true;
@@ -526,7 +558,7 @@
});
\$('.clrServer').click(function(){
if( confirm("$T('Plush-confirm')") ) {
if( confirm("$T('confirm')") ) {
\$(this).parents('form:first').attr('action','clrServer').submit();
// Let us leave!
formWasSubmitted = true;

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Sorting"#-->
<!--#set global $help_uri="configuration/3.0/sorting"#-->
<!--#set global $help_uri="configuration/3.4/sorting"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -11,12 +11,13 @@
<h3>$T('seriesSorting') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p>
<b>$T('affectedCat')</b><br/>
<select name="tv_cat" multiple="multiple" class="multiple_cats">
<select name="tv_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $tv_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#-->
</select>
</p>
<p>$T('selectOneCat')</p>
</div>
<!-- /col2 -->
<div class="col1">
@@ -95,6 +96,26 @@
<td>%s_N</td>
<td>$T('show-us-name')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Resolution'):</b></td>
<td>%r</td>
<td>1080p</td>
</tr>
<tr>
<td class="align-right"><b>$T('year'):</b></td>
<td>%y</td>
<td>2021</td>
</tr>
<tr>
<td class="align-right"><b>$T('decade'):</b></td>
<td>%decade</td>
<td>20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0decade</td>
<td>2020</td>
</tr>
<tr>
<td class="align-right"><b>$T('show-seasonNum'):</b></td>
<td>%s</td>
@@ -151,6 +172,43 @@
<td>$T('text')</td>
</tr>
</tbody>
<tbody>
<tr>
<th class="align-right"><b>GuessIt</b></th>
<th>$T('sort-pattern')</th>
<th>$T('sort-result')</th>
</tr>
</tbody>
<tbody>
<tr>
<td class="align-right"><b>$T('sort-guessitMeaning'):</b></td>
<td>%GI&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-sp-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G.I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-dot-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G_I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-us-property')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Example')</b></td>
<td>%GI&lt;audio_codec&gt;</td>
<td>DTS</td>
</tr>
<tr>
<td class="align-right" style="vertical-align:top;"><b>$T('Valid properties')</b></td>
<td colspan=2>
<!--#for $prop in $guessit_properties#-->
$prop<br>
<!--#end for#-->
</td>
</tr>
</tbody>
</table>
</div>
<div class="field-pair">
@@ -166,12 +224,13 @@
<h3>$T('movieSort') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p>
<b>$T('affectedCat')</b><br/>
<select name="movie_cat" multiple="multiple" class="multiple_cats">
<select name="movie_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $movie_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#-->
</select>
</p>
<p>$T('selectOneCat')</p>
</div>
<!-- /col2 -->
<div class="col1">
@@ -225,6 +284,21 @@
</tr>
</thead>
<tbody>
<tr>
<td class="align-right"><b>$T('sort-title'):</b></td>
<td>%sn</td>
<td>$T('movie-sp-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%s.n</td>
<td>$T('movie-dot-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%s_n</td>
<td>$T('movie-us-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td class="align-right"><b>$T('sort-title'):</b></td>
<td>%title</td>
@@ -240,26 +314,31 @@
<td>%_title</td>
<td>$T('movie-us-name')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Resolution'):</b></td>
<td>%r</td>
<td>1080p</td>
</tr>
<tr>
<td class="align-right"><b>$T('year'):</b></td>
<td>%y</td>
<td>2009</td>
<td>2021</td>
</tr>
<tr>
<td class="align-right"><b>$T('decade'):</b></td>
<td>%decade</td>
<td>20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0decade</td>
<td>2020</td>
</tr>
<tr>
<td class="align-right"><b>$T('extension'):</b></td>
<td>%ext</td>
<td>avi</td>
</tr>
<tr>
<td class="align-right"><b>$T('decade'):</b></td>
<td>%decade</td>
<td>00</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0decade</td>
<td>2000</td>
</tr>
<tr>
<td class="align-right"><b>$T('orgFilename'):</b></td>
<td>%fn</td>
@@ -290,6 +369,43 @@
<td>1</td>
</tr>
</tbody>
<tbody>
<tr>
<th class="align-right"><b>GuessIt</b></th>
<th>$T('sort-pattern')</th>
<th>$T('sort-result')</th>
</tr>
</tbody>
<tbody>
<tr>
<td class="align-right"><b>$T('sort-guessitMeaning'):</b></td>
<td>%GI&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-sp-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G.I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-dot-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G_I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-us-property')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Example')</b></td>
<td>%GI&lt;audio_codec&gt;</td>
<td>DTS</td>
</tr>
<tr>
<td class="align-right" style="vertical-align:top;"><b>$T('Valid properties')</b></td>
<td colspan=2>
<!--#for $prop in $guessit_properties#-->
$prop<br>
<!--#end for#-->
</td>
</tr>
</tbody>
</table>
</div>
<div class="field-pair">
@@ -305,12 +421,13 @@
<h3>$T('dateSorting') <a href="$helpuri$help_uri#toc9" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p>
<b>$T('affectedCat')</b><br/>
<select name="date_cat" multiple="multiple" class="multiple_cats">
<select name="date_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $date_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#-->
</select>
</p>
<p>$T('selectOneCat')</p>
</div>
<!-- /col2 -->
<div class="col1">
@@ -357,6 +474,21 @@
</tr>
</thead>
<tbody>
<tr>
<td class="align-right"><b>$T('show-name'):</b></td>
<td>%sn</td>
<td>$T('show-sp-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%s.n</td>
<td>$T('show-dot-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%s_n</td>
<td>$T('show-us-name') ($T('case-adjusted'))</td>
</tr>
<tr>
<td class="align-right"><b>$T('show-name'):</b></td>
<td>%t</td>
@@ -372,10 +504,25 @@
<td>%_t</td>
<td>$T('show-us-name')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Resolution'):</b></td>
<td>%r</td>
<td>1080p</td>
</tr>
<tr>
<td class="align-right"><b>$T('year'):</b></td>
<td>%y</td>
<td>2009</td>
<td>2021</td>
</tr>
<tr>
<td class="align-right"><b>$T('decade'):</b></td>
<td>%decade</td>
<td>20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0decade</td>
<td>2020</td>
</tr>
<tr>
<td class="align-right"><b>$T('month'):</b></td>
@@ -398,14 +545,14 @@
<td>02</td>
</tr>
<tr>
<td class="align-right"><b>$T('decade'):</b></td>
<td>%decade</td>
<td>00</td>
<td class="align-right"><b>$T('ep-name'):</b></td>
<td>%en</td>
<td>$T('ep-sp-name')</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0decade</td>
<td>2000</td>
<td>%e.n</td>
<td>$T('ep-dot-name')</td>
</tr>
<tr>
<td class="align-right"><b>$T('orgFilename'):</b></td>
@@ -423,6 +570,43 @@
<td>$T('text')</td>
</tr>
</tbody>
<tbody>
<tr>
<th class="align-right"><b>GuessIt</b></th>
<th>$T('sort-pattern')</th>
<th>$T('sort-result')</th>
</tr>
</tbody>
<tbody>
<tr>
<td class="align-right"><b>$T('sort-guessitMeaning'):</b></td>
<td>%GI&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-sp-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G.I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-dot-property')</td>
</tr>
<tr>
<td class="align-right"><b></b></td>
<td>%G_I&lt;$T('sort-guessitProperty')&gt;</td>
<td>$T('guessit-us-property')</td>
</tr>
<tr>
<td class="align-right"><b>$T('Example')</b></td>
<td>%GI&lt;audio_codec&gt;</td>
<td>DTS</td>
</tr>
<tr>
<td class="align-right" style="vertical-align:top;"><b>$T('Valid properties')</b></td>
<td colspan=2>
<!--#for $prop in $guessit_properties#-->
$prop<br>
<!--#end for#-->
</td>
</tr>
</tbody>
</table>
</div>
<div class="field-pair">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Special"#-->
<!--#set global $help_uri="configuration/3.0/special"#-->
<!--#set global $help_uri="configuration/3.4/special"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Switches"#-->
<!--#set global $help_uri="configuration/3.0/switches"#-->
<!--#set global $help_uri="configuration/3.4/switches"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -11,6 +11,7 @@
<form action="saveSwitches" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<input type="hidden" name="output" value="json" />
<div class="section advanced-settings">
<div class="col2">
<h3>$T('swtag-server') <a href="$helpuri$help_uri#toc1" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
@@ -120,6 +121,10 @@
</div>
<div class="field-pair">
<label class="config" for="unwanted_extensions">$T('opt-unwanted_extensions')</label>
<select name="unwanted_extensions_mode" id="unwanted_extensions_mode">
<option value="0" <!--#if int($unwanted_extensions_mode) == 0 then 'selected="selected"' else ""#--> >$T('unwanted_extensions_blacklist')</option>
<option value="1" <!--#if int($unwanted_extensions_mode) == 1 then 'selected="selected"' else ""#--> >$T('unwanted_extensions_whitelist')</option>
</select>
<input type="text" name="unwanted_extensions" id="unwanted_extensions" value="$unwanted_extensions"/>
<span class="desc">$T('explain-unwanted_extensions')</span>
</div>
@@ -136,8 +141,8 @@
<label class="config" for="auto_sort">$T('opt-auto_sort')</label>
<select name="auto_sort" id="auto_sort">
<option value="">$T('default')</option>
<option value="avg_age asc" <!--#if $auto_sort == "avg_age asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeAsc')</option>
<option value="avg_age desc" <!--#if $auto_sort == "avg_age desc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeDesc')</option>
<option value="avg_age desc" <!--#if $auto_sort == "avg_age desc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeAsc')</option>
<option value="avg_age asc" <!--#if $auto_sort == "avg_age asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeDesc')</option>
<option value="name asc" <!--#if $auto_sort == "name asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortNameAsc')</option>
<option value="name desc" <!--#if $auto_sort == "name desc" then 'selected="selected"' else ""#--> >$T('Glitter-sortNameDesc')</option>
<option value="size asc" <!--#if $auto_sort == "size asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortSizeAsc')</option>
@@ -237,6 +242,11 @@
<input type="checkbox" name="ignore_samples" id="ignore_samples" value="1" <!--#if int($ignore_samples) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-ignore_samples') $T('igsam-del').</span>
</div>
<div class="field-pair">
<label class="config" for="deobfuscate_final_filenames">$T('opt-deobfuscate_final_filenames')</label>
<input type="checkbox" name="deobfuscate_final_filenames" id="deobfuscate_final_filenames" value="1" <!--#if int($deobfuscate_final_filenames) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-deobfuscate_final_filenames') $T('explain-deobfuscate_final_filenames-ext')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="enable_meta">$T('opt-enable_meta')</label>
<input type="checkbox" name="enable_meta" id="enable_meta" value="1" <!--#if int($enable_meta) > 0 then 'checked="checked"' else ""#--> />

View File

File diff suppressed because one or more lines are too long

View File

@@ -550,26 +550,31 @@ tr.separator {
padding-right: 13px;
}
/* -- */
.RSS .addRssTable,
.RSS .addRssTable input[type="text"] {
width: 100%;
}
.RSS .addRssTable .new-feed-title {
max-width: 250px;
}
.RSS .addRssTable .new-feed-url {
width: 70%;
}
h2.activeRSS {
margin-bottom: 10px;
}
.activeRSS a, .activeRSS a:visited {
text-decoration: none;
.activeRSS a,
.activeRSS a:visited {
color: #000;
}
.activeRSS a:hover {
color: #4b4742;
}
.activeRSS a:first-of-type {
text-decoration: underline!important;
text-decoration: underline !important;
}
.favicon {
background-position: center center!important;
background-size: 16px 16px;
background-position: center center !important;
background-size: 22px 22px;
opacity: 1;
top: -1px;
height: 16px;
width: 16px;
height: 22px;
width: 22px;
float: left;
margin: 0 6px 0 2px;
text-align: center;
@@ -589,6 +594,7 @@ h2.activeRSS {
}
#subscriptions {
border: 1px solid #E5E5E5;
width: 100%;
}
.data-row {
border-top: 1px solid #E5E5E5;
@@ -600,6 +606,7 @@ h2.activeRSS {
#subscriptions .chk {
padding: 8px 5px 5px;
vertical-align: middle;
width: 40px;
}
#subscriptions .title {
font-weight: bold;
@@ -607,10 +614,11 @@ h2.activeRSS {
width: auto;
}
#subscriptions .favicon {
margin-left: 8px;
margin-left: 7px;
margin-top: -2px;
}
.ie6 .subscription-title {
width: 20em;
#subscriptions .glyphicon {
margin-top: 3px;
}
.subscription-title,
.subscription-title:hover {
@@ -795,6 +803,7 @@ input[type="submit"]:hover {
input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
@@ -1094,6 +1103,10 @@ input[type="checkbox"] {
font-size: 1.2em;
}
.host-warning-highlight {
border-color: #F0AD4E !important;
}
.fileBrowser .glyphicon {
margin-right: 2px;
top: 1px;
@@ -1172,6 +1185,31 @@ input[type="checkbox"] {
100% { transform: rotate(359deg); }
}
/***
RTL Fixes
***/
html[dir="rtl"] .col1 input[type='checkbox'],
html[dir="rtl"] .col2 h3 a {
left: 5px;
}
html[dir="rtl"] .modal-header .close {
float: left;
}
html[dir="rtl"] .field-pair {
position: relative;
}
html[dir="rtl"] .Sorting .presets.float-left,
html[dir="rtl"] .checkbox-days {
float: none;
}
html[dir="rtl"] .Scheduling form[action="addSchedule"] input[type="checkbox"] {
right: 5px;
}
@media screen and (min-width: 1200px) {
.Categories input[name="dir"] {
max-width: 240px !important;

View File

@@ -261,16 +261,16 @@ function do_restart() {
$('.main-restarting .restarting-url').text(urlTotal)
// Initiate restart
$.ajax({ url: '../../config/restart?apikey=' + sabSession,
$.ajax({ url: '../../api?mode=restart&apikey=' + sabSession,
complete: function() {
// Keep counter of failures
var failureCounter = 0;
var loopCounter = 0;
// Now we try until we can connect
var refreshInterval = setInterval(function() {
// We skip the first one
if(failureCounter == 0) {
failureCounter = failureCounter+1;
setInterval(function() {
loopCounter = loopCounter+1;
// We skip the first one so we give it time to shutdown
if(loopCounter < 2) {
return
}
$.ajax({ url: urlTotal,
@@ -279,17 +279,16 @@ function do_restart() {
location.href = urlTotal;
},
error: function(status, text) {
failureCounter = failureCounter+1;
// Too many failuers and we give up
if(failureCounter >= 6) {
// Too many failures and we give up
if(loopCounter >= 10) {
// If the port has changed 'Access-Control-Allow-Origin' header will not allow
// us to check if the server is back up. So after 7 failures we redirect
// us to check if the server is back up. So after 10 failures (20 sec) we redirect
// anyway in the hopes it works anyway..
location.href = urlTotal;
}
}
})
}, 4000)
}, 2000)
// Exception if we go from HTTPS to HTTP
// (this is not allowed by browsers and all of the above will be ignored)

View File

@@ -1 +0,0 @@
&nbsp;

View File

@@ -5,8 +5,10 @@
<tr>
<th style="width: 25px;"></th>
<th></th>
<th class="table-status-header" data-bind="css: { 'table-header-status-smaller' : extraHistoryColumn }"></th>
<th class="table-header-extra" data-bind="css: { 'table-extra-header-visible' : extraHistoryColumn }"></th>
<th class="table-status-header" data-bind="css: { 'table-header-status-smaller' : extraHistoryColumns().length }"></th>
<!-- ko foreach: extraHistoryColumns -->
<th class="table-header-extra"></th>
<!-- /ko -->
<th style="width: 130px;"></th>
<th style="width: 60px;"></th>
</tr>
@@ -137,10 +139,11 @@
<!-- /ko -->
</td>
<td class="status row-wrap-text" data-bind="text: statusText()" onclick="showDetails(this)"></td>
<!-- ko foreach: parent.parent.extraHistoryColumns -->
<td class="row-extra-text" onclick="showDetails(this)">
<div class="row-wrap-text" data-bind="text: extraText">
</div>
<div class="row-wrap-text" data-bind="text: \$parent.showColumn(\$data)"></div>
</td>
<!-- /ko -->
<td class="history-completedon row-wrap-text" data-bind="text: completedOn(), attr: { 'data-timestamp': completed }" onclick="showDetails(this)"></td>
<td class="delete">
<div class="dropdown">
@@ -221,4 +224,10 @@
<span data-bind="text: history.downloadedMonth"></span>B $T('Glitter-thisMonth')
<span data-bind="text: history.downloadedTotal"></span>B $T('Glitter-total')
</div>
</div>
<div class="info-container history-info" data-bind="visible: !hasHistory() && !displayTabbed()" style="display: none">
<span class="glyphicon glyphicon-save"></span>
<span data-bind="text: history.downloadedToday"></span>B $T('Glitter-today')
<span data-bind="text: history.downloadedMonth"></span>B $T('Glitter-thisMonth')
<span data-bind="text: history.downloadedTotal"></span>B $T('Glitter-total')
</div>

View File

@@ -26,13 +26,15 @@
<!-- /ko -->
<!-- ko foreach: allMessages -->
<tr>
<td class="table-messages-label">
<td class="table-messages-label" data-bind="attr: { 'colspan': 1 + !\$data.hasOwnProperty('clear') }">
<span class="label" data-bind="css: 'label-' + css, text: type"></span>
<span class="queue-message-text" data-bind="html: text"></span>
</td>
<!-- ko if: \$data.hasOwnProperty("clear") -->
<td class="table-messages-remove">
<!-- ko if: \$data.hasOwnProperty("clear") --><a href="#" data-bind="click: clear" class="hover-button"><span class="glyphicon glyphicon-remove"></span></a><!-- /ko -->
<a href="#" data-bind="click: clear" class="hover-button"><span class="glyphicon glyphicon-remove"></span></a>
</td>
<!-- /ko -->
</tr>
<!-- /ko -->
<!-- ko if: !hasMessages() && displayTabbed() -->

View File

@@ -86,73 +86,75 @@
<div class="tab-content">
<div class="tab-pane fade in active" id="options-status">
<div class="row">
<div class="col-sm-6">$T('dashboard-localIP4')</div>
<div class="col-sm-6">$T('dashboard-localIP4') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.localipv4() ? '$T('dashboard-connectionError')' : statusInfo.localipv4(), css: { 'options-bad-status' : !statusInfo.localipv4() }"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-publicIP4')</div>
<div class="col-sm-6">$T('dashboard-publicIP4') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.publicipv4() ? '$T('dashboard-connectionError')' : statusInfo.publicipv4(), css: { 'options-bad-status ' : !statusInfo.publicipv4() }"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-IP6')</div>
<div class="col-sm-6">$T('dashboard-IP6') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: statusInfo.ipv6"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-NameserverDNS')</div>
<div class="col-sm-6">$T('dashboard-NameserverDNS') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.dnslookup() ? '$T('dashboard-connectionError')' : statusInfo.dnslookup(), css: { 'options-bad-status' : (statusInfo.dnslookup() != 'OK') }"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<hr/>
<div class="row">
<div class="col-sm-6">$T('cache')</div>
<div class="col-sm-6">$T('cache') &nbsp; </div>
<div class="col-sm-6">
<span data-bind="text: cacheSize"></span> (<span data-bind="text: cacheArticles"></span> $T('Glitter-articles'))
</div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-systemPerformance')</div>
<div class="col-sm-6">$T('dashboard-systemPerformance') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.pystone"></span>
<a href="#" data-bind="click: testDiskSpeed" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small data-bind="truncatedText: statusInfo.cpumodel, length: 25, attr: { 'data-original-title': statusInfo.cpumodel }" data-tooltip="true"></small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-downloadDirSpeed')</div>
<div class="col-sm-6">$T('dashboard-downloadDirSpeed') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.downloaddirspeed()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: testDiskSpeed" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="truncatedText: statusInfo.downloaddir, length: 24, attr: { 'data-original-title': statusInfo.downloaddir }" data-tooltip="true"></span>)</small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-completeDirSpeed')</div>
<div class="col-sm-6">$T('dashboard-completeDirSpeed') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.completedirspeed()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: testDiskSpeed" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="truncatedText: statusInfo.completedir, length: 24, attr: { 'data-original-title': statusInfo.completedir }" data-tooltip="true"></span>)</small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-internetBandwidth')</div>
<div class="col-sm-6">$T('dashboard-internetBandwidth') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.internetbandwidth()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: testDiskSpeed" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="text: statusInfo.internetbandwidth()*8"></span> Mbps)</small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row test-download">
<div class="col-sm-6">$T('dashboard-testDownload')</div>
<div class="col-sm-6">$T('dashboard-testDownload') &nbsp; </div>
<div class="col-sm-6">
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="100MB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 100 MB</a>
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="1000MB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 1000 MB</a>
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="1000MB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 1 GB</a>
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="10GB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 10 GB</a>
</div>
</div>
<hr />
@@ -168,7 +170,7 @@
</div>
<div class="row options-function-box">
<div class="col-sm-6">
<a href="./status/showlog?apikey=$apikey" target="_blank" class="btn btn-default" data-tooltip="true" data-placement="top" title="$T('Glitter-logText')">
<a href="./api?mode=showlog&apikey=$apikey" target="_blank" class="btn btn-default" data-tooltip="true" data-placement="top" title="$T('Glitter-logText')">
<span class="glyphicon glyphicon-file"></span> $T('link-showLog')
</a>
</div>
@@ -217,6 +219,10 @@
<span data-bind="text: servertotalconn"></span>
</div>
</div>
<div class="row">
<div class="col-sm-6">$T('Glitter-speed')</div>
<div class="col-sm-6"><span data-bind="text: serverbps"></span>B/s</div>
</div>
<div class="row" data-bind="visible: servererror()">
<div class="col-sm-12">
<div class="alert alert-danger">
@@ -279,8 +285,8 @@
<tr>
<td><span class="glyphicon glyphicon-folder-open"></span></td>
<td class="row-wrap-text"><strong data-bind="html: \$data"></strong></td>
<td><a href="#" data-bind="click: \$root.folderProcess" data-action="add" class="hover-button" data-tooltip="true" data-placement="left" title="$T('Glitter-backToQueue')"><span class="glyphicon glyphicon-plus-sign"></span></a></td>
<td><a href="#" data-bind="click: \$root.folderProcess" data-action="delete" class="hover-button" data-tooltip="true" data-placement="left" title="$T('Glitter-deleteJobAndFolders')"><span class="glyphicon glyphicon-trash"></span></a></td>
<td><a href="#" data-bind="click: \$root.folderProcess" data-action="add_orphan" class="hover-button" data-tooltip="true" data-placement="left" title="$T('Glitter-backToQueue')"><span class="glyphicon glyphicon-plus-sign"></span></a></td>
<td><a href="#" data-bind="click: \$root.folderProcess" data-action="delete_orphan" class="hover-button" data-tooltip="true" data-placement="left" title="$T('Glitter-deleteJobAndFolders')"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
</tbody>
</table>
@@ -367,8 +373,7 @@
<span class="label label-warning">&gt; 1200 pixels</span>
</label>
<div class="col-sm-4">
<select name="general-extra-column" class="form-control" data-bind="value: extraQueueColumn">
<option value="">$T('none')</option>
<select name="general-extra-column" class="form-control-multiselect form-control" data-bind="selectedOptions: extraQueueColumns" multiple="true">
<option value="category">$T('category')</option>
<option value="priority">$T('priority')</option>
<option value="processing">$T('swtag-pp')</option>
@@ -383,8 +388,7 @@
<span class="label label-warning">&gt; 1200 pixels</span>
</label>
<div class="col-sm-4">
<select name="general-extra-column" class="form-control" data-bind="value: extraHistoryColumn">
<option value="">$T('none')</option>
<select name="general-extra-column" class="form-control-multiselect form-control" data-bind="selectedOptions: extraHistoryColumns" multiple="true">
<option value="category">$T('category')</option>
<option value="size">$T('size')</option>
<option value="speed">$T('Glitter-speed')</option>
@@ -399,6 +403,14 @@
<input type="checkbox" name="displayCompact" value="true" data-bind="checked: displayCompact" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
$T("Glitter-displayFullWidth")
</label>
<div class="col-sm-4">
<input type="checkbox" name="displayFullWidth" value="true" data-bind="checked: displayFullWidth" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
$T("Glitter-displayTabbed")
@@ -434,14 +446,14 @@
<div id="modal-add-nzb" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form class="modal-content" data-bind="submit: addNZB">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-addNZB')</h4>
</div>
<div class="modal-body">
<div class="modal-body form-horizontal">
<div class="row">
<form data-bind="submit: addNZBFromURL" class="col-sm-6">
<div class="col-sm-6">
<fieldset>
<legend class="row-wrap-text">$T('Glitter-addFromURL')</legend>
<div class="input-group" data-tooltip="true" data-placement="bottom" title="$file_exts">
@@ -451,8 +463,8 @@
</span>
</div>
</fieldset>
</form>
<form data-bind="submit: addNZBFromFileForm" class="col-sm-6">
</div>
<div class="col-sm-6">
<fieldset>
<legend class="row-wrap-text">$T('Glitter-addFromFile')</legend>
<div class="input-group" data-tooltip="true" data-placement="bottom" title="$file_exts">
@@ -466,37 +478,53 @@
</span>
</div>
</fieldset>
</form>
</div>
<div class="clearfix"></div>
<hr />
<div class="row form-horizontal">
<label class="col-sm-6 control-label">$T('Glitter-addnzbFilename')</label>
<div class="col-sm-6">
<input type="text" name="nzbname" id="nzbname" placeholder="$T('name')" class="form-control" />
</div>
</div>
<hr />
<div class="clearfix"></div>
<div class="add-nzb-inputbox" title="$T('category')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-tag"></span>
<select name="Category" class="form-control" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText',"></select>
<hr />
<div class="form-group">
<label class="col-sm-4 control-label">$T('name')</label>
<div class="col-sm-6">
<input type="text" name="nzbname" id="nzbname" placeholder="$T('Glitter-addnzbFilename')" class="form-control" />
</div>
</div>
<div class="add-nzb-inputbox" title="$T('priority')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span>
<select name="Priority" class="form-control" data-bind="options: queue.priorityOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<div class="form-group">
<label class="col-sm-4 control-label">$T('srv-password')</label>
<div class="col-sm-6">
<input type="text" name="password" id="password" placeholder="$T('srv-optional')" class="form-control" />
</div>
</div>
<div class="add-nzb-inputbox" title="$T('swtag-pp')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-check"></span>
<select name="Processing" class="form-control" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<div class="form-group">
<label class="col-sm-4 control-label">$T('category')</label>
<div class="col-sm-6">
<select name="Category" class="form-control" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText',"></select>
<span class="glyphicon glyphicon-tag"></span>
</div>
</div>
<div class="add-nzb-inputbox" title="$T('eoq-scripts')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-flash"></span>
<select name="Post-processing" class="form-control" data-bind="options: queue.scriptsList, optionsCaption: '$T('default')'"></select>
<div class="form-group">
<label class="col-sm-4 control-label">$T('priority')</label>
<div class="col-sm-6">
<select name="Priority" class="form-control" data-bind="options: queue.priorityOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('swtag-pp')</label>
<div class="col-sm-6">
<select name="Processing" class="form-control" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<span class="glyphicon glyphicon-check"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('eoq-scripts')</label>
<div class="col-sm-6">
<select name="Post-processing" class="form-control" data-bind="options: queue.scriptsList, optionsCaption: '$T('default')', enable: (queue.scriptsList().length > 1)"></select>
<span class="glyphicon glyphicon-flash"></span>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</form>
</div>
</div>
@@ -651,7 +679,7 @@
</tbody>
</table>
<hr/>
<p><small>Copyright (C) 2007-2020 The SABnzbd Team &lt;team@sabnzbd.org&gt;<br/>$T('yourRights') </small></p>
<p><small>Copyright (C) 2007-2021 The SABnzbd Team &lt;team@sabnzbd.org&gt;<br/>$T('yourRights') </small></p>
</div>
</div>
</div>

View File

@@ -67,8 +67,10 @@
<tr>
<th style="width: 25px;"></th>
<th></th>
<th class="table-header-extra" data-bind="css: { 'table-extra-header-visible' : extraQueueColumn }"></th>
<th class="table-header-progress" data-bind="css: { 'table-header-progress-smaller' : extraQueueColumn }"></th>
<!-- ko foreach: extraQueueColumns -->
<th class="table-header-extra"></th>
<!-- /ko -->
<th class="table-header-progress" data-bind="css: { 'table-header-progress-smaller' : extraQueueColumns().length }"></th>
<th style="width: 85px;"></th>
<th style="width: 60px;"></th>
</tr>
@@ -76,7 +78,7 @@
<!-- ko if: !hasQueue() -->
<tbody class="no-downloads">
<tr>
<td colspan="6">
<td colspan="6" data-bind="attr: { 'colspan': 5 + extraQueueColumns().length }">
<a href="#modal-add-nzb" class="hover-button" data-toggle="modal">
<span title="$T('Glitter-dragAndDrop')" data-tooltip="true"><span class="glyphicon glyphicon-plus-sign"></span> $T('Glitter-addNZB')</span>
</a>
@@ -107,7 +109,7 @@
<form data-bind="submit: editingNameSubmit">
<input type="text" data-bind="value: nameForEdit, visible: editingName(), hasfocus: editingName" />
</form>
<div class="name-icons direct-unpack hover-button" data-bind="visible: direct_unpack">
<div class="name-icons direct-unpack hover-button" data-bind="visible: direct_unpack() && !editingName()">
<span class="glyphicon glyphicon-compressed"></span> <span data-bind="text: direct_unpack"></span>
</div>
<div class="name-options" data-bind="visible: !editingName(), css: { disabled: isGrabbing() }">
@@ -118,10 +120,11 @@
<small data-bind="text: avg_age"></small>
</div>
</td>
<!-- ko foreach: parent.parent.extraQueueColumns -->
<td class="row-extra-text">
<div class="row-wrap-text" data-bind="text: extraText">
</div>
<div class="row-wrap-text" data-bind="text: \$parent.showColumn(\$data)"></div>
</td>
<!-- /ko -->
<td class="progress-indicator">
<div class="progress">
<div class="progress-bar progress-bar-info" data-bind="attr: { 'style': 'width: ' + percentage() + '%; background-color: ' + progressColor() + ';' }">

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<!--#set $active_lang=$active_lang.replace('_', '-').lower()#-->
<html lang="$active_lang" id="sabnzbd" data-bind="filedrop: { overlaySelector: '.main-filedrop', onFileDrop: addNZBFromFile }">
<html lang="$active_lang" <!--#if $rtl#-->dir="rtl"<!--#end if#--> id="sabnzbd" data-bind="filedrop: { overlaySelector: '.main-filedrop', onFileDrop: addNZBFromFile }">
<head>
<!--
Glitter V2
@@ -36,7 +36,7 @@
<link rel="stylesheet" type="text/css" href="./static/bootstrap/css/bootstrap.min.css?v=$version" />
<link rel="stylesheet" type="text/css" href="./static/stylesheets/glitter.css?v=$version" />
<link rel="stylesheet" type="text/css" href="./static/stylesheets/glitter.mobile.css?v=$version" media="all and (max-width: 768px)" />
<!--#if $color_scheme not in ('Default', '') #-->
<!--#if $color_scheme not in ('Light', '') #-->
<link rel="stylesheet" type="text/css" href="./static/stylesheets/colorschemes/${color_scheme}.css?v=$version"/>
<!--#end if#-->
@@ -52,15 +52,17 @@
var glitterTranslate = new Object();
glitterTranslate.paused = "$T('post-Paused')";
glitterTranslate.left = "$T('Glitter-left')";
glitterTranslate.clearWarn = "$T('Glitter-confirmClearWarnings')";
glitterTranslate.clearWarn = "$T('confirm')";
glitterTranslate.pausePromptFail = "$T('Glitter-pausePromptFail')"
glitterTranslate.pauseFor = "$T('pauseFor')"
glitterTranslate.minutes = "$T('mins')"
glitterTranslate.shutdown = "$T('shutdownOK?')";
glitterTranslate.restart = "$T('explain-Restart') $T('explain-needNewLogin')".replace(/\<br(\s*\/|)\>/g, '\n');
glitterTranslate.repair = "$T('explain-Repair')".replace(/<br \/>/g, "\n").replace(/&quot;/g,'"');
glitterTranslate.removeDown = "$T('Glitter-confirmClearDownloads')";
glitterTranslate.removeDow1 = "$T('Glitter-confirmClear1Download')";
glitterTranslate.deleteMsg = "$T('nzo-delete')";
glitterTranslate.removeDown = "$T('confirm')";
glitterTranslate.removeDow1 = "$T('confirm')";
glitterTranslate.renameAbort = "$T('Glitter-confirmAbortDirectUnpack')\n$T('confirm')";
glitterTranslate.retryAll = "$T('link-retryAll')?";
glitterTranslate.fetch = "$T('Glitter-fetch')";
glitterTranslate.encrypted = "$T('Glitter-encrypted')";

View File

@@ -1 +0,0 @@
&nbsp;

View File

@@ -1,40 +0,0 @@
<!--#if $paused#-->
<!--#if $pause_int != '0' #-->
<!--#from math import floor#-->
<!--#set pauseSplit = $pause_int.split(':')#-->
<!--#set seconds = int(pauseSplit[0]) * 60 + int(pauseSplit[1])#-->
<!--#set hours = floor(seconds/3600)#-->
<!--#set minutes = floor((seconds - hours * 3600) / 60)#-->
<!--#set seconds = seconds - minutes * 60 - hours * 3600#-->
<!--#if seconds < 10 #-->
<!--#set seconds = '0' + str(int(seconds)) #-->
<!--#else#-->
<!--#set seconds = str(int(seconds)) #-->
<!--#end if#-->
<!--#if (minutes < 10) & (hours > 0) #-->
<!--#set minutes = '0' + str(int(minutes)) #-->
<!--#else#-->
<!--#set minutes = str(int(minutes)) #-->
<!--#end if#-->
<!--#if hours > 0 #-->
<!--#set timeString = str(int(hours)) + ":" + minutes + ":" + seconds#-->
<!--#else#-->
<!--#set timeString = minutes + ":" + seconds#-->
<!--#end if#-->
<!--#end if#-->
$T('post-Paused') <!--#if $pause_int != '0' #-->($timeString) <!--#end if#-->
<!--#if float($mbleft) > 0#-->
- $sizeleft $T('Glitter-left')
<!--#end if#-->
- SABnzbd
<!--#else if float($mbleft) < 0.1#-->
SABnzbd
<!--#else#-->
${speed}B/s - $sizeleft $T('Glitter-left') - SABnzbd
<!--#end if#-->
|||<!--#echo "%.0f" % float($kbpersec)#-->

View File

@@ -1,7 +1,6 @@
/**
Base variables and functions
**/
var fadeOnDeleteDuration = 400; // ms after deleting a row
var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
// To avoid problems when localStorage is disabled
@@ -57,42 +56,6 @@ function callSpecialAPI(url, data) {
return $.when(ajaxQuery);
}
/**
Handle visibility changes so we
do only incremental update when not visible
**/
var pageIsVisible = true;
// Set the name of the hidden property and the change event for visibility
var hidden, visibilityChange;
if(typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
hidden = "hidden";
visibilityChange = "visibilitychange";
} else if(typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
visibilityChange = "mozvisibilitychange";
} else if(typeof document.msHidden !== "undefined") {
hidden = "msHidden";
visibilityChange = "msvisibilitychange";
} else if(typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
visibilityChange = "webkitvisibilitychange";
}
// Set the global visibility
function handleVisibilityChange() {
if(document[hidden]) {
pageIsVisible = false;
} else {
pageIsVisible = true;
}
}
// Add event listener only for supported browsers
if(typeof document.addEventListener !== "undefined" && typeof document[hidden] !== "undefined") {
// Handle page visibility change
document.addEventListener(visibilityChange, handleVisibilityChange, false);
}
/***
GENERAL FUNCTIONS
***/
@@ -264,18 +227,13 @@ function showNotification(notiName, notiTimeout, fileCounter) {
// Remove after timeout
if(notiTimeout) {
setTimeout(function() {
hideNotification(true);
hideNotification();
}, notiTimeout)
}
}
// Hide notification
function hideNotification(fadeItOut) {
// Hide the box with or without effect
if(fadeItOut) {
$('.main-notification-box').fadeOut()
} else {
$('.main-notification-box').hide()
}
function hideNotification() {
// Hide the box with effect
$('.main-notification-box').fadeOut()
}

View File

@@ -4,6 +4,9 @@ function Fileslisting(parent) {
self.parent = parent;
self.fileItems = ko.observableArray([]);
// Prevent flash of unstyled content when deleting items
self.fileItems.extend({ rateLimit: 50 })
// Need to reserve these names to be overwritten
self.filelist_name = ko.observable();
self.filelist_password = ko.observable();
@@ -30,42 +33,17 @@ function Fileslisting(parent) {
$('#modal-item-files').modal('show');
// Stop updating on closing of the modal
$('#modal-item-files').on('hidden.bs.modal', function() {
$('#modal-item-files').on('hidden.bs.modal', function () {
self.removeUpdate();
})
}
// Move to top and bottom buttons
self.moveButton = function (item,event) {
var targetRow, sourceRow, tbody;
sourceRow = $(event.currentTarget).parents("tr").filter(":first");
tbody = sourceRow.parents("tbody").filter(":first");
ko.utils.domData.set(sourceRow[0], "ko_sourceIndex", ko.utils.arrayIndexOf(sourceRow.parent().children(), sourceRow[0]));
sourceRow = sourceRow.detach();
if ($(event.currentTarget).is(".buttonMoveToTop")) {
// we are moving to the top
targetRow = tbody.children(".files-done").filter(":last");
} else {
//we are moving to the bottom
targetRow = tbody.children(".files-sortable").filter(":last");
}
if(targetRow.length < 1 ){
// we found an edge case and need to do something special
targetRow = tbody.children(".files-sortable").filter(":first");
sourceRow.insertBefore(targetRow[0]);
} else {
sourceRow.insertAfter($(targetRow[0]));
}
tbody.sortable('option', 'update').call(tbody[0],null, { item: sourceRow });
};
// Trigger update
self.triggerUpdate = function() {
// Call API
callAPI({
mode: 'get_files',
value: self.currentItem.id,
limit: 5
value: self.currentItem.id
}).then(function(response) {
// When there's no files left we close the modal and the update will be stopped
// For example when the job has finished downloading
@@ -124,39 +102,57 @@ function Fileslisting(parent) {
self.move = function(event) {
// How much did we move?
var nrMoves = event.sourceIndex - event.targetIndex;
var direction = (nrMoves > 0 ? 'Up' : 'Down')
var direction = (nrMoves > 0 ? 'up' : 'down')
// We have to create the data-structure before, to be able to use the name as a key
var dataToSend = {};
dataToSend[event.item.nzf_id()] = 'on';
dataToSend['apikey'] = apiKey;
dataToSend['action_key'] = direction;
dataToSend['action_size'] = Math.abs(nrMoves);
callAPI({
mode: 'move_nzf_bulk',
name: direction,
value: self.currentItem.id,
nzf_ids: event.item.nzf_id(),
size: Math.abs(nrMoves)
}).then(function() {
// Refresh all the files
self.loadFiles(self.currentItem)
})
};
// Activate with this weird URL "API"
callSpecialAPI("./nzb/" + self.currentItem.id + "/bulk_operation/", dataToSend)
// Move to top and bottom buttons
self.moveButton = function (item, event) {
// Up or down?
var direction = "bottom"
if ($(event.currentTarget).is(".buttonMoveToTop")) {
// we are moving to the top
direction = "top"
}
callAPI({
mode: 'move_nzf_bulk',
name: direction,
value: self.currentItem.id,
nzf_ids: item.nzf_id()
}).then(function() {
// Refresh all the files
self.loadFiles(self.currentItem)
})
};
// Remove selected files
self.removeSelectedFiles = function() {
// We have to create the data-structure before, to be able to use the name as a key
var dataToSend = {};
dataToSend['apikey'] = apiKey;
dataToSend['action_key'] = 'Delete';
// Get all selected ones
var nzfIds = []
$('.item-files-table input:checked:not(:disabled)').each(function() {
// Add this item
dataToSend[$(this).prop('name')] = 'on';
nzfIds.push($(this).prop('name'))
})
// Activate with this weird URL "API"
callSpecialAPI("./nzb/" + self.currentItem.id + "/bulk_operation/", dataToSend).then(function() {
// Fade it out
$('.item-files-table input:checked:not(:disabled)').parents('tr').fadeOut(fadeOnDeleteDuration, function() {
// Set state of the check-all
setCheckAllState('#modal-item-files .multioperations-selector input[type="checkbox"]', '#modal-item-files .files-sortable input')
})
callAPI({
mode: 'queue',
name: 'delete_nzf',
value: self.currentItem.id,
value2: nzfIds.join()
}).then(function() {
// Refresh all the files
self.loadFiles(self.currentItem)
})
}

View File

@@ -8,7 +8,7 @@ function HistoryListModel(parent) {
// Variables
self.lastUpdate = 0;
self.historyItems = ko.observableArray([])
self.showFailed = ko.observable(false);
self.showFailed = ko.observable(false).extend({ persist: 'historyShowFailed' });
self.isLoading = ko.observable(false).extend({ rateLimit: 100 });
self.searchTerm = ko.observable('').extend({ rateLimit: { timeout: 200, method: "notifyWhenChangesStop" } });
self.paginationLimit = ko.observable(10).extend({ persist: 'historyPaginationLimit' });
@@ -116,14 +116,15 @@ function HistoryListModel(parent) {
self.retryJob = function(form) {
// Adding a extra retry file happens through this special function
var data = new FormData();
data.append("mode", "retry");
data.append("nzbfile", $(form.nzbFile)[0].files[0]);
data.append("job", $('#modal-retry-job input[name="retry_job_id"]').val());
data.append("value", $('#modal-retry-job input[name="retry_job_id"]').val());
data.append("password", $('#retry_job_password').val());
data.append("apikey", apiKey);
// Add
$.ajax({
url: "./retry_pp",
url: "./api",
type: "POST",
cache: false,
processData: false,
@@ -333,10 +334,10 @@ function HistoryModel(parent, data) {
return self.script_line();
});
// Extra history column
self.extraText = ko.pureComputed(function() {
// Extra history columns
self.showColumn = function(param) {
// Picked anything?
switch(self.parent.parent.extraHistoryColumn()) {
switch(param) {
case 'speed':
// Anything to calculate?
if(self.historyStatus.bytes() > 0 && self.historyStatus.download_time() > 0) {
@@ -359,7 +360,7 @@ function HistoryModel(parent, data) {
return self.historyStatus.size();
}
return;
})
};
// Format completion time
self.completedOn = ko.pureComputed(function() {
@@ -421,7 +422,7 @@ function HistoryModel(parent, data) {
// Delete button
self.deleteSlot = function(item, event) {
// Confirm?
if(!self.parent.parent.confirmDeleteHistory() || confirm(glitterTranslate.removeDow1)) {
if(!self.parent.parent.confirmDeleteHistory() || confirm(glitterTranslate.deleteMsg + ":\n" + item.historyStatus.name() + "\n\n" + glitterTranslate.removeDow1)) {
// Are we still processing and it can be stopped?
if(item.processingDownload() == 2) {
callAPI({
@@ -438,13 +439,10 @@ function HistoryModel(parent, data) {
value: self.nzo_id
}).then(function(response) {
if(response.status) {
// Fade and remove
$(event.currentTarget).parent().parent().fadeOut(fadeOnDeleteDuration, function() {
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
self.parent.historyItems.remove(self);
self.parent.parent.refresh();
})
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
self.parent.historyItems.remove(self);
self.parent.parent.refresh();
}
});
}

View File

@@ -15,12 +15,13 @@ function ViewModel() {
self.dateFormat = ko.observable('fromNow').extend({ persist: 'pageDateFormat' });
self.displayTabbed = ko.observable().extend({ persist: 'displayTabbed' });
self.displayCompact = ko.observable(false).extend({ persist: 'displayCompact' });
self.displayFullWidth = ko.observable(false).extend({ persist: 'displayFullWidth' });
self.confirmDeleteQueue = ko.observable(true).extend({ persist: 'confirmDeleteQueue' });
self.confirmDeleteHistory = ko.observable(true).extend({ persist: 'confirmDeleteHistory' });
self.extraQueueColumn = ko.observable('').extend({ persist: 'extraColumn' });
self.extraHistoryColumn = ko.observable('').extend({ persist: 'extraHistoryColumn' });
self.extraQueueColumns = ko.observableArray([]).extend({ persist: 'extraColumns' });
self.extraHistoryColumns = ko.observableArray([]).extend({ persist: 'extraHistoryColumns' });
self.showActiveConnections = ko.observable(false).extend({ persist: 'showActiveConnections' });
self.speedMetrics = { K: "KB/s", M: "MB/s", G: "GB/s" };
self.speedMetrics = { '': "B/s", K: "KB/s", M: "MB/s", G: "GB/s" };
// Set information varibales
self.title = ko.observable();
@@ -235,6 +236,12 @@ function ViewModel() {
values: sabSpeedHistory
})
// Add option to open the server details tab
$('.sparkline-container').click(function() {
$('a[href="#modal-options"]').trigger('click')
$('a[href="#options_connections"]').trigger('click')
})
} else {
// Update
$('.sparkline').text(self.speedHistory.join(",")).change()
@@ -322,47 +329,6 @@ function ViewModel() {
// Clear previous timeout to prevent double-calls
clearTimeout(self.interval);
/**
Limited refresh
**/
// Only update the title when page not visible
if(!pageIsVisible) {
// Request new title
callSpecialAPI('./queue/', { limit: 1, start: 0 }).done(function(data) {
// Split title & speed
var dataSplit = data.split('|||');
// Maybe the result is actually the login page?
if(dataSplit[0].substring(0, 11) === '<html lang=') {
// Redirect
document.location = document.location
return
}
// Set title
self.title(dataSplit[0]);
// Update sparkline data
if(self.speedHistory.length >= 50) {
// Remove first one
self.speedHistory.shift();
}
// Add
self.speedHistory.push(dataSplit[1]);
// Does it contain 'Paused'? Update icon!
self.downloadsPaused(data.indexOf(glitterTranslate.paused) > -1)
// Force the next full update to be full
self.history.lastUpdate = 0
}).always(self.setNextUpdate)
// Do not continue!
return;
}
/**
Full refresh
**/
// Do requests for full information
// Catch the fail to display message
var queueApi = callAPI({
@@ -549,10 +515,12 @@ function ViewModel() {
});
})
// Clear warnings through this special URL..
// Clear warnings
self.clearWarnings = function() {
// Activate
callSpecialAPI("./status/clearwarnings/").done(self.refresh)
callAPI({
mode: "warnings",
name: "clear"
}).done(self.refresh)
}
// Clear messages
@@ -628,6 +596,37 @@ function ViewModel() {
}
})
// Save the rest in config if global-settings
var saveInterfaceSettings = function(newValue) {
if(self.useGlobalOptions()) {
var interfaceSettings = {
"dateFormat": self.dateFormat,
"extraQueueColumns": self.extraQueueColumns,
"extraHistoryColumns": self.extraHistoryColumns,
"displayCompact": self.displayCompact,
"displayFullWidth": self.displayFullWidth,
"displayTabbed": self.displayTabbed,
"confirmDeleteQueue": self.confirmDeleteQueue,
"confirmDeleteHistory": self.confirmDeleteHistory
};
callAPI({
mode: "set_config",
section: "misc",
keyword: "interface_settings",
value: ko.toJSON(interfaceSettings)
})
}
}
self.dateFormat.subscribe(saveInterfaceSettings);
self.extraQueueColumns.subscribe(saveInterfaceSettings);
self.extraHistoryColumns.subscribe(saveInterfaceSettings);
self.displayCompact.subscribe(saveInterfaceSettings);
self.displayFullWidth.subscribe(saveInterfaceSettings);
self.displayTabbed.subscribe(saveInterfaceSettings);
self.confirmDeleteQueue.subscribe(saveInterfaceSettings);
self.confirmDeleteHistory.subscribe(saveInterfaceSettings);
/***
Add NZB's
***/
@@ -639,54 +638,47 @@ function ViewModel() {
if(fileName) $('.btn-file em').text(fileName)
}
// From the upload
self.addNZBFromFileForm = function(form) {
// Add NZB form
self.addNZB = function(form) {
// Anything?
if(!$(form.nzbFile)[0].files[0]) {
$('.btn-file').attr('style', 'border-color: red !important')
setTimeout(function() { $('.btn-file').css('border-color', '') }, 2000)
if(!$(form.nzbFile)[0].files[0] && !$(form.nzbURL).val()) {
$('.btn-file, input[name="nzbURL"]').attr('style', 'border-color: red !important')
setTimeout(function() { $('.btn-file, input[name="nzbURL"]').css('border-color', '') }, 2000)
return false;
}
// Upload
self.addNZBFromFile($(form.nzbFile)[0].files);
// Hide modal, upload will reset the form
$("#modal-add-nzb").modal("hide");
}
// From URL
self.addNZBFromURL = function(form) {
// Anything?
if(!$(form.nzbURL).val()) {
$(form.nzbURL).attr('style', 'border-color: red !important')
setTimeout(function() { $(form.nzbURL).css('border-color', '') }, 2000)
return false;
}
// Build request
var theCall = {
mode: "addurl",
name: $(form.nzbURL).val(),
nzbname: $('#nzbname').val(),
script: $('#modal-add-nzb select[name="Post-processing"]').val(),
priority: $('#modal-add-nzb select[name="Priority"]').val(),
pp: $('#modal-add-nzb select[name="Processing"]').val()
}
// Optional, otherwise they get mis-labeled if left empty
if($('#modal-add-nzb select[name="Category"]').val() != '*') theCall.cat = $('#modal-add-nzb select[name="Category"]').val()
if($('#modal-add-nzb select[name="Processing"]').val()) theCall.pp = $('#modal-add-nzb select[name="Category"]').val()
// Add
callAPI(theCall).then(function(r) {
// Hide and reset/refresh
self.refresh()
// Upload file using the method we also use for drag-and-drop
if($(form.nzbFile)[0].files[0]) {
self.addNZBFromFile($(form.nzbFile)[0].files);
// Hide modal, upload will reset the form
$("#modal-add-nzb").modal("hide");
form.reset()
$('#nzbname').val('')
});
} else if($(form.nzbURL).val()) {
// Or add URL
var theCall = {
mode: "addurl",
name: $(form.nzbURL).val(),
nzbname: $('#nzbname').val(),
password: $('#password').val(),
script: $('#modal-add-nzb select[name="Post-processing"]').val(),
priority: $('#modal-add-nzb select[name="Priority"]').val(),
pp: $('#modal-add-nzb select[name="Processing"]').val()
}
// Optional, otherwise they get mis-labeled if left empty
if($('#modal-add-nzb select[name="Category"]').val() != '*') theCall.cat = $('#modal-add-nzb select[name="Category"]').val()
if($('#modal-add-nzb select[name="Processing"]').val()) theCall.pp = $('#modal-add-nzb select[name="Category"]').val()
// Add
callAPI(theCall).then(function(r) {
// Hide and reset/refresh
self.refresh()
$("#modal-add-nzb").modal("hide");
form.reset()
$('#nzbname').val('')
});
}
}
// From the upload or filedrop
self.addNZBFromFile = function(files, fileindex) {
// First file
@@ -707,6 +699,7 @@ function ViewModel() {
data.append("name", file);
data.append("mode", "addfile");
data.append("nzbname", $('#nzbname').val());
data.append("password", $('#password').val());
data.append("script", $('#modal-add-nzb select[name="Post-processing"]').val())
data.append("priority", $('#modal-add-nzb select[name="Priority"]').val())
data.append("apikey", apiKey);
@@ -732,14 +725,13 @@ function ViewModel() {
// Refresh
self.refresh();
// Hide notification
hideNotification('.main-notification-box-uploading')
hideNotification()
// Reset the form
$('#modal-add-nzb form').trigger('reset');
$('#nzbname').val('')
$('.btn-file em').html(glitterTranslate.chooseFile + '&hellip;')
}
});
}
// Load status info
@@ -747,11 +739,26 @@ function ViewModel() {
// Full refresh? Only on click and for the status-screen
var statusFullRefresh = (event != undefined) && $('#options-status').hasClass('active');
// Make it spin
self.hasStatusInfo(false)
// Measure performance? Takes a while
var statusPerformance = (event != undefined) && $(event.currentTarget).hasClass('diskspeed-button');
// Make it spin if the user requested it otherwise we don't,
// because browsers use a lot of CPU for the animation
if(statusFullRefresh) {
self.hasStatusInfo(false)
}
// Show loading text for performance measures
if(statusPerformance) {
self.hasPerformanceInfo(false)
}
// Load the custom status info
callAPI({ mode: 'fullstatus', skip_dashboard: (!statusFullRefresh)*1 }).then(function(data) {
callAPI({
mode: 'status',
calculate_performance: statusPerformance*1,
skip_dashboard: (!statusFullRefresh)*1
}).then(function(data) {
// Update basic
self.statusInfo.loglevel(data.status.loglevel)
self.statusInfo.folders(data.status.folders)
@@ -779,8 +786,11 @@ function ViewModel() {
if(self.statusInfo.servers().length == 0) {
self.statusInfo.loglevel.subscribe(function(newValue) {
// Update log-level
callSpecialAPI('./status/change_loglevel/', {
loglevel: newValue
callAPI({
mode: "set_config",
section: "logging",
keyword: "log_level",
value: newValue
});
})
}
@@ -800,7 +810,8 @@ function ViewModel() {
'serveractiveconn': ko.observable(this.serveractiveconn),
'servererror': ko.observable(this.servererror),
'serveractive': ko.observable(this.serveractive),
'serverconnections': ko.observableArray(this.serverconnections)
'serverconnections': ko.observableArray(this.serverconnections),
'serverbps': ko.observable(this.serverbps)
})
})
} else {
@@ -816,7 +827,8 @@ function ViewModel() {
activeServer.serveractiveconn(this.serveractiveconn),
activeServer.servererror(this.servererror),
activeServer.serveractive(this.serveractive),
activeServer.serverconnections(this.serverconnections)
activeServer.serverconnections(this.serverconnections),
activeServer.serverbps(this.serverbps)
})
}
@@ -828,16 +840,6 @@ function ViewModel() {
});
}
// Do a disk-speedtest
self.testDiskSpeed = function(item, event) {
self.hasPerformanceInfo(false)
// Run it and then display it
callSpecialAPI('./status/dashrefresh/').then(function() {
self.loadStatusInfo(true, true)
})
}
// Download a test-NZB
self.testDownload = function(data, event) {
var nzbSize = $(event.target).data('size')
@@ -864,8 +866,10 @@ function ViewModel() {
// Unblock server
self.unblockServer = function(servername) {
callSpecialAPI("./status/unblock_server/", {
server: servername
callAPI({
mode: "status",
name: "unblock_server",
value: servername
}).then(function() {
$("#modal-options").modal("hide");
})
@@ -888,10 +892,9 @@ function ViewModel() {
clearInterval(connectionRefresh)
return
}
// Only when we show them
if(self.showActiveConnections()) {
self.loadStatusInfo()
}
// Update the server stats (speed/connections)
self.loadStatusInfo()
}, self.refreshRate() * 1000)
})
@@ -924,7 +927,7 @@ function ViewModel() {
$('#options-orphans [data-tooltip="true"]').tooltip('hide')
// Show notification on delete
if($(htmlElement.currentTarget).data('action') == 'delete') {
if($(htmlElement.currentTarget).data('action') == 'delete_orphan') {
showNotification('.main-notification-box-removing', 1000)
} else {
// Adding back to queue
@@ -932,15 +935,15 @@ function ViewModel() {
}
// Activate
callSpecialAPI("./status/" + $(htmlElement.currentTarget).data('action'), {
name: $("<div/>").html(folder).text()
callAPI({
mode: "status",
name: $(htmlElement.currentTarget).data('action'),
value: $("<div/>").html(folder).text()
}).then(function() {
// Remove item and load status data
$(htmlElement.currentTarget).parent().parent().fadeOut(fadeOnDeleteDuration)
// Refresh
self.loadStatusInfo(true, true)
// Hide notification
hideNotification(true)
hideNotification()
})
}
@@ -950,9 +953,12 @@ function ViewModel() {
// Show notification
showNotification('.main-notification-box-removing-multiple', 0, self.statusInfo.folders().length)
// Delete them all
callSpecialAPI("./status/delete_all/").then(function() {
callAPI({
mode: "status",
name: "delete_all_orphan"
}).then(function() {
// Remove notifcation and update screen
hideNotification(true)
hideNotification()
self.loadStatusInfo(true, true)
})
}
@@ -964,9 +970,12 @@ function ViewModel() {
// Show notification
showNotification('.main-notification-box-sendback')
// Delete them all
callSpecialAPI("./status/add_all/").then(function() {
callAPI({
mode: "status",
name: "add_all_orphan"
}).then(function() {
// Remove notifcation and update screen
hideNotification(true)
hideNotification()
self.loadStatusInfo(true, true)
})
}
@@ -977,11 +986,21 @@ function ViewModel() {
$('body').toggleClass('container-compact')
})
// Toggle full width
self.displayFullWidth.subscribe(function() {
$('body').toggleClass('container-full-width')
})
// Toggle Glitter's tabbed modus
self.displayTabbed.subscribe(function() {
$('body').toggleClass('container-tabbed')
})
// Change hash for page-reload
$('.history-queue-swicher .nav-tabs a').on('shown.bs.tab', function (e) {
window.location.hash = e.target.hash;
})
/**
SABnzb options
**/
@@ -997,7 +1016,7 @@ function ViewModel() {
self.restartSAB = function() {
if(!confirm(glitterTranslate.restart)) return;
// Call restart function
callSpecialAPI("./config/restart/")
callAPI({ mode: "restart" })
// Set counter, we need at least 15 seconds
self.isRestarting(Math.max(1, Math.floor(15 / self.refreshRate())));
@@ -1022,18 +1041,16 @@ function ViewModel() {
if(!confirm(glitterTranslate.repair)) return;
// Hide the modal and show the notifucation
$("#modal-options").modal("hide");
showNotification('.main-notification-box-queue-repair')
showNotification('.main-notification-box-queue-repair', 5000)
// Call the API
callSpecialAPI("./config/repair/").then(function() {
hideNotification(true)
})
callAPI({ mode: "restart_repair" })
}
// Force disconnect
self.forceDisconnect = function() {
// Show notification
showNotification('.main-notification-box-disconnect', 3000)
// Call API
callSpecialAPI("./status/disconnect/").then(function() {
callAPI({ mode: "disconnect" }).then(function() {
$("#modal-options").modal("hide");
})
}
@@ -1047,9 +1064,19 @@ function ViewModel() {
$('body').addClass('container-compact')
}
if(localStorageGetItem('displayFullWidth') === 'true') {
// Add extra class
$('body').addClass('container-full-width')
}
// Tabbed layout?
if(localStorageGetItem('displayTabbed') === 'true') {
$('body').addClass('container-tabbed')
var tab_from_hash = location.hash.replace(/^#/, '');
if (tab_from_hash) {
$('.history-queue-swicher .nav-tabs a[href="#' + tab_from_hash + '"]').tab('show');
}
}
// Get the speed-limit, refresh rate and server names
@@ -1067,6 +1094,19 @@ function ViewModel() {
// Set queue limit
self.queue.paginationLimit(response.config.misc.queue_limit.toString())
// Import the rest of the settings
if(response.config.misc.interface_settings) {
var interfaceSettings = JSON.parse(response.config.misc.interface_settings);
self.dateFormat(interfaceSettings['dateFormat']);
self.extraQueueColumns(interfaceSettings['extraQueueColumns']);
self.extraHistoryColumns(interfaceSettings['extraHistoryColumns']);
self.displayCompact(interfaceSettings['displayCompact']);
self.displayFullWidth(interfaceSettings['displayFullWidth']);
self.displayTabbed(interfaceSettings['displayTabbed']);
self.confirmDeleteQueue(interfaceSettings['confirmDeleteQueue']);
self.confirmDeleteHistory(interfaceSettings['confirmDeleteHistory']);
}
}
// Set bandwidth limit
@@ -1191,4 +1231,4 @@ function ViewModel() {
// Activate tooltips
if(!isMobile) $('[data-tooltip="true"]').tooltip({ trigger: 'hover', container: 'body' })
}
}

View File

@@ -34,7 +34,7 @@ function QueueListModel(parent) {
// External var's
self.queueItems = ko.observableArray([]);
self.totalItems = ko.observable(0);
self.isMultiEditing = ko.observable(false);
self.isMultiEditing = ko.observable(false).extend({ persist: 'queueIsMultiEditing' });
self.isLoading = ko.observable(false).extend({ rateLimit: 100 });
self.multiEditItems = ko.observableArray([]);
self.categoriesList = ko.observableArray([]);
@@ -228,11 +228,11 @@ function QueueListModel(parent) {
switch($(event.currentTarget).data('action')) {
case 'sortAgeAsc':
sort = 'avg_age';
dir = 'asc';
dir = 'desc';
break;
case 'sortAgeDesc':
sort = 'avg_age';
dir = 'desc';
dir = 'asc';
break;
case 'sortNameAsc':
sort = 'name';
@@ -440,12 +440,11 @@ function QueueListModel(parent) {
if(response.status) {
// Make sure the queue doesnt flicker and then fade-out
self.isLoading(true)
$('.delete input:checked').parents('tr').fadeOut(fadeOnDeleteDuration)
self.parent.refresh()
// Empty it
self.multiEditItems.removeAll();
// Hide notification
hideNotification(true)
hideNotification()
}
})
}
@@ -532,11 +531,10 @@ function QueueModel(parent, data) {
return self.name()
})
self.missingText = ko.pureComputed(function() {
// Check for missing data, the value is arbitrary! (1%)
if(self.missingMB()/self.totalMB() > 0.01) {
// Check for missing data, can show 0 if article-size is smaller than 500K, but we accept that
if(self.missingMB()) {
return self.missingMB().toFixed(0) + ' MB ' + glitterTranslate.misingArt
}
return;
})
self.statusText = ko.computed(function() {
// Checking
@@ -567,10 +565,9 @@ function QueueModel(parent, data) {
return 'glyphicon-pause'
})
// Extra queue column
self.extraText = ko.pureComputed(function() {
// Picked anything?
switch(self.parent.parent.extraQueueColumn()) {
// Extra queue columns
self.showColumn = function(param) {
switch(param) {
case 'category':
// Exception for *
if(self.category() == "*")
@@ -590,7 +587,7 @@ function QueueModel(parent, data) {
return self.avg_age();
}
return;
})
};
// Every update
self.updateFromData = function(data) {
@@ -654,6 +651,9 @@ function QueueModel(parent, data) {
// Anything change or empty?
if(!newName || self.name() == newName) return;
// Rename would abort Direct Unpack, so ask if user is sure
if(self.direct_unpack() && !confirm(glitterTranslate.renameAbort)) return;
// Send rename
callAPI({
mode: 'queue',
@@ -726,7 +726,7 @@ function QueueModel(parent, data) {
// Remove 1 download from queue
self.removeDownload = function(item, event) {
// Confirm and remove
if(!self.parent.parent.confirmDeleteQueue() || confirm(glitterTranslate.removeDow1)) {
if(!self.parent.parent.confirmDeleteQueue() || confirm(glitterTranslate.deleteMsg + ":\n" + item.name() + "\n\n" + glitterTranslate.removeDow1)) {
var itemToDelete = this;
// Show notification
@@ -738,17 +738,14 @@ function QueueModel(parent, data) {
del_files: 1,
value: item.id
}).then(function(response) {
// Fade and remove
$(event.currentTarget).parent().parent().fadeOut(fadeOnDeleteDuration, function() {
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
parent.queueItems.remove(itemToDelete);
parent.multiEditItems.remove(function(inList) { return inList.id == itemToDelete.id; })
self.parent.parent.refresh();
// Hide notifcation
hideNotification(true)
})
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
parent.queueItems.remove(itemToDelete);
parent.multiEditItems.remove(function(inList) { return inList.id == itemToDelete.id; })
self.parent.parent.refresh();
// Hide notifcation
hideNotification()
});
}
};
}
}

View File

@@ -0,0 +1 @@
@import url('Night.css') screen and (prefers-color-scheme: dark);

View File

@@ -55,6 +55,10 @@ legend,
opacity: 0.7;
}
.form-control[disabled] {
opacity: 0.65;
}
.progress {
background-color: #DADADA;
}
@@ -126,6 +130,10 @@ select.form-control,
.main-content .btn-default,
.modal-body .btn-default,
.modal-footer .btn-default,
.btn-default.disabled:hover,
.btn-default.disabled:active,
.btn-default.disabled:focus,
.form-control[disabled],
#modal-options .options-function-box .input-group-addon {
background-color: #555555;
color: #EBEBEB;
@@ -157,6 +165,8 @@ tbody>tr:last-child td,
input,
input.form-control,
.input-group-addon,
.search-box input:focus,
.search-box input:valid,
select.form-control,
#modal-options .table-server-connections th,
.main-content .btn-default,
@@ -248,6 +258,13 @@ hr {
border-top: none;
}
.form-control:focus,
input[type="submit"]:focus,
button:focus {
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
outline: initial;
}
/* Placeholders - Will not work if grouped! */
::-webkit-input-placeholder {
color: #EBEBEB !important;

View File

@@ -23,6 +23,7 @@ h2 {
.sparkline-container svg {
margin: 10px 15px 8px;
float: left;
cursor: pointer;
}
.main-navbar .sparkline {
@@ -852,18 +853,24 @@ tr.queue-item>td:first-child>a {
.multioperations-selector .add-nzb-inputbox {
width: 20%;
float: left;
}
.multioperations-selector .add-nzb-inputbox select {
display: inline-block;
width: calc(100% - 30px);
margin: 5px 0px 5px 2px;
}
.multioperations-selector .add-nzb-inputbox-small {
width: 80px;
float: right;
padding-left: 0;
padding-top: 2px;
padding-top: 12px;
}
.multioperations-selector .add-nzb-inputbox-small .label {
vertical-align: text-bottom;
margin-left: 2px;
margin-left: 5px;
}
.multioperations-selector .add-nzb-inputbox-small span {
@@ -884,7 +891,7 @@ tr.queue-item>td:first-child>a {
.multioperations-selector .add-nzb-inputbox-options {
width: auto;
padding-right: 6px;
padding-right: 7px;
}
.multioperations-selector .add-nzb-inputbox-small label[for="multiedit-pause"],
@@ -1276,7 +1283,8 @@ tr.queue-item>td:first-child>a {
min-height: 270px;
}
#modal-options .form-group {
#modal-options .form-group,
#modal-add-nzb .form-group {
margin-bottom: 5px;
}
@@ -1388,7 +1396,8 @@ tr.queue-item>td:first-child>a {
padding-bottom: 0;
}
#modal-options .col-sm-6 {
#modal-options .col-sm-6,
#modal-add-nzb .col-sm-6 {
padding-bottom: 3px;
}
@@ -1520,25 +1529,14 @@ tr.queue-item>td:first-child>a {
margin-bottom: 5px;
}
#modal-add-nzb .add-nzb-inputbox:nth-child(even) select {
width: 100%;
#modal-add-nzb .col-sm-6:first-of-type label {
text-align: right;
}
.add-nzb-inputbox {
float: left;
width: 50%;
margin: 5px 0px;
padding-left: 20px;
}
.add-nzb-inputbox select {
#modal-add-nzb select {
width: calc(100% - 35px);
display: inline-block;
width: calc(100% - 10px);
}
.add-nzb-inputbox span {
display: inline-block;
margin: 8px 2px 0px -20px;
margin-right: 5px;
}
.btn-file {
@@ -1738,7 +1736,6 @@ input[name="nzbURL"] {
.container-compact .search-box .form-control {
height: 28px;
}
.container-compact,
.container-compact .dropdown-menu,
.container-compact .btn,
@@ -1764,6 +1761,9 @@ input[name="nzbURL"] {
.container-compact .form-control {
height: 29px;
}
.container-compact .form-control-multiselect {
height: 60px;
}
.container-compact .modal-header {
padding: 5px 12px;
}
@@ -1843,18 +1843,22 @@ input[name="nzbURL"] {
padding-top: 5px;
}
.container-full-width .container {
width: calc(100% - 60px);
}
/***
Dynamic sizing
***/
@media screen and (min-width: 1200px) {
.queue-table .table-extra-header-visible,
.history-table .table-extra-header-visible {
width: 10%;
.queue-table .table-header-extra,
.history-table .table-header-extra {
width: 6%;
}
.queue-table .table-header-progress-smaller,
.history-table .table-header-progress-smaller {
width: 35%;
width: 25%;
}
#options-interface .label {
@@ -1976,6 +1980,45 @@ input[name="nzbURL"] {
}
}
/***
RTL Fixes
***/
html[dir="rtl"] .navbar-nav {
padding-right: 0;
}
html[dir="rtl"] .queue h2,
html[dir="rtl"] .history h2 {
float: right;
}
html[dir="rtl"] .dropdown-menu {
text-align: right;
direction: rtl;
}
html[dir="rtl"] .speedlimit-dropdown,
html[dir="rtl"] .progress-indicator,
html[dir="rtl"] #modal-item-filelist,
html[dir="rtl"] #modal-item-files .modal-title,
html[dir="rtl"] .info-container-box,
html[dir="rtl"] .queue-table,
html[dir="rtl"] .history-table {
direction: ltr;
}
html[dir="rtl"] .search-box a {
right: initial;
left: 8px;
}
html[dir="rtl"] .navbar-logo,
html[dir="rtl"] .info-container,
html[dir="rtl"] .modal-header .close,
html[dir="rtl"] #modal-options .modal-header a {
float: left;
}
/***
Bootstrap overwrites

View File

@@ -1 +0,0 @@
&nbsp;

View File

@@ -1,106 +0,0 @@
Plush for SABnzbd 0.6.x | Feb. 21 2010
assembled by pairofdimes - see LICENSE-CC.txt
https://forums.sabnzbd.org contributions welcome
======================
THANKS TO CONTRIBUTORS
Unmentioned imagery provided by: inpheaux, injectx, real_scud, jbw, sbultez, rAf
==============
LIBRARIES USED
jQuery
http://jquery.com
Copyright (c) 2010 John Resig
See LICENSE-MIT & LICENSE-GPL
jQuery UI
http://jqueryui.com/about
Copyright (c) 2010 jQuery UI Team
See LICENSE-MIT & LICENSE-GPL
(includes files in templates/static/stylesheets/jqueryui/*)
Sizzle CSS Selector Engine
http://sizzlejs.com/
Copyright (c) 2010 The Dojo Foundation
See LICENSE-MIT, LICENSE-BSD, & LICENSE-GPL
jQuery ColorBox
http://colorpowered.com/colorbox/
Copyright (c) 2009 Jack Moore
See LICENSE-MIT
jQuery Cookie
http://www.stilbuero.de
Copyright (c) 2006 Klaus Hartl
See LICENSE-MIT & LICENSE-GPL
jQuery hoverIntent
http://cherne.net/brian/resources/jquery.hoverIntent.html
Brian Cherne
See LICENSE-MIT & LICENSE-GPL
jQuery Live Query
http://plugins.jquery.com/project/livequery
Copyright (c) 2007 Brandon Aaron
See LICENSE-MIT & LICENSE-GPL
jQuery Pagination (with modifications from pairofdimes, where noted)
http://plugins.jquery.com/project/pagination
Author: Gabriel Birke, Describe Europe Ltd.
See LICENSE-MIT & LICENSE-GPL
jQuery Superfish
http://users.tpg.com.au/j_birch/plugins/superfish
Copyright (c) 2008 Joel Birch
See LICENSE-MIT & LICENSE-GPL
jQuery Table Drag & Drop
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin
Copyright (c) 2008 Denis Howlett
See LICENSE-MIT & LICENSE-GPL
WebToolkit
http://www.webtoolkit.info/ajax-file-upload.html
Copyright (c) 2006-2008 www.webtoolkit.info
See LICENSE-GPL3 & LICENSE-WebToolkit
www.AjaxLoad.info generated:
templates/static/images/plush-default/loading-*.gif
Nuvola Icon Set
http://www.icon-king.com/?p=15
Copyright (c) 2003-2004 David Vignoni
See LICENSE-LGPL
The following image is composed of graphics from the Nuvola icon set:
templates/static/stylesheets/colorschemes/gold/images/sprite-config.png
The above image was generated by http://spritegen.website-performance.org/
templates/static/stylesheets/colorschemes/gold/images/colorbox-*.png comes from jQuery ColorBox plugin -- See LICENSE-MIT
========================
SPRITE GENERATION METHOD
There are two sprite images, sprite-config.png and sprite-main.png, which are used to reduce the number of connections when loading Plush. Here is how to go about modifying these as easily as possible. This is oriented for the main sprite, but works the same for the config sprite.
1. Extract images/plush-default-split.tar.gz
2. Pop your new images into /plush-default-split/main/
3. Zip up main/ (not config/)
4. Head on over to http://spritegen.website-performance.org/
5a. Upload the main.zip
5b. Set Horizontal Offset & Vertical Offset to something like 150px (prevents bleeding)
5c. Check "Compress Image with OptiPNG"
5d. Change Class Prefix from "sprite-" to "sprite_"
5e. Click "Create Sprite Image & CSS"
6. You are now provided with an image and CSS
6a. Download the image, rename to sprite-main.png, place in images/plush-default replacing what is there
6b. Copy/paste the generated CSS definitions in the textarea, replace what is in plush-default.css
6c. Change the generated .sprite_topright_queue position: "background-position: right" (instead of 0)
6d. Open queue.tmpl, find <div class="sprite_progress_done", and reset "-1299px" to the new offset (from 6b)
7. Re-archive the split folder, unix command: tar -czf plush-default-split.tar.gz plush-default-split
7a. Make sure to remove any Thumbs.db or .DS_Store files beforehand
8. Of course, test changes

View File

@@ -1,18 +0,0 @@
<OWNER> = Regents of the University of California
<ORGANIZATION> = University of California, Berkeley
<YEAR> = 1998
In the original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS".
Here is the license template:
Copyright (c) <YEAR>, <OWNER>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,63 +0,0 @@
http://creativecommons.org/licenses/by/3.0/
http://creativecommons.org/licenses/by/3.0/legalcode
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
4. to Distribute and Publicly Perform Adaptations.
5.
For the avoidance of doubt:
1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.
2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.

View File

@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,502 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -1,21 +0,0 @@
The MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,11 +0,0 @@
The module webtoolkit.aim.js is extracted from this source:
http://www.webtoolkit.info/demo/javascript/aim/webtoolkit.aim.js
The module does not include an explicit license.
In a private communication the author has told us that we can
assume the GPL3 license.
The home of the module is:
http://www.webtoolkit.info/ajax-file-upload.html

View File

@@ -1,18 +0,0 @@
#if $pane=="Main"#
<!-- start Main footer-->
#else if $pane=="Nzo"
<!-- start Nzo footer -->
#else#
<!-- start other footer -->
#if $pane!="Status" and $pane !="RSS"#</div>#end if#
</div>
<div class="clearfix"></div>
</div>
</div>
#end if#
#include $webdir + "/_inc_modals.tmpl"#
</div> <!-- close for the master-width div -->
</body>
</html>

View File

@@ -1,123 +0,0 @@
#if $pane=="Status" or $pane=="Config"#
#set global $path = '../'#
#else if $pane=="Main"#
#set global $path = ''#
#else#
#set global $path = '../../'#
#end if#
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SABnzbd $version</title>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="${path}rss?mode=history"/>
<link rel="stylesheet" type="text/css" href="${path}static/stylesheets/jqueryui/overcast/jquery-ui-1.8.15.custom.css?$version"/>
<link rel="stylesheet" type="text/css" href="${path}static/stylesheets/rateit/rateit.css"/>
<link rel="shortcut icon" type="image/ico" href="${path}staticcfg/ico/favicon.ico?v=1.1.0"/>
#if $color_scheme#
<link rel="stylesheet" type="text/css" href="${path}static/stylesheets/colorschemes/$color_scheme/${color_scheme}.css?$version"/>
#else#
<link rel="stylesheet" type="text/css" href="${path}static/stylesheets/colorschemes/gold/gold.css?$version"/>
#end if#
<meta name="apple-mobile-web-app-title" content="SABnzbd" />
<link rel="apple-touch-icon" sizes="76x76" href="${path}staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="${path}staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="${path}staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="${path}staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="${path}staticcfg/ico/android-192x192.png" />
<link rel="mask-icon" href="${path}staticcfg/ico/safari-pinned-tab.svg" color="#383F45">
<script type="text/javascript" src="${path}static/javascripts/lib.js?$version"></script>
#if $pane=="Main"#
<script type="text/javascript" src="${path}static/javascripts/plush.js?$version"></script>
<script type="text/javascript">
jQuery(function($){
$.plush.apikey = "$apikey";
$.plush.Tprev = "$T('Plush-prev')"; // translations for pagination
$.plush.Tnext = "$T('Plush-next')";
$.plush.Tconfirmation = "$T('Plush-confirm')";
$.plush.TconfirmPurgeH = "$T('Plush-confirmPurgeH')";
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
</script>
#else if $pane=="Nzo"#
<script type="text/javascript" src="${path}static/javascripts/config.js?$version"></script>
<script type="text/javascript">
var config_pane = "NZO"; // re-uses config's js/css
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
</script>
<script type="text/javascript" src="${path}static/javascripts/plush.js?$version"></script>
<script type="text/javascript">
jQuery(function($){
$.plush.apikey = "$apikey";
$.plush.Tprev = "$T('Plush-prev')"; // translations for pagination
$.plush.Tnext = "$T('Plush-next')";
$.plush.Tconfirmation = "$T('Plush-confirm')";
$.plush.TconfirmPurgeH = "$T('Plush-confirmPurgeH')";
$.plush.Init(); // Initialize Plush UI
$.plush.Refresh(); // Initiate Plush refresh cycle
});
</script>
#else#
<script type="text/javascript" src="${path}static/javascripts/config.js?$version"></script>
<script type="text/javascript">
var config_pane = "$pane";
var help_uri = "$help_uri";
var apikey = "$apikey";
var confirmWithoutSavingPrompt = "$T('Plush-confirmWithoutSavingPrompt')";
</script>
#end if#
</head>
<body#if $pane=="Nzo"# class="nzo"#else if $pane!="Main"# class="config_body"#end if#>
<div id="master-width">
<div class="wrapper">
<div id="topmenu_bar" style="display:none">
<div class="navigation">
<ul class="menu" id="navigation_menu_right">
#if $pane=="Main"#
<li class="first"><a href="#" id="add_nzb"><span class="icon_nav_addnzb">$T('Plush-addnzb')</span></a></li>
<li><a href="#" id="manual_refresh_wrapper"><span class="icon_nav_refresh">$T('Plush-button-refresh')</span></a></li>
<li><a href="#" id="plush_options"><span class="icon_nav_options">$T('Plush-options')</span></a></li>
<li class="last"><a href="#" id="help" target="_blank"><span class="icon_nav_help">$T('menu-help').capitalize()</span></a></li>
#else#
<li class="first last"><a href="#" id="help" target="_blank"><span class="icon_nav_help">$T('menu-help').capitalize()</span></a></li>
#end if#
</ul>
<ul class="menu" id="navigation_menu_left">
<li#if $pane=="Main"# class="active first"#else# class="first"#end if#><a href="${path}"><span class="icon_nav_download">#include $webdir + "/../../Config/templates/staticcfg/images/logo-arrow.svg"# $T('Plush-downloads').capitalize()</span></a></li>
<li#if $pane=="Status"# class="active"#end if#><a href="${path}status/"><span class="icon_nav_connections">$T('menu-cons').capitalize()</span></a></li>
<li#if $pane=="RSS"# class="active"#end if#><a href="${path}config/rss/"><span class="icon_nav_rss">$T('rss').upper()</span></a></li>
<li#if $pane!="RSS" and $pane!="Nzo" and ($pane=="Config" or $path=='../../')# class="active last"#else# class="last"#end if#><a href="${path}config/"><span class="icon_nav_config">$T('menu-config').capitalize()</span></a></li>
</ul>
</div>
<div id="nav_text_right">
#if $loadavg#$T('ft-sysload'):&nbsp;<span id="loadavg">$loadavg</span>#end if#
</div>
<div id="nav_text_left">
<span id="warning_box"><b><a href="${path}status/#tabs-warnings" id="last_warning"><span id="have_warnings">$have_warnings</span> $T('warnings')</a></b></span>
#if $pane=="Main"#
#if $new_release#&sdot; <a href="$new_rel_url" id="new_release" target="_blank">$T('Plush-updateAvailable').replace(' ','&nbsp;')</a>#end if#
#end if#
</div>
</div>
</div>
<noscript><h1 align="center">$T('Plush-enableJavascript')</h1></noscript>
#if $pane=="Main"#
#else if $pane=="Nzo"#
#else if $pane=="Status" or $pane =="RSS"#
<div id="config_container" class="config_margin_status lang-$active_lang">
<div id="config_content">
#else#
<div id="config_container" class="config_margin">
<div id="config_content">
<div id="config">
<div id="config-content" class="clearfix">
#end if#

View File

@@ -1,217 +0,0 @@
<script type="text/javascript">
function expired_host_changed(self) {
var host = document.getElementsByName('expired_host')[0];
host.value = self.value;
host.readOnly = self.value.length > 0;
}
function flag_modal_submit(self) {
var radios = document.getElementsByName('rating_flag');
for (var i = 0; i < radios.length; i++) {
if (radios[i].checked) {
document.getElementById('noopt').setAttribute('style', 'display:none;size:1');
document.getElementById('submitbtn').click();
return;
}
}
document.getElementById('noopt').removeAttribute('style');
}
</script>
<!-- modals -->
<div style='display:none'>
<div id="help_modal">
<table>
<tr><td><strong>$T('menu-wiki'):</strong></td><td><a href="$helpuri$help_uri" target="_blank">$helpuri$help_uri</a></td></tr>
<tr><td><strong>$T('menu-forums'):</strong></td><td><a href="https://forums.sabnzbd.org/" target="_blank">https://forums.sabnzbd.org/</a></td></tr>
<tr><td><strong>$T('menu-irc'):</strong></td><td><a href="https://sabnzbd.org/live-chat.html" target="_blank">https://sabnzbd.org/live-chat.html</a></td></tr>
</table>
<div class="sabnzbd_logo main_sprite_container sprite_sabnzbdplus_logo"></div>
<p><strong>SABnzbd $T('version'):</strong> $version</p>
<p><small>Copyright (C) 2008-2020 The SABnzbd Team &lt;team@sabnzbd.org&gt;</small></p>
<p><small>$T('yourRights')</small></p>
</div>
<div id="plush_options_modal">
<p><a href="status/disconnect?apikey=$apikey" class="juiButton">$T('link-forceDisc')</a></p>
<p><a href="config/restart?apikey=$apikey" class="juiButton" id="sabnzbd_restart" rel="#echo $T('explain-Restart').replace("<br />","\n")#">$T('sch-restart')</a>
<a href="shutdown?apikey=$apikey&amp;pid=$pid" class="juiButton" id="sabnzbd_shutdown" rel="$T('shutdownOK?')">$T('sch-shutdown')</a></p>
<br/>
$T('Plush-refreshRate'):
<select id="refreshRate-option">
<option value="1">1 $T('second')</option>
<option value="2">2 $T('second')</option>
<option value="4">4 $T('second')</option>
<option value="8">8 $T('second')</option>
<option value="16">16 $T('second')</option>
<option value="30">30 $T('second')</option>
<option value="60">1 $T('minute')</option>
<option value="120">2 $T('minute')</option>
<option value="900">15 $T('minute')</option>
<option value="1800">30 $T('minute')</option>
<option value="0">$T('Plush-disabled')</option>
</select><br/><br/>
$T('Plush-containerWidth'):
<select id="containerWidth-option">
<option value="100%">100%</option>
<option value="90%">90%</option>
<option value="80%">80%</option>
<option value="70%">70%</option>
<option value="60%">60%</option>
<option value="50%">50%</option>
<option value="40%">40%</option>
</select><br/><br/>
<!-- <input type="checkbox" id="confirmDeleteQueue" checked="checked" /> $T("Plush-confirmDeleteQueue")<br/><br/>
<input type="checkbox" id="confirmDeleteHistory" checked="checked" /> $T("Plush-confirmDeleteHistory")<br/><br/> -->
<span id="explain-blockRefresh" title="$T("Plush-explain-blockRefresh")"><input type="checkbox" id="blockRefresh" checked="checked" /> $T("Plush-blockRefresh")</span>
</div>
#if $pane=="Main"#
<div id="add_nzb_modal">
<input type="text" id="addID_input" size="31" />
<input type="submit" id="addID" value="$T('Plush-fetch')" class="juiButton" />
<div id="add_nzb_hr"><hr></div>
<form action="api" id="uploadNZBForm" method="post" enctype="multipart/form-data">
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="mode" value="addfile" />
<input type="file" id="uploadNZBFile" name="name" size="12" style="width:180px;" />
<input type="submit" value="$T('Plush-upload')" class="juiButton" />
<span id="uploadingSpinner" class="loading" style="display:none">&nbsp;</span>
<br/><i>$T('Plush-uploadTip')</i>
<div id="add_nzb_hr"><hr></div>
<i>$T('pp'):</i>
<table id="add_nzb_pp">
#if $categories#
<tr><td style="text-align:right">$T('category'):</td>
<td><select id="addID_cat" name="cat">
#for $ct in $categories#
<option value="$ct">$Tspec($ct)</option>
#end for#
</select>
</td></tr>
#end if#
<tr><td style="text-align:right">$T('priority'):</td>
<td><select id="addID_priority" name="priority">
<option value="-100" selected="selected">$T('default')</option>
<option value="2">$T('pr-force')</option>
<option value="1">$T('pr-high')</option>
<option value="0">$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
</select>
</td></tr>
<tr><td style="text-align:right">$T('pp'):</td>
<td><select id="addID_pp" name="pp">
<option value="-1">$T('default')</option>
<option value="0">$T('pp-none')</option>
<option value="1">$T('pp-repair')</option>
<option value="2">$T('pp-unpack')</option>
<option value="3">$T('pp-delete')</option>
</select>
</td></tr>
#if $scripts#
<tr><td style="text-align:right">$T('script'):</td>
<td><select id="addID_script" name="script">
#for $sc in $scripts#
<option value="$sc">$Tspec($sc)</option>
#end for#
</select>
</td></tr>
#end if#
</table>
<div id="add_nzb_hr"><hr></div>
<i>$T('Plush-addnzb-filename'):</i><br/>
<input type="text" name="nzbname" id="addID_nzbname" size="38" />
</form>
</div>
<div id="queue_purge_modal" class="center">
<br/><br/><strong>$T('purgeQueue')</strong>
<br/><br/><input type="submit" name="all" value="$T('purgeNZBs')" class="juiButton" />
<br/><br/><input type="submit" name="delete" value="$T('purgeNZBs-Files')" class="juiButton" />
</div>
<div id="queue_retry_modal" class="center">
<br/><br/><strong>$T('retryQueue')</strong>
<br/><br/><input type="submit" name="all" value="$T('retryNZBs')" class="juiButton" />
</div>
<div id="history_purge_modal" class="center">
<br/><br/><strong>$T('purgeHist')</strong>
<!--<br/><br/><input type="submit" name="all" value="Purge All NZBs" class="juiButton" />-->
<br/><br/><input type="submit" name="failed" value="$T('purgeFailed')" class="juiButton" />
<br/><br/><input type="submit" name="delete" value="$T('purgeFailed-Files')" class="juiButton" />
<br/><br/><input type="submit" name="completed" value="$T('purgeCompl')" class="juiButton" />
</div>
<div id="retry_modal">
<form action="history/retry_pp" method="post" enctype="multipart/form-data">
<input type="hidden" id="retry_modal_job" name="job" />
<input type="hidden" name="apikey" value="$apikey" />
<br/><p><strong id="retry_modal_title">title</strong></p>
<br/><p>$T('opt-extra-NZB'):<br/><input type="file" name="nzbfile" /></p>
<br/><p>$T('srv-password'):<br/><input type="text" name="password" /></p>
<br/><p><input type="submit" value="$T('button-retry')" class="juiButton" /></p>
</form>
</div>
<div id="delete_nzb_modal" class="center">
<input type="hidden" id="delete_nzb_modal_job" />
<input type="hidden" id="delete_nzb_modal_mode" />
<br/><br/><strong id="delete_nzb_modal_title">title</strong><br/><br/>
<input type="submit" id="delete_nzb_modal_remove_nzb" value="$T('removeNZB')" class="juiButton" />
<input type="submit" id="delete_nzb_modal_remove_files" value="$T('removeNZB-Files')" class="juiButton" />
</div>
<div id="flag_modal">
<input type="hidden" id="flag_modal_job" />
<div class="rating_flag_radio"><input type="radio" name="rating_flag" value="spam">&nbsp;$T('spam')</div>
<div class="rating_flag_radio"><input type="radio" name="rating_flag" value="encrypted">&nbsp;$T('encrypted')</div>
<div class="rating_flag_radio">
<input type="radio" name="rating_flag" value="expired">&nbsp;$T('expired')
<div class="rating_modal_extra">
<div class="rating_modal_expired">$T('host')&nbsp;&nbsp;<input type="text" name="expired_host" value="www.altopia.com" readonly></div>
<select name="common_host" onchange="expired_host_changed(this)">
<option value='www.altopia.com' selected>Altopia</option>
<option value='www.astraweb.com'>Astraweb</option>
<option value='www.euroaccess.ln'>EuroAccess</option>
<option value='www.forteinc.com'>Forte Agent</option>
<option value='www.giganews.com'>Giganews</option>
<option value='www.highwinds.com'>Highwinds</option>
<option value='www.newsdemon.com'>Newsdemon</option>
<option value='www.newsgroupdirect.com'>NewsGroupDirect</option>
<option value='www.newshosting.com'>NewsHosting</option>
<option value='www.readnews.com'>Readnews</option>
<option value='www.supernews.com'>SuperNews</option>
<option value='www.thundernews.com'>ThunderNews</option>
<option value='www.tweaknews.eu'>Tweaknews</option>
<option value='www.usenetserver.com'>UsenetServer</option>
<option value='www.xentech.net'>XenTech</option>
<option value='www.xsnews.nl'>XSnews</option>
<option value=''>$T('other')</option>
</select>
</div>
</div>
<div class="rating_flag_radio">
<input type="radio" name="rating_flag" value="other">&nbsp;$T('otherProblem')
<div class="rating_modal_extra"><input style="width:99%" type="text" name="other"></div>
</div>
<div class="rating_flag_radio">
<input type="radio" name="rating_flag" value="comment">&nbsp;$T('comment')
<div class="rating_modal_extra"><input style="width:99%" type="text" name="comment"></div>
</div>
<br/>
<div class="center">
<input id="submitbtn" type="submit" style="display:none;size:1"/>
<input value="Send" class="juiButton" onclick="flag_modal_submit(this)"/>
<label id="noopt" class="rating_modal_noopt" style="display:none;size:1">No option selected</label>
</div>
</div>
#end if#
</div>

View File

@@ -1,153 +0,0 @@
<% import datetime %>
<% from sabnzbd.misc import time_format %>
<script type="text/javascript">
if (typeof( jQuery ) == 'undefined')
window.location = "../"; // redirect to main on direct template hit
jQuery(function($) {
$.plush.histnoofslots = $noofslots;
<!--#if $loadavg#-->
$.plush.SetLoadavg("$loadavg");
<!--#end if#-->
$.plush.SetHistoryStats("<!--#if $day_size#-->&nbsp;&nbsp;&nbsp;&nbsp;<strong>$day_size</strong>&nbsp;$T('today')<!--#end if #--><!--#if $week_size#-->&nbsp;&nbsp;&nbsp;&nbsp;<strong>$week_size</strong>&nbsp;$T('thisWeek')<!--#end if #--><!--#if $month_size#-->&nbsp;&nbsp;&nbsp;&nbsp;<strong>$month_size</strong>&nbsp;$T('thisMonth')<!--#end if #--><!--#if $total_size#-->&nbsp;&nbsp;&nbsp;&nbsp;<strong>$total_size</strong>&nbsp;$T('total')<!--#end if #-->");
});
</script>
<!--#if $limit > 1 or $search#-->
<table class="queueTable" id="historyTable" cellspacing="0">
<!--#set $cur = 0#-->
<!--#for $line in $lines #-->
<!--#set $cur = $cur + 1#-->
<tr id="$line.nzo_id" class="<!--#if $cur%2#-->alt<!--#end if#--> <!--#if $line.action_line #-->active<!--#end if#-->">
<td class="nzb_status_col">
&nbsp;<div class="nzb_status <!--#if $line.action_line or $line.status=="Queued"#-->Loaded<!--#else if $line.status=="Failed"#-->main_sprite_container sprite_hv_error<!--#else#-->main_sprite_container sprite_hv_star<!--#end if#-->">&nbsp;</div>
</td>
<td class="historyTitle" <!--#if $rating_enable#-->style="width:35%"<!--#end if#-->>
<a href="scriptlog?name=$line.nzo_id" class="modal-detail" rel="details">$line.name</a>
<div style="display:none">
<div id="details-$line.nzo_id">
<table width="100%" class="rssTable">
<% compl = datetime.datetime.fromtimestamp(float(line['completed'])).strftime(time_format('%Y-%m-%d %H:%M:%S')) %>
<tr><td><strong>$T('completed')</strong></td><td>$compl</td></tr>
<tr class="odd"><td><strong>$T('name')</strong></td><td>$line.name<!--#if $line.action_line#--> - $line.action_line<!--#else if $line.fail_message#--> - <span class="fail_message">$line.fail_message</span><!--#end if#--></td></tr>
<tr><td><strong>$T('size')</strong></td><td>$line.size</td></tr>
<tr class="odd"><td><strong>$T('status')</strong></td><td>$T('post-'+$line.status)</td></tr>
<!--#set $oddLine = not False#-->
<!--#if $line.category#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$T('category')</b></td><td>$line.category</td></tr>
<!--#end if#-->
<!--#if $line.storage#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$T('msg-path')</b></td><td>$line.storage</td></tr>
<!--#end if#-->
<!--#for $stage in $line.stage_log#-->
<!--#set $oddLine = not $oddLine#-->
<tr <!--#if $oddLine#-->class="odd"<!--#end if#-->><td><b>$T('stage-'+$stage.name.title.lower())</b></td><td>
<!--#for $action in $stage.actions#-->
$action<br/>
<!--#end for#-->
</td></tr>
<!--#end for#-->
</table>
</div>
</div>
</td>
<td>
<!--#if $line.url_info #-->
<a href="$line.url_info" target="_blank">
<div class="icon_history_verbose main_sprite_container sprite_hv_star pointer" title="$T('Plush-openInfoURL')<br><br>$line.url_info">&nbsp;</div>
</a>
<!--#end if#-->
<!--#if $line.size or $line.category or $line.path or $line.storage#-->
<div class="icon_history_verbose main_sprite_container sprite_hv_stats" title='<!--#if $line.size#-->$T('size'): $line.size<!--#end if#--><!--#if $line.category#--><br>$T('category'): $line.category<!--#end if#-->'>&nbsp;</div>
<!--#else#-->
<div class="icon_history_verbose main_sprite_container sprite_hv_stats hvFaded">&nbsp;</div>
<!--#end if#-->
<!--#for $stage in $line.stage_log#-->
<!--#if $stage.name.lower() == "script"#-->
<a href="scriptlog?name=$line.nzo_id" class="modal" rel="scriptlog">
<div class="icon_history_verbose main_sprite_container sprite_hv_$stage.name.lower() pointer" title='$T('Plush-viewScriptLog')'>&nbsp;</div>
</a>
<!--#if not $line.action_line#-->
<!--#for $action in $stage.actions#-->
<h3 class="hvMessageScript"><!--#echo $action.replace("'","&rsquo;").replace("<a href","<a class='modal' rel='scriptlog2' href") #--></h3>
<!--#end for#-->
<!--#end if#-->
<!--#else#-->
<!--#if $stage.name != "Source" and $stage.name != "Servers"#-->
<div class="icon_history_verbose main_sprite_container sprite_hv_$stage.name.lower()" title='<!--#for $action in $stage.actions#--><!--#echo $action.replace("'","&rsquo;") #--><br><!--#end for#-->'>&nbsp;</div>
<!--#end if#-->
<!--#end if#-->
<!--#end for#-->
<!--#if $line.retry#-->
<form action="history/retry_pp" method="post" enctype="multipart/form-data">
<input type="hidden" value="$line.nzo_id" name="job" />
<input type="hidden" name="apikey" value="$apikey" />
&nbsp;<a href="#" class="retry-nzbfile">$T('button-retry')</a>
</form>
<!--#end if#-->
<!--#if $line.action_line#-->
<h3 class="hvMessageAction">&raquo;&nbsp;$line.action_line&nbsp;</h3>
<!--#end if#-->
<!--#if $line.fail_message#-->
<h3 class="hvMessageFail">&raquo;&nbsp;$line.fail_message&nbsp;</h3>
<!--#end if#-->
</td>
<!--#if $rating_enable#-->
<!--#if $line.has_rating#-->
<td>
<div class="rating_stars_block_r">
<div class="rating_stars">
<div class="rating_icon_vision"></div><span class="avg_rate" value="$line.rating_avg_video"></span>
<input class="user_combo" type="hidden" value="$line.rating_user_video">
<select class="user_combo video" style="background:transparent">
<!--#if not $line.rating_user_video#--><option>-</option><!--#end if#-->
<!--#for $val in $range(1, 11)#--><option>$val</option><!--#end for#-->
</select>
</div>
<div class="rating_stars">
<div class="rating_icon_sound"></div><span class="avg_rate" value="$line.rating_avg_audio"></span>
<input class="user_combo" type="hidden" value="$line.rating_user_audio">
<select class="user_combo audio" style="background:transparent">
<!--#if not $line.rating_user_audio#--><option>-</option><!--#end if#-->
<!--#for $val in $range(1, 11)#--><option>$val</option><!--#end for#-->
</select>
</div>
</div>
</td>
<td>
<div class="rating_vote_block">
<div class="rating_icon_thumbup user_vote up"></div>
<!--#if $line.rating_user_vote==1#--><b><!--#end if#-->$line.rating_avg_vote_up<!--#if $line.rating_user_vote==1#--></b><!--#end if#-->
<div class="rating_icon_thumbdown user_vote down"></div>
<!--#if $line.rating_user_vote==2#--><b><!--#end if#-->$line.rating_avg_vote_down<!--#if $line.rating_user_vote==2#--></b><!--#end if#-->
</div>
<div class="rating_flag">
<a href="#" class="show_flags">$T('report')</a>
</div>
</td>
<!--#else#-->
<td></td><td></td>
<!--#end if#-->
<!--#end if#-->
<td class="options nowrap">
<!--#if not $line.loaded#-->
<% d = datetime.datetime.fromtimestamp(float(line['completed'])) %>
<small class="history_added">$d</small>
<div class="main_sprite_container icon_nzb_remove" title="$T('nzo-delete')">&nbsp;</div>
<!--#end if#-->
</td>
</tr>
<!--#end for#-->
</table>
<!--#end if#-->

View File

@@ -1,241 +0,0 @@
<!--#set global $pane="Main"#-->
<!--#set global $help_uri=""#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->
<div id="page-wrap" class="tiley_sprite_container sprite_tile_queue_wrap">
<div id="hdr-queue" class="tilex_sprite_container sprite_tile_qh">
<div class="logo main_sprite_container sprite_topleft_queue"><h1><!--#if $active_lang in ('de', 'fr') then $T('menu-queue') else $T('menu-queue').upper()#--></h1></div>
<form id="queueSearchForm" action="#"><input id="queueSearchBox" type="text" size="8" class="listSearchBox main_sprite_container sprite_h_search" /></form>
<div class="queue-buttons queue-buttons-pause lang-$active_lang main_sprite_container sprite_topright_queue">
<ul>
<li class="main_sprite_container <!--#if $paused then 'sprite_q_pause_on' else 'sprite_q_pause'#-->" title="$T('link-pause') &frasl; $T('link-resume')" id="pause_resume"></li>
<li class="main_sprite_container sprite_q_menu_pausefor">
<a href="#"></a>
<ul id="set_pause_list">
<li><a href="javascript:void(0)" class="set_pause pointer" rel="5">$T('Plush-pause5m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="15">$T('Plush-pause15m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="30">$T('Plush-pause30m')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="60">$T('Plush-pause1h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="180">$T('Plush-pause3h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="360">$T('Plush-pause6h')</a></li>
<li><a href="javascript:void(0)" class="set_pause pointer" rel="custom" id="pauseForPrompt" title="$T('Plush-pauseForPrompt')">$T('Plush-pauseFor')</a></li>
</ul>
</li>
<li id="pause_int"></li>
<li class="main_sprite_container sprite_q_queue">
<a class="sf-with-ul">$T('menu-queue')</a>
<ul>
<!--#if $have_logout#--><li><a href="login?logout=1">$T('logout')</a></li><!--#end if#-->
<!--#if $have_quota#--><li><a id="reset_quota_now" class="pointer">$T('link-resetQuota')</a></li><!--#end if#-->
<!--#if $have_rss_defined#--><li><a id="get_rss_now" class="pointer">$T('button-rssNow')</a></li><!--#end if#-->
<!--#if $have_watched_dir#--><li><a id="get_watched_now" class="pointer">$T('sch-scan_folder')</a></li><!--#end if#-->
<!--#if $pp_pause_event#--><li><a id="resume_pp" class="pointer">$T('sch-resume_post')</a></li><!--#end if#-->
<li><a id="topmenu_toggle" class="pointer">$T('Plush-topMenu')</a></li>
<li><a id="multiops_toggle" class="pointer">$T('Plush-multiOperations')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-onQueueFinish'):
<br/>
<select id="onQueueFinish-option">
<option value=""></option>
<optgroup label="$T('eoq-actions')">
<option value="shutdown_program" <!--#if $finishaction == 'shutdown_program' then 'selected' else ''#-->>$T('shutdownSab')</option>
<!--#if $power_options#-->
<option value="shutdown_pc" <!--#if $finishaction == 'shutdown_pc' then 'selected' else ''#-->>$T('shutdownPc')</option>
<option value="standby_pc" <!--#if $finishaction == 'standby_pc' then 'selected' else ''#-->>$T('standbyPc')</option>
<option value="hibernate_pc" <!--#if $finishaction == 'hibernate_pc' then 'selected' else ''#-->>$T('hibernatePc')</option>
<!--#end if#-->
</optgroup>
<!--#if $scripts#-->
<optgroup label="$T('eoq-scripts')">
<!--#for $sc in $scripts#-->
<!--#if $sc != 'None'#-->
<option value="script_$sc" <!--#if $finishaction == 'script_'+$sc then 'selected' else ''#-->>$sc</option>
<!--#end if#-->
<!--#end for#-->
</optgroup>
<!--#end if#-->
</select>
</a>
</li>
<li><a id="queue_purge" class="pointer" rel="$T('Plush-confirmPurgeQ')">$T('Plush-purge')</a></li>
<li><a id="queue_retry" class="pointer" rel="$T('Plush-confirmRetryQ')">$T('link-retryAll')</a></li>
<li>
<a class="sf-with-ul">$T('Plush-sort')</a>
<ul id="queue_sort_list">
<li class="queue_sort pointer" id="sortAgeAsc"><a>$T('Plush-sortAgeAsc')</a></li>
<li class="queue_sort pointer" id="sortAgeDesc"><a>$T('Plush-sortAgeDesc')</a></li>
<li class="queue_sort pointer" id="sortNameAsc"><a>$T('Plush-sortNameAsc')</a></li>
<li class="queue_sort pointer" id="sortNameDesc"><a>$T('Plush-sortNameDesc')</a></li>
<li class="queue_sort pointer" id="sortSizeAsc"><a>$T('Plush-sortSizeAsc')</a></li>
<li class="queue_sort pointer" id="sortSizeDesc"><a>$T('Plush-sortSizeDesc')</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="centerpiece">
<div class="main_sprite_container sprite_rounded_area_bg" id="time-left"><p><span id="stats_eta">&sdot;</span>&nbsp;$T('Plush-left')</p></div>
<div class="sabnzbd_logo main_sprite_container"><!--#include $webdir + "/../../Config/templates/staticcfg/images/logo-full.svg"#--></div>
<div class="main_sprite_container sprite_rounded_area_bg_edged" id="speed"><p><span id="stats_speed">&sdot;</span></p></div>
<div class="queue-buttons" id="speed-wrapper">
<ul>
<li class="main_sprite_container sprite_q_menu_pausefor">
<ul>
<li>
$T('Plush-maxSpeed'):&nbsp;&nbsp;
<input type="text" id="maxSpeed-option" size="4" />
<select id="maxSpeed-label">
<option value="%">%</option>
<option value="K">KB/s</option>
<option value="M">MB/s</option>
</select>
</li>
<li>
<input type="button" value="$T('Plush-reset')" id="maxSpeed-disable" />
<input type="button" value="$T('button-save')" id="maxSpeed-enable" />
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="queue-wrap" class="tiley_sprite_container sprite_tile_page_wrap">
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- multi-operations for queue processing -->
<div id="multiops_bar" class="tilex_sprite_container sprite_tile_qhistory" style="display:none">
<div id="multiops_inputs">
<div class="left">
<div id="multiops_title">$T('Plush-multiOperations')</div>
</div>
<div class="right">
<input type="button" id="multi_reset" value="$T('Plush-reset')" />
<input type="button" id="multi_apply" value="$T('Plush-applySelected')" />
</div>
<br class="clear"/>
<div class="left">
$T('nzo-selection'):&nbsp;
<a id="multiops_select_all">$T('nzo-all').capitalize()</a> &sdot;
<a id="multiops_select_range">$T('Plush-nzo-range').capitalize()</a> &sdot;
<a id="multiops_select_invert">$T('nzo-invert').capitalize()</a> &sdot;
<a id="multiops_select_none">$T('nzo-none').capitalize()</a>
</div>
<div class="right">
<select id="multi_status"><optgroup label="$T('status')">
<option value="">$T('status')</option>
<option value="pause">$T('sch-pause')</option>
<option value="resume">$T('sch-resume')</option>
</optgroup></select>
<!--#if $categories#-->
<select id="multi_cat"><optgroup label="$T('category')">
<option value="">$T('category')</option>
<!--#for $ct in $categories#-->
<option value="$ct">$Tspec($ct)</option>
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<select id="multi_priority"><optgroup label="$T('priority')">
<option value="">$T('priority')</option>
<option value="2">$T('pr-force')</option>
<option value="1">$T('pr-high')</option>
<option value="0">$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
</optgroup></select>
<select id="multi_pp"><optgroup label="$T('pp')">
<option value="">$T('pp')</option>
<option value="0">$T('pp-none')</option>
<option value="1">$T('pp-repair')</option>
<option value="2">$T('pp-unpack')</option>
<option value="3">$T('pp-delete')</option>
</optgroup></select>
<!--#if $scripts#-->
<select id="multi_script"><optgroup label="$T('script')">
<option value="">$T('script')</option>
<!--#for $sc in $scripts#-->
<!--#if $sc != "Default"#--><option value="$sc">$Tspec($sc)</option><!--#end if#-->
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<div id="multi_delete" class="main_sprite_container icon_nzb_remove sprite_ql_cross_on" title="$T('nzo-delete')">&nbsp;</div>
</div>
</div>
</div>
<!-- Queue ( queue.tmpl )-->
<div id="queue"></div>
<div class="box_fatbottom tilex_sprite_container sprite_tile_qh_bottom" id="box_fatbottom_queue">
<div class="right_stats nowrap" id="queue_stats"></div>
<div class="left_stats">
<select id="queue-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="queue-pagination" class="pagination"></div>
</div>
</div>
<!-- History Menu/Banner -->
<div id="hdr-history" class="box_banner_history tilex_sprite_container sprite_tile_qhistory">
<h1><!--#if $active_lang in ('de', 'fr') then $T('menu-history') else $T('menu-history').upper()#--> </h1>
<div class="box_banner_r">
<ul class="box_banner_menu">
<li class="main_sprite_container sprite_h_purge show" id="hist_purge" title="$T('purgeHist')"></li>
<li><select id="failed_only" style="margin-top:8px;">
<option value="0">$T('showAllHis')</option>
<option value="1">$T('showFailedHis')</option>
</select></li>
<li><form id="historySearchForm" action="#"><input id="historySearchBox" type="text" size="8" class="listSearchBox main_sprite_container sprite_h_search" /></form></li>
</ul>
</div>
</div>
<div class="box_banner_hr main_sprite_container sprite_tile_qh_seperator"></div>
<!-- History ( history.tmpl ) -->
<div id="history"></div>
<div class="box_fatbottom history_stats tilex_sprite_container sprite_tile_qh_bottom">
<div class="right_stats nowrap" id="history_stats"></div>
<div class="left_stats">
<select id="history-pagination-perpage" class="pagination-perpage">
<option value="5">5 / $T('Plush-page')</option>
<option value="10">10 / $T('Plush-page')</option>
<option value="20">20 / $T('Plush-page')</option>
<option value="30">30 / $T('Plush-page')</option>
<option value="40">40 / $T('Plush-page')</option>
<option value="50">50 / $T('Plush-page')</option>
<option value="9999999">$T('Plush-everything')</option>
<option value="1">$T('Plush-disabled')</option>
</select>
<div class="initial-loading">&nbsp;</div>
<div id="history-pagination" class="pagination"></div>
</div>
<div class="plush_wrapper"><div class="main_sprite_container sprite_sabnzbdplus_plush">&nbsp;</div></div>
</div>
</div>
<div id="btm-wrapper" class="tilex_sprite_container sprite_tile_bottom_wrap">
<div class="main_sprite_container sprite_btm_corner_right"></div>
<div class="main_sprite_container sprite_btm_corner_left"></div>
</div>
</div><!--#page_wrap-->
<!--#include $webdir + "/_inc_footer.tmpl"#-->

View File

@@ -1,102 +0,0 @@
<!--#set global $pane="Nzo"#-->
<!--#set global $help_uri=""#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->
<!--#if $varExists('slot')#-->
<form action="save" method="post" class="nzo_save_form">
<input type="hidden" name="apikey" value="$apikey">
<input type="text" name="name" size="70" value="$slot.filename_clean" />
<input type="text" name="password" style="width:200px" size="100" value="$slot.password" placeholder="$T('srv-password')"/>
<div>
<select name="index"><optgroup label="$T('order')">
<!--#for $i in range($noofslots)#-->
<option value=$i <!--#if $i == $index then "selected" else ""#-->>$i</option>
<!--#end for#-->
</select>
<!--#if $categories#-->
<select name="cat"><optgroup label="$T('category')">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $slot.cat.lower() == $ct.lower() then "selected" else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<select name="priority"><optgroup label="$T('priority')">
<option value="-100" <!--#if $slot.priority == "-100" then "selected" else ""#-->>$T('default')</option>
<option value="2" <!--#if $slot.priority == "2" then "selected" else ""#-->>$T('pr-force')</option>
<option value="1" <!--#if $slot.priority == "1" then "selected" else ""#-->>$T('pr-high')</option>
<option value="0" <!--#if $slot.priority == "0" then "selected" else ""#-->>$T('pr-normal')</option>
<option value="-1" <!--#if $slot.priority == "-1" then "selected" else ""#-->>$T('pr-low')</option>
</optgroup></select>
<select name="pp"><optgroup label="$T('pp')">
<option value="0" <!--#if $slot.unpackopts == "0" then "selected" else ""#-->>$T('pp-none')</option>
<option value="1" <!--#if $slot.unpackopts == "1" then "selected" else ""#-->>$T('pp-repair')</option>
<option value="2" <!--#if $slot.unpackopts == "2" then "selected" else ""#-->>$T('pp-unpack')</option>
<option value="3" <!--#if $slot.unpackopts == "3" then "selected" else ""#-->>$T('pp-delete')</option>
</optgroup></select>
<!--#if $scripts#-->
<select name="script"><optgroup label="$T('script')">
<!--#for $sc in $scripts#-->
<option value="$sc" <!--#if $slot.script.lower() == $sc.lower() then "selected" else ""#-->>$Tspec($sc)</option>
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<input type="submit" class="juiButton" value="$T('button-save')" />
</div>
</form>
<!--#end if#-->
<form action="bulk_operation" id="bulk_operation">
<input type="hidden" name="apikey" value="$apikey">
<input type="hidden" name="action_key" id="action_key" />
<div class="config_nav lang-$active_lang">
<ul>
<li><a class="config_menu" id="nzo_reload"><span class="config_sprite_container sprite_nzo_reload">$T('Plush-button-refresh')</span></a></li>
<br/>&nbsp;$T('nzo-action'):
<li><a id="nzo_delete"><span class="config_sprite_container sprite_nzo_delete">$T('nzo-delete')</span></a></li>
<li><a id="nzo_top"><span class="config_sprite_container sprite_nzo_top">$T('nzo-top')</span></a></li>
<li><a id="nzo_up"><span class="config_sprite_container sprite_nzo_up">$T('nzo-up')</span></a></li>
<li><a id="nzo_down"><span class="config_sprite_container sprite_nzo_down">$T('nzo-down')</span></a></li>
<li><a id="nzo_bottom"><span class="config_sprite_container sprite_nzo_bottom">$T('nzo-bottom')</span></a></li>
<br/>&nbsp;$T('nzo-selection'):
<li><a id="nzo_select_all"><span class="config_sprite_container sprite_nzo_select_all">$T('nzo-all').capitalize()</span></a></li>
<li><a id="nzo_select_range"><span class="config_sprite_container sprite_nzo_select_range">$T('Plush-nzo-range').capitalize()</span></a></li>
<li><a id="nzo_select_invert"><span class="config_sprite_container sprite_nzo_select_invert">$T('nzo-invert').capitalize()</span></a></li>
<li><a id="nzo_select_none"><span class="config_sprite_container sprite_nzo_select_none">$T('nzo-none').capitalize()</span></a></li>
</ul>
</div>
<div id="config_container" class="config_margin config_margin_wide lang-$active_lang">
<div id="config_content">
<table class="nzoTable">
<tr><th></th><th>$T('Plush-progress')</th><th>$T('nzo-filename')/$T('nzo-subject')</th><th>$T('nzo-age')</th></tr>
<!--#set $oddLine = False#-->
<!--#for $file in $active_files#-->
<!--#set $oddLine = not $oddLine#-->
<tr id="$file.nzf_id" class="nzf_row <!--#if $oddLine then "oddLine" else "evenLine"#--> active">
<td><input type="checkbox" name="$file.nzf_id" id="box-$file.nzf_id" <!--#if $file.checked then "checked" else ""#-->></td>
<td valign="middle">
<div class="main_sprite_container sprite_progressbar_bg">
<div class="main_sprite_container sprite_progress_done" style="background-position: -<!--#if $file.mb == "0.00" then "120" else int(120 - 120.0 / 100.0 * int(100 - float($file.mbleft) / float($file.mb) * 100))#-->px -401px">
<div class="totalDownload">$file.mbleft&nbsp;<small>$T('Plush-left')</small></div>
<div class="currentDownload">$file.mb&nbsp;<small>$T('MB')</small></div>
</div>
</div>
</td>
<td class="filename">$file.filename</td>
<td class="alignRight">$file.age</td>
</tr>
<!--#end for#-->
</table>
</div>
</div>
</form>
<!--#include $webdir + "/_inc_footer.tmpl"#-->

View File

@@ -1,132 +0,0 @@
<script type="text/javascript">
if (typeof( jQuery ) == 'undefined')
window.location = "../"; // redirect to main on direct template hit
jQuery(function($) {
$.plush.queuenoofslots = $noofslots;
$.plush.SetQueueSpeedLimit('$speedlimit', '$speedlimit_abs');
$.plush.SetQueueFinishAction('$finishaction');
$.plush.SetWarnings($have_warnings,"");
$.plush.SetQueuePauseInfo(<!--#if $paused#-->true<!--#else#-->false<!--#end if#-->,'$pause_int');
$.plush.SetQueueETAStats("<!--#if float($kbpersec) > 1023 #-->$speed<!--#else#--><!--#echo "%.0f" % float($kbpersec)#--> K<!--#end if#-->",<!--#echo "%.0f" % float($kbpersec)#-->,'$timeleft','$T('eta'): $eta');
// set lower-right queue stats
var stats = '';
<!--#if $have_quota#-->
stats += '<strong>$left_quota&nbsp;&nbsp;&frasl;&nbsp;&nbsp;$quota</strong>&nbsp;$T('quota-left')&nbsp;&nbsp;';
<!--#end if#-->
<!--#if $noofslots > 0#-->
stats += '<strong>$mbleft&nbsp;&nbsp;&frasl;&nbsp;&nbsp;$mb&nbsp;$T('MB')</strong>&nbsp;$T('Plush-remaining')';
<!--#end if#-->
<!--#if $diskspace1 == $diskspace2#-->
stats += '<div class="queue_footer_icon <!--#if float($diskspace1) < float($mbleft)/1024 #-->main_sprite_container sprite_q_stats_needspace" title="$T('Plush-notEnoughSpace')<!--#else#-->main_sprite_container sprite_q_stats_incomplete<!--#end if#-->">&nbsp;&nbsp;&nbsp;</div><strong>$diskspace1_norm$T('B')</strong>&nbsp;$T('Plush-freeSpace')';
<!--#else#-->
stats += '<div class="queue_footer_icon <!--#if float($diskspace1) < float($mbleft)/1024 #-->main_sprite_container sprite_q_stats_needspace" title="$T('Plush-notEnoughSpace')<!--#else#-->main_sprite_container sprite_q_stats_incomplete<!--#end if#-->">&nbsp;&nbsp;&nbsp;</div><strong>$diskspace1&nbsp;$T('GB')</strong>&nbsp;$T('Plush-freeSpaceTemp')'
+'<div class="queue_footer_icon <!--#if float($diskspace2) < float($mbleft)/1024 #-->main_sprite_container sprite_q_stats_needspace" title="$T('Plush-notEnoughSpace')<!--#else#-->main_sprite_container sprite_q_stats_complete<!--#end if#-->">&nbsp;&nbsp;&nbsp;</div><strong>$diskspace2_norm$T('B')</strong>&nbsp;$T('Plush-freeSpace')';
<!--#end if#-->
$.plush.SetQueueStats(stats);
});
// set the page title here (due to localizations)
<!--#if $noofslots < 1 #-->
<!--#if $paused#-->
document.title = '$T('ft-paused') | SABnzbd $version';
<!--#else#-->
document.title = '$T('Plush-idle') | SABnzbd $version';
<!--#end if#-->
<!--#else if $paused#-->
document.title = '$T('ft-paused') | <!--#echo "%.0f" % float($mbleft)#--> $T('MB') $T('Plush-left') | $noofslots NZBs';
<!--#else#-->
document.title = '<!--#if float($kbpersec) > 1023 #-->$speed<!--#else#--><!--#echo "%.0f" % float($kbpersec)#--> K<!--#end if#-->B/s | <!--#echo "%.0f" % float($mbleft)#--> $T('MB') | $timeleft $T('Plush-left')';
<!--#end if#-->
</script>
<table class="queueTable" id="queueTable" cellspacing="0">
<!--#set $cur = 0#-->
<!--#for $slot in $slots#-->
<!--#set $cur = $cur + 1#-->
<tr id="$slot.nzo_id"<!--#if $cur%2#--> class="alt"<!--#end if#-->>
<td class="nzb_status_col nowrap">
&nbsp;<div class="nzb_status <!--#if $slot.status == "Paused"#-->main_sprite_container sprite_ql_grip_pause<!--#else#-->main_sprite_container sprite_ql_grip_resume<!--#end if#-->">&nbsp;
</div>
<% # <!--#else if $slot.status == "Downloading"#-->main_sprite_container sprite_ql_grip_active %>
</td>
<td class="download-title" <!--#if $rating_enable#-->style="width:35%"<!--#end if#-->>
<!--#for $label in $slot.labels#-->
<span class="label">$label</span>
<!--#end for#-->
<a href="nzb/$slot.nzo_id/" title="$T('status'): $T('post-'+$slot.status)<br/>$T('nzo-age'): $slot.avg_age<br/><!--#if $slot.mbmissing!="0.00"#-->$T('missingArt'): $slot.mbmissing $T('MB')<!--#end if#-->">$slot.filename.replace('.', '.&#8203;').replace('_', '_&#8203;')<!--#if $slot.password#--> / $slot.password<!--#end if#--></a>
</td>
<!--#if $rating_enable#-->
<!--#if $slot.has_rating#-->
<td>
<div class="rating_stars_block_c">
<div class="rating_stars">
<div class="rating_icon_vision"></div><span class="avg_rate" value="$slot.rating_avg_video"></span>
</div>
<div class="rating_stars">
<div class="rating_icon_sound"></div><span class="avg_rate" value="$slot.rating_avg_audio"></span>
</div>
</div>
</td>
<!--#else#-->
<td></td>
<!--#end if#-->
<!--#end if#-->
<td>
<div class="main_sprite_container sprite_progressbar_bg">
<div class="main_sprite_container sprite_progress_done" style="background-position: -<!--#if $slot.mb == "0.00" then "120" else int(120 - 120.0 / 100.0 * int(100 - float($slot.mbleft) / float($slot.mb) * 100))#-->px -401px">
<div class="totalDownload">$slot.mb_fmt&nbsp;<small>$T('MB')</small></div>
<div class="currentDownload"><!--#if $slot.mb!=$slot.mbleft#-->$slot.mbdone_fmt&nbsp;<small>$T('MB')&nbsp;$T('AofB')</small><!--#end if#--></div>
</div>
</div>
</td>
<td class="eta nowrap">
<!--#if (not $paused and $slot.status not in ("Paused", "Checking")) or $slot.priority == 'Force'#-->
<span title="$slot.eta">$slot.timeleft&nbsp;$T('Plush-left')</span>
<!--#else#-->
$T('post-'+$slot.status)
<!--#end if#-->
</td>
<td class="options nowrap">
<!--#if $categories#-->
<select class="change_cat"><optgroup label="$T('category')">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $slot.cat.lower() == $ct.lower() then "selected" else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<select class="proc_priority"><optgroup label="$T('priority')">
<option value="2" <!--#if $slot.priority == "Force" then "selected" else ""#-->>$T('pr-force')</option>
<option value="1" <!--#if $slot.priority == "High" then "selected" else ""#-->>$T('pr-high')</option>
<option value="0" <!--#if $slot.priority == "Normal" then "selected" else ""#-->>$T('pr-normal')</option>
<option value="-1" <!--#if $slot.priority == "Low" then "selected" else ""#-->>$T('pr-low')</option>
<option value="-4" <!--#if $slot.priority == "Stop" then "selected" else ""#-->>$T('pr-stop')</option>
</optgroup></select>
<select class="change_opts"><optgroup label="$T('pp')">
<option value="0" <!--#if $slot.unpackopts == "0" then "selected " else ""#-->>$T('pp-none')</option>
<option value="1" <!--#if $slot.unpackopts == "1" then "selected " else ""#-->>$T('pp-repair')</option>
<option value="2" <!--#if $slot.unpackopts == "2" then "selected " else ""#-->>$T('pp-unpack')</option>
<option value="3" <!--#if $slot.unpackopts == "3" then "selected " else ""#-->>$T('pp-delete')</option>
</optgroup></select>
<!--#if $scripts#-->
<select class="change_script"><optgroup label="$T('script')">
<!--#for $sc in $scripts#-->
<option value="$sc" <!--#if $slot.script == $sc then "selected" else ""#-->>$Tspec($sc)</option>
<!--#end for#-->
</optgroup></select>
<!--#end if#-->
<div class="main_sprite_container icon_nzb_remove" title="$T('nzo-delete')">&nbsp;</div>
</td>
</tr>
<!--#end for#-->
</table>

View File

@@ -1,233 +0,0 @@
// *****************************************************************
// Plush Config code as follows, by pairofdimes (see LICENSE-CC.txt)
jQuery(document).ready(function($){
// Top Menu
var noTopMenu = $.cookie('plushNoTopMenu') ? $.cookie('plushNoTopMenu') : 0;
$('#topmenu_bar').show();
// Container width
var containerWidth = $.cookie('plushContainerWidth') ? $.cookie('plushContainerWidth') : '100%';
$('#master-width').css('width',containerWidth);
// Confirm user exits without saving changes first
if (config_pane != 'NZO') {
$(':input','form').change(function(){
window.onbeforeunload = function(){return confirmWithoutSavingPrompt;}
});
$('form').submit(function(){
window.onbeforeunload = null;
});
}
// modals
$("#help").colorbox({ inline:true, href:"#help_modal", title:$("#help").text(),
innerWidth:"375px", innerHeight:"350px", initialWidth:"375px", initialHeight:"350px", speed:0, opacity:0.7
});
$(".show_qrcode").colorbox({ photo:true, innerHeight:"300px", innerWidth:"300px", speed:0, opacity: 0.7, scrolling:false });
// jqueryui tabs/buttons
$('.juiButton').button();
$( ".tabs" ).tabs({
cookie: {
expires: 1 // store cookie for a day, without, it would be a session cookie
}
});
$(".vertical-tabs").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
$(".vertical-tabs li").removeClass('ui-corner-top').addClass('ui-corner-left');
// kludge for jqueryui tabs, using cookie option above for some reason does not select the default 1st tab
$('.tabs').each(function(index) {
if (!$(this).children('ul.ui-tabs-nav').children('li.ui-tabs-selected').length)
$(this).tabs('select',0);
});
// kludge for jqueryui tabs, clicking for an existing tab doesnt switch to it
$('#activeFeedLink').click(function(){
// tab-feed focus
$( ".tabs" ).tabs("select",1)
return false;
});
switch(config_pane) {
// not a config page, rather queued nzb file listing page
case 'NZO':
$('#nzo_reload').click(function(){ document.location.reload(); });
// operations
$('#nzo_delete').click(function(){
$('#action_key').val('Delete');
$('#bulk_operation').submit();
});
$('#nzo_top').click(function(){
$('#action_key').val('Top');
$('#bulk_operation').submit();
});
$('#nzo_up').click(function(){
$('#action_key').val('Up');
$('#bulk_operation').submit();
});
$('#nzo_down').click(function(){
$('#action_key').val('Down');
$('#bulk_operation').submit();
});
$('#nzo_bottom').click(function(){
$('#action_key').val('Bottom');
$('#bulk_operation').submit();
});
// selections
$("#nzo_select_all").click(function(){
$("INPUT[type='checkbox']").prop('checked', true).trigger('change');
});
var last1, last2;
$("#nzo_select_range").click(function(){
if (last1 && last2 && last1 < last2)
$("INPUT[type='checkbox']").slice(last1,last2).prop('checked', true).trigger('change');
else if (last1 && last2)
$("INPUT[type='checkbox']").slice(last2,last1).prop('checked', true).trigger('change');
});
$("#nzo_select_invert").click(function(){
$("INPUT[type='checkbox']").each( function() {
$(this).prop('checked', !$(this).prop('checked')).trigger('change');
});
});
$("#nzo_select_none").click(function(){
$("INPUT[type='checkbox']").prop('checked', false).trigger('change');
});
// click filenames to select
$('#config_content .nzoTable .nzf_row').click(function(event) {
$('#box-'+$(event.target).parent().attr('id')).prop('checked', !$('#box-'+$(event.target).parent().attr('id')).prop('checked')).trigger('change');
// range event interaction -- see further above
if (last1) last2 = last1;
last1 = $(event.target).parent()[0].rowIndex ? $(event.target).parent()[0].rowIndex : $(event.target).parent().parent()[0].rowIndex;
});
//
$('#config_content .nzoTable .nzf_row input').change(function(e){
if ($(e.target).prop('checked'))
$(e.target).parent().parent().addClass("nzo_highlight");
else
$(e.target).parent().parent().removeClass("nzo_highlight");
});
// set highlighted property for checked rows upon reload
$('#config_content .nzoTable .nzf_row input:checked').parent().parent().addClass("nzo_highlight");
return; // skip the rest of the config methods
break;
case 'Status':
$('#logging_level').change(function(event){
window.location = './change_loglevel?loglevel='+$(event.target).val()+'&apikey='+apikey;
});
break;
case 'General':
$('#apikey').click(function(){ $('#apikey').select() });
$('#generate_new_apikey').click(function(){
if (confirm($(this).attr('rel'))) {
$.ajax({
type: "POST",
url: "../../api",
data: {mode:'config', name:'set_apikey', apikey: $('#apikey').val()},
success: function(msg){
$('#apikey,#session').val(msg);
window.location.reload();
}
});
}
});
$('#generate_new_nzbkey').click(function(){
if (confirm($(this).attr('rel'))) {
$.ajax({
type: "POST",
url: "../../api",
data: {mode:'config', name:'set_nzbkey', apikey: $('#apikey').val()},
success: function(msg){
$('#nzbkey,#session').val(msg);
window.location.reload();
}
});
}
});
$('#sabnzbd_restart').click(function(){
return confirm($(this).attr('rel'));
});
break;
case 'Servers':
$('form .testServer').click(function(event){ // test server
$(event.target).next('span').addClass('loading');
$.ajax({
type: "POST",
url: "../../api",
data: "mode=config&name=test_server&"+ $(event.target).parents('form:first').serialize() +"&apikey="+$('#apikey').val(),
success: function(msg){
alert(msg);
$(event.target).next('span').removeClass('loading');
}
});
});
$('form .delServer').click(function(event){ // delete server
if(confirm($(event.target).attr('rel')))
$(event.target).parents('form:first').attr('action','delServer').submit();
return false;
});
$('form .clrServer').click(function(event){ // clear server
if(confirm($(event.target).attr('rel')))
$(event.target).parents('form:first').attr('action','clrServer').submit();
return false;
});
break;
case 'Categories':
$(':button').click(function(event){ // delete category
window.location="delete/?name="+$(event.target).attr('name')+'&apikey='+apikey;
});
break;
case 'RSS':
$('.toggleFeedCheckbox').click(function(){ // enable/disable feed
window.onbeforeunload = null; // lose data?
this.form.action='toggle_rss_feed?apikey=$apikey';
this.form.submit();
return false;
});
$('.rssOrderSelect').change(function(){ // change filter order
window.onbeforeunload = null; // lose data?
location = this.options[this.selectedIndex].value;
});
break;
case 'Email':
$('#test_email').click(function(){
return confirm($('#test_email').attr('rel'));
});
break;
case 'Index Sites':
$('#getBookmarks').click(function(){ window.location='getBookmarks?apikey='+apikey; });
$('#hideBookmarks').click(function(){ window.location='hideBookmarks?apikey='+apikey; });
$('#showBookmarks').click(function(){ window.location='showBookmarks?apikey='+apikey; });
break;
case 'Sorting':
previewtv(); previewmovie(); previewdate(); // display sorting previews -- these functions are defined below
break;
};
// page's save button for those pages that use it
$('#save').click(function(){
window.onbeforeunload = null;
$('form').submit();
});
}); // end Plush code

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

Some files were not shown because too many files have changed in this diff Show More