Compare commits

..

258 Commits
3.2.x ... 3.3.1

Author SHA1 Message Date
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
puzzledsab
906e1eda89 Keep password order 2021-06-13 16:21:41 +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
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
77cdd057a4 Filenames should end after the extension 2021-06-01 11:19:49 +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
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
1fed37f9da Notify users that Plush will be removed in 3.4.0
Relates to #1902
2021-05-25 09:28:10 +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
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
puzzledsab
19950569cb Show server expiration date in server summary (#1841) 2021-03-29 20:26:20 +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
aa75828296 Add title for long Config Server names 2021-03-21 16:56:21 +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
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
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
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
9e73f9b5e0 Update macOS build Python to 3.9.2 2021-02-26 09:44:24 +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
SABnzbd Automation
4af51b4a76 Update translatable texts 2021-02-08 12:24:13 +00: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
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
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
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
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
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
Safihre
2472ab0121 Python 3.5 does not know ssl.PROTOCOL_TLS_SERVER
Closes #1658
2020-10-27 15:52:28 +01:00
Safihre
00421717b8 Queue Repair would fail if Rating is enabled
Closes #1649
2020-10-24 11:10:03 +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
217785bf0f Applying Filters to a feed would result in crash
Closes #1634
2020-10-15 18:07:06 +02:00
Safihre
6aef50dc5d Update text files for 3.1.0RC3 2020-10-02 11:34:21 +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
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
fb4b57e056 Update text files for 3.1.0RC2 2020-09-27 17:19:34 +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
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
46ff7dd4e2 Do not crash if we can't save attributes, the job might be gone 2020-09-25 10:03:05 +02:00
Safihre
8b067df914 Correctly parse failed_only for Plush 2020-09-23 16:56:57 +02: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
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
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
19c6a4fffa Propagation delay label was shown even if no delay was activated 2020-08-29 16:46:16 +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
e674abc5c0 Update text files for 3.0.2RC2 2020-08-26 08:56:29 +02:00
Safihre
f965c96f51 Change the macOS power assertion to NoIdleSleep 2020-08-26 08:50:54 +02:00
Safihre
c76b8ed9e0 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:14 +02:00
Safihre
4fbd0d8a7b Check if name is a string before switching to nzbfile in addfile
Closes #1584
2020-08-24 09:05:25 +02:00
Safihre
2186c0fff6 Update text files for 3.0.2 RC 1 2020-08-21 15:42:35 +02:00
Safihre
1adca9a9c1 Do not crash if certifi certificates are not available
This could happen on Windows, due to overactive virus scanners
2020-08-21 15:26:06 +02:00
Safihre
9408353f2b Priority was not parsed correctly if supplied as string 2020-08-21 15:12:09 +02:00
Safihre
84f4d453d2 Permissions would be set even if user didn't set any
Windows developers like me shouldn't do permissions stuff..
2020-08-21 15:12:01 +02:00
Safihre
d10209f2a1 Extend tests of create_all_dirs to cover apply_umask=False 2020-08-21 15:11:53 +02:00
Safihre
3ae149c72f Split the make_mo.py command for NSIS 2020-08-19 22:21:02 +02:00
Safihre
47385acc3b Make sure we force the final_name to string on legacy get_attrib_file 2020-08-19 16:21:13 +02:00
Safihre
814eeaa900 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-19 16:21:07 +02:00
Safihre
5f2ea13aad NzbFile comparison could crash when comparing finished_files
https://forums.sabnzbd.org/viewtopic.php?f=3&t=24902&p=121748
2020-08-19 08:50:06 +02:00
Safihre
41ca217931 Merge branch '3.0.x' 2020-08-18 11:05:50 +02:00
Safihre
b57d36e8dd Set version information to 3.0.1 2020-08-18 11:05:36 +02:00
Safihre
9a4be70734 List Cheetah minimal version in requirements.txt 2020-08-18 08:21:20 +02:00
Safihre
a8443595a6 Generalize use of certifi module 2020-08-18 08:20:47 +02:00
Safihre
fd0a70ac58 Update text files for 3.0.1 2020-08-17 16:52:23 +02:00
Safihre
8a8685c968 Permissions should only be applied if requested
Corrects 050b925f7b
2020-08-16 18:28:39 +02:00
Safihre
9e6cb8da8e Temporarily set cheroot version due to it breaking our tests
cherrypy/cheroot/issues/312
2020-08-16 18:28:13 +02:00
Safihre
054ec54d51 Basic authentication option was broken
Closes #1571
2020-08-10 15:34:01 +02:00
Safihre
272ce773cb Update text files for 3.0.1RC1 2020-08-07 15:28:11 +02:00
Safihre
050b925f7b Permissions were not set correctly when creating directories (#1568)
Restores changes made in d2e0ebe
2020-08-07 15:22:53 +02:00
Safihre
0087940898 Merge branch '3.0.x' into master 2020-08-02 09:46:41 +02:00
Safihre
e323c014f9 Set version information to 3.0.0 2020-08-01 16:17:08 +02:00
Safihre
cc465c7554 Update text files for 3.0.0
🎉🎉
2020-08-01 15:59:30 +02:00
Safihre
14cb37564f Update translate-link in SABnzbd 2020-07-19 13:01:39 +02:00
Safihre
094db56c3b Default-text for Automatically sort queue 2020-07-16 22:29:02 +02:00
Safihre
aabb709b8b Update text files for 3.0.0 RC 2 2020-07-15 14:10:35 +02:00
Safihre
0833dd2db9 Update translatable texts in 3.0.x branch 2020-07-15 14:07:21 +02:00
Safihre
cd3f912be4 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:01:48 +02:00
Safihre
665c516db6 Only really run pre-script when it is set 2020-07-12 14:20:18 +02:00
Safihre
b670da9fa0 Always use Default-priority when creating NZB-objects
Closes #1552
2020-07-12 14:03:07 +02:00
Safihre
80bee9bffe Search-icon would be shown on top of drop-downs
Closes #1545
2020-06-30 12:57:28 +02:00
Safihre
d85a70e8ad Always report API paused status as a boolean
Closes #1542
2020-06-30 10:26:34 +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
164 changed files with 3810 additions and 2222 deletions

View File

@@ -19,3 +19,4 @@ jobs:
--line-length=120
--target-version=py36
--check
--diff

View File

@@ -59,7 +59,7 @@ jobs:
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/')
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python builder/package.py release
build_macos:
@@ -73,7 +73,7 @@ jobs:
# 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.2
PYTHON_VERSION: 3.9.5
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- uses: actions/checkout@v2
@@ -110,5 +110,5 @@ jobs:
path: "*-osx.dmg"
name: macOS binary (not notarized)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && !startsWith(github.ref, 'refs/tags/')
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python3 builder/package.py release

View File

@@ -24,6 +24,9 @@ jobs:
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:

View File

@@ -1,4 +1,4 @@
SABnzbd 3.2.0
SABnzbd 3.3.0
-------------------------------------------------------------------------------
0) LICENSE

View File

@@ -14,13 +14,13 @@
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.2/special
See: https://sabnzbd.org/wiki/configuration/3.3/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.2/special
See: https://sabnzbd.org/wiki/configuration/3.3/special
- On macOS you may encounter downloaded files with foreign characters.
The par2 repair may fail when the files were created on a Windows system.

View File

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

View File

@@ -1,85 +1,55 @@
Release Notes - SABnzbd 3.2.1
Release Notes - SABnzbd 3.3.1
=========================================================
## Changes and bugfixes since 3.2.0
- Single `Indexer Categories` in Categories were broken.
- Program would fail to start if Quota was previously exceeded.
- Setting `Automatically sort queue` by `Age` was inverted.
- Show the name of the item to be deleted from the Queue/History
in the confirmation dialog.
- Handle directories in `.par2`-files during Quick-check.
- Do not discard data for articles with CRC-errors.
- Improvements to `Deobfuscate final filenames`:
Rename accompanying (smaller) files with the same basename.
Do not rename collections of the same extension.
- Sanitize names possibly derived from `X-DNZB-EpisodeName`.
- Widened the RSS feeds table.
- Show server expiration date in server summary.
- Improvements to the encrypted RAR-detection.
- Add traceback-logging when failing to read the password file.
- Windows: Use binary mode to make the write test more accurate.
## Changes and bugfixes since 3.3.0
- Include wiki URL in `External internet access denied` message.
https://sabnzbd.org/access-denied
- Open the desired tab directly by URL in Glitter tabbed-mode.
- Some filenames could be missed when parsing the NZB file.
- API-call `history` would not filter active post-processing by `nzo_ids`.
- Passwords for encrypted jobs were tried in a random order.
- Clean invalid data from download statistics.
## Changes since 3.1.1
- Python 3.6 is the minimum required version.
- The Windows installer can only be used on 64bit Windows 8.1 and
above. For 32bit systems or older Windows versions, the
standalone 32bit legacy version can be used.
- Post-processing can be aborted at any stage, including scripts.
- Improvements in the downloader to reduce CPU-load.
- Increased garbage collection rate to reduce memory usage.
- Custom date ranges for server graphs can be selected.
- Keep track of article fetching success-rate of each server.
- Added option to add download quota warning for each server.
- Added option to add expiration warning for each server.
- Added `Minimum Free Space for Completed Download Folder` option.
- Added option to `Auto resume` for both `Minimum Free Space` settings.
- Added `Auto` option for Glitter that enables `Night` style
based on system settings. Default for new installations.
- Multiple additional Queue and History columns can be added.
- Added option to always use full-screen width.
- Additional interface settings can be stored server-side.
- Right-to-Left support (Hebrew) for Glitter and Config.
- Using SSDP, SABnzbd instances are now listed in `Network` on Windows.
- Improvements to parsing of job name and filenames listed in the NZB.
- RSS titles can be edited.
- Prospective par2 will add blocks from all sets in a job.
- Sanitize all filenames to a maximum of 245 characters.
- Show commit hash when running from `git` sources.
- Notify through Notifications if a new version is available.
- Program shutdown time reduced to almost instant.
- Added `10 GB` test download.
- IPv6 is no longer preferred in HappyEyeballs address selection.
- API-calls `queue` and `history` can now be filtered by `nzo_id`.
- Windows: `Temporary Download` job folders no longer have a maximum length.
- Windows/macOS: Update UnRar to 6.0.0 and MultiPar to 1.3.1.3.
## Changes since 3.2.1
- The `External internet access` will automatically detect local network
and no longer requires local network ranges to be defined. Custom ranges
can still be defined through `local_ranges` in Special settings.
- Allow setting `inet_exposure` from the command line.
- Support prefix and netmask for Special setting `local_ranges`.
- The `Unwanted extensions` detection can be set to `Whitelist`-mode.
This will block or pause all jobs with non-matching extensions.
- Servers article statistics are shown in K, G, M-notation.
- Resolution added as a pattern key (`%r`) for Sorting.
- Optimized performance of par2 file parsing.
- CPU usage optimizations in the download process.
- Revised handling of categories, scripts, and priorities when adding NZB's.
- Download statistics are also shown when no History is shown.
- Confirm rename if Direct Unpack is active for the job.
- Obfuscated-RAR detection will always be performed.
- All requests will be logged, not just API calls.
- Stability improvement to encrypted RAR-detection.
- Allow missing extensions in `Unwanted extensions` detection.
- Removed Special setting `max_art_opt`.
- Add notification that Plush will be removed in 3.4.0.
- Windows/macOS: Update UnRar to 6.0.1.
- Windows: Update Multipar to 1.3.1.7 (adds faster verification).
## Bugfixes since 3.1.1
- Memory could leak after jobs were removed from the queue.
- The active browser URL is used during the wizard.
- Repairing or Retrying jobs could result in a crash.
- API-call `reset_quota` returned nothing.
- New categories were not always forced to lowercase.
- Broken downloads could result in a crash during RAR-renaming
- Improved obfuscation detection for `Deobfuscate final filenames`.
- Keep original priority of duplicate jobs.
- Increase the maximum number of connections per server to `1000`.
- Update encryption check to handle partially assembled files.
- Don't activate Windows notifications when running as a service.
- Command-line option `--console` did not work.
- Crash in API-call to delete history items for nonexistent `nzo_id`.
- Prevent repetition of unwanted extension warnings.
- Correct notification category for failed URL fetches.
- Improvements to the `Add NZB` modal window.
- Sort script drop-down list alphabetically.
- Default Bandwidth percentage was not set to `100`.
- Direct Unpack stability fixes.
- macOS: Program shutdown could fail.
- macOS: Tray text was misaligned on macOS 11 (Big Sur).
- Windows: Improved handling of some MultiPar output.
- Windows: Program restart failed.
## Bugfixes since 3.2.1
- Prevent failed post-processing if job name ends in multiple dots or spaces.
- Failing articles could result in jobs being stuck at 99%.
- Jobs could be stuck in the queue or duplicate if they had missing articles.
- Prevent jobs getting stuck at 99% due to unreliable servers.
- CRC/yEnc errors would be counted twice as bad articles.
- Some NZB files would incorrectly be marked as empty.
- API-call `history` would not filter active post-processing by `nzo_ids`.
- Login page could be accessed even if `External internet access` was set
to `No access`. Any other calls would still be blocked.
- Ignore duplicate files inside messy NZB's.
- Windows: `Deobfuscate final filenames` could fail to deobfuscate.
- macOS: Disk space would be incorrect for very large disks.
## Upgrade notices
- The download statistics file `totals10.sab` is updated in this
- The download statistics file `totals10.sab` is updated in 3.2.x
version. If you downgrade to 3.1.x or lower, detailed download
statistics will be lost.

View File

@@ -62,7 +62,6 @@ from sabnzbd.misc import (
exit_sab,
split_host,
create_https_certificates,
windows_variant,
ip_extract,
set_serv_parms,
get_serv_parms,
@@ -79,6 +78,7 @@ import sabnzbd.downloader
import sabnzbd.notifier as notifier
import sabnzbd.zconfig
from sabnzbd.getipaddress import localipv4, publicipv4, ipv6
from sabnzbd.utils.getperformance import getpystone, getcpu
import sabnzbd.utils.ssdp as ssdp
try:
@@ -89,9 +89,13 @@ try:
import win32service
import win32ts
import pywintypes
import servicemanager
from win32com.shell import shell, shellcon
from sabnzbd.utils.apireg import get_connection_info, set_connection_info, del_connection_info
import sabnzbd.sabtray
win32api.SetConsoleCtrlHandler(sabnzbd.sig_handler, True)
from sabnzbd.utils.apireg import get_connection_info, set_connection_info, del_connection_info
except ImportError:
if sabnzbd.WIN32:
print("Sorry, requires Python module PyWin32.")
@@ -102,13 +106,13 @@ LOG_FLAG = False
def guard_loglevel():
""" Callback function for guarding loglevel """
"""Callback function for guarding loglevel"""
global LOG_FLAG
LOG_FLAG = True
def warning_helpful(*args, **kwargs):
""" Wrapper to ignore helpfull warnings if desired """
"""Wrapper to ignore helpfull warnings if desired"""
if sabnzbd.cfg.helpfull_warnings():
return logging.warning(*args, **kwargs)
return logging.info(*args, **kwargs)
@@ -123,13 +127,13 @@ class GUIHandler(logging.Handler):
"""
def __init__(self, size):
""" Initializes the handler """
"""Initializes the handler"""
logging.Handler.__init__(self)
self._size: int = size
self.store: List[Dict[str, Any]] = []
def emit(self, record: logging.LogRecord):
""" Emit a record by adding it to our private queue """
"""Emit a record by adding it to our private queue"""
# If % is part of the msg, this could fail
try:
parsed_msg = record.msg % record.args
@@ -171,7 +175,7 @@ class GUIHandler(logging.Handler):
return len(self.store)
def content(self):
""" Return an array with last records """
"""Return an array with last records"""
return self.store
@@ -182,35 +186,36 @@ def print_help():
print("Options marked [*] are stored in the config file")
print()
print("Options:")
print(" -f --config-file <ini> Location of config file")
print(" -s --server <srv:port> Listen on server:port [*]")
print(" -t --templates <templ> Template directory [*]")
print(" -f --config-file <ini> Location of config file")
print(" -s --server <srv:port> Listen on server:port [*]")
print(" -t --templates <templ> Template directory [*]")
print()
print(" -l --logging <-1..2> Set logging level (-1=off, 0= least, 2= most) [*]")
print(" -w --weblogging Enable cherrypy access logging")
print(" -l --logging <-1..2> Set logging level (-1=off, 0=least,2= most) [*]")
print(" -w --weblogging Enable cherrypy access logging")
print()
print(" -b --browser <0..1> Auto browser launch (0= off, 1= on) [*]")
print(" -b --browser <0..1> Auto browser launch (0= off, 1= on) [*]")
if sabnzbd.WIN32:
print(" -d --daemon Use when run as a service")
print(" -d --daemon Use when run as a service")
else:
print(" -d --daemon Fork daemon process")
print(" --pid <path> Create a PID file in the given folder (full path)")
print(" --pidfile <path> Create a PID file with the given name (full path)")
print(" -d --daemon Fork daemon process")
print(" --pid <path> Create a PID file in the given folder (full path)")
print(" --pidfile <path> Create a PID file with the given name (full path)")
print()
print(" -h --help Print this message")
print(" -v --version Print version information")
print(" -c --clean Remove queue, cache and logs")
print(" -p --pause Start in paused mode")
print(" --repair Add orphaned jobs from the incomplete folder to the queue")
print(" --repair-all Try to reconstruct the queue from the incomplete folder")
print(" with full data reconstruction")
print(" --https <port> Port to use for HTTPS server")
print(" --ipv6_hosting <0|1> Listen on IPv6 address [::1] [*]")
print(" --no-login Start with username and password reset")
print(" --log-all Log all article handling (for developers)")
print(" --disable-file-log Logging is only written to console")
print(" --console Force logging to console")
print(" --new Run a new instance of SABnzbd")
print(" -h --help Print this message")
print(" -v --version Print version information")
print(" -c --clean Remove queue, cache and logs")
print(" -p --pause Start in paused mode")
print(" --repair Add orphaned jobs from the incomplete folder to the queue")
print(" --repair-all Try to reconstruct the queue from the incomplete folder")
print(" with full data reconstruction")
print(" --https <port> Port to use for HTTPS server")
print(" --ipv6_hosting <0|1> Listen on IPv6 address [::1] [*]")
print(" --inet_exposure <0..5> Set external internet access [*]")
print(" --no-login Start with username and password reset")
print(" --log-all Log all article handling (for developers)")
print(" --disable-file-log Logging is only written to console")
print(" --console Force logging to console")
print(" --new Run a new instance of SABnzbd")
print()
print("NZB (or related) file:")
print(" NZB or compressed NZB file, with extension .nzb, .zip, .rar, .7z, .gz, or .bz2")
@@ -236,7 +241,7 @@ GNU GENERAL PUBLIC LICENSE Version 2 or (at your option) any later version.
def daemonize():
""" Daemonize the process, based on various StackOverflow answers """
"""Daemonize the process, based on various StackOverflow answers"""
try:
pid = os.fork()
if pid > 0:
@@ -278,7 +283,7 @@ def daemonize():
def abort_and_show_error(browserhost, cherryport, err=""):
""" Abort program because of CherryPy troubles """
"""Abort program because of CherryPy troubles"""
logging.error(T("Failed to start web-interface") + " : " + str(err))
if not sabnzbd.DAEMON:
if "49" in err:
@@ -290,7 +295,7 @@ def abort_and_show_error(browserhost, cherryport, err=""):
def identify_web_template(key, defweb, wdir):
""" Determine a correct web template set, return full template path """
"""Determine a correct web template set, return full template path"""
if wdir is None:
try:
wdir = fix_webname(key())
@@ -321,7 +326,7 @@ def identify_web_template(key, defweb, wdir):
def check_template_scheme(color, web_dir):
""" Check existence of color-scheme """
"""Check existence of color-scheme"""
if color and os.path.exists(os.path.join(web_dir, "static", "stylesheets", "colorschemes", color + ".css")):
return color
elif color and os.path.exists(os.path.join(web_dir, "static", "stylesheets", "colorschemes", color)):
@@ -347,8 +352,8 @@ def fix_webname(name):
return name
def get_user_profile_paths(vista_plus):
""" Get the default data locations on Windows"""
def get_user_profile_paths():
"""Get the default data locations on Windows"""
if sabnzbd.DAEMON:
# In daemon mode, do not try to access the user profile
# just assume that everything defaults to the program dir
@@ -363,22 +368,15 @@ def get_user_profile_paths(vista_plus):
return
elif sabnzbd.WIN32:
try:
from win32com.shell import shell, shellcon
path = shell.SHGetFolderPath(0, shellcon.CSIDL_LOCAL_APPDATA, None, 0)
sabnzbd.DIR_LCLDATA = os.path.join(path, DEF_WORKDIR)
sabnzbd.DIR_HOME = os.environ["USERPROFILE"]
except:
try:
if vista_plus:
root = os.environ["AppData"]
user = os.environ["USERPROFILE"]
sabnzbd.DIR_LCLDATA = "%s\\%s" % (root.replace("\\Roaming", "\\Local"), DEF_WORKDIR)
sabnzbd.DIR_HOME = user
else:
root = os.environ["USERPROFILE"]
sabnzbd.DIR_LCLDATA = "%s\\%s" % (root, DEF_WORKDIR)
sabnzbd.DIR_HOME = root
root = os.environ["AppData"]
user = os.environ["USERPROFILE"]
sabnzbd.DIR_LCLDATA = "%s\\%s" % (root.replace("\\Roaming", "\\Local"), DEF_WORKDIR)
sabnzbd.DIR_HOME = user
except:
pass
@@ -407,7 +405,7 @@ def get_user_profile_paths(vista_plus):
def print_modules():
""" Log all detected optional or external modules """
"""Log all detected optional or external modules"""
if sabnzbd.decoder.SABYENC_ENABLED:
# Yes, we have SABYenc, and it's the correct version, so it's enabled
logging.info("SABYenc module (v%s)... found!", sabnzbd.decoder.SABYENC_VERSION)
@@ -484,7 +482,7 @@ def print_modules():
def all_localhosts():
""" Return all unique values of localhost in order of preference """
"""Return all unique values of localhost in order of preference"""
ips = ["127.0.0.1"]
try:
# Check whether IPv6 is available and enabled
@@ -512,7 +510,7 @@ def all_localhosts():
def check_resolve(host):
""" Return True if 'host' resolves """
"""Return True if 'host' resolves"""
try:
socket.getaddrinfo(host, None)
except socket.error:
@@ -600,7 +598,7 @@ def get_webhost(cherryhost, cherryport, https_port):
browserhost = localhost
else:
# If on Vista and/or APIPA, use numerical IP, to help FireFoxers
# If on APIPA, use numerical IP, to help FireFoxers
if ipv6 and ipv4:
cherryhost = hostip
browserhost = cherryhost
@@ -655,7 +653,7 @@ def get_webhost(cherryhost, cherryport, https_port):
def attach_server(host, port, cert=None, key=None, chain=None):
""" Define and attach server, optionally HTTPS """
"""Define and attach server, optionally HTTPS"""
if sabnzbd.cfg.ipv6_hosting() or "::1" not in host:
http_server = cherrypy._cpserver.Server()
http_server.bind_addr = (host, port)
@@ -668,7 +666,7 @@ def attach_server(host, port, cert=None, key=None, chain=None):
def is_sabnzbd_running(url):
""" Return True when there's already a SABnzbd instance running. """
"""Return True when there's already a SABnzbd instance running."""
try:
url = "%s&mode=version" % url
# Do this without certificate verification, few installations will have that
@@ -681,7 +679,7 @@ def is_sabnzbd_running(url):
def find_free_port(host, currentport):
""" Return a free port, 0 when nothing is free """
"""Return a free port, 0 when nothing is free"""
n = 0
while n < 10 and currentport <= 49151:
try:
@@ -778,10 +776,9 @@ def commandline_handler():
"server=",
"templates",
"ipv6_hosting=",
"template2",
"inet_exposure=",
"browser=",
"config-file=",
"force",
"disable-file-log",
"version",
"https=",
@@ -835,7 +832,7 @@ def commandline_handler():
def get_f_option(opts):
""" Return value of the -f option """
"""Return value of the -f option"""
for opt, arg in opts:
if opt == "-f":
return arg
@@ -863,8 +860,6 @@ def main():
console_logging = False
no_file_log = False
web_dir = None
vista_plus = False
win64 = False
repair = 0
no_login = False
sabnzbd.RESTART_ARGS = [sys.argv[0]]
@@ -872,6 +867,7 @@ def main():
pid_file = None
new_instance = False
ipv6_hosting = None
inet_exposure = None
_service, sab_opts, _serv_opts, upload_nzbs = commandline_handler()
@@ -951,6 +947,8 @@ def main():
new_instance = True
elif opt == "--ipv6_hosting":
ipv6_hosting = arg
elif opt == "--inet_exposure":
inet_exposure = arg
sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME))
sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME)
@@ -977,17 +975,18 @@ def main():
logger.setLevel(logging.WARNING)
logger.addHandler(gui_log)
# Detect Windows variant
# Detect CPU architecture and Windows variant
# Use .machine as .processor is not always filled
cpu_architecture = platform.uname().machine
if sabnzbd.WIN32:
vista_plus, win64 = windows_variant()
sabnzbd.WIN64 = win64
sabnzbd.WIN64 = cpu_architecture == "AMD64"
if inifile:
# INI file given, simplest case
inifile = evaluate_inipath(inifile)
else:
# No ini file given, need profile data
get_user_profile_paths(vista_plus)
get_user_profile_paths()
# Find out where INI file is
inifile = os.path.abspath(os.path.join(sabnzbd.DIR_LCLDATA, DEF_INI_FILE))
@@ -1169,24 +1168,19 @@ def main():
).strip()
except:
pass
logging.info("Commit: %s", sabnzbd.__baseline__)
logging.info("Commit = %s", sabnzbd.__baseline__)
logging.info("Full executable path = %s", sabnzbd.MY_FULLNAME)
if sabnzbd.WIN32:
suffix = ""
if win64:
suffix = "(win64)"
try:
logging.info("Platform = %s %s", platform.platform(), suffix)
except:
logging.info("Platform = %s <unknown>", suffix)
else:
logging.info("Platform = %s", os.name)
logging.info("Python-version = %s", sys.version)
logging.info("Arguments = %s", sabnzbd.CMDLINE)
if sabnzbd.DOCKER:
logging.info("Running inside a docker container")
else:
logging.info("Not inside a docker container")
logging.info("Python-version = %s", sys.version)
logging.info("Dockerized = %s", sabnzbd.DOCKER)
logging.info("CPU architecture = %s", cpu_architecture)
try:
logging.info("Platform = %s - %s", os.name, platform.platform())
except:
# Can fail on special platforms (like Snapcraft or embedded)
pass
# Find encoding; relevant for external processing activities
logging.info("Preferred encoding = %s", sabnzbd.encoding.CODEPAGE)
@@ -1210,8 +1204,8 @@ def main():
try:
os.environ["SSL_CERT_FILE"] = certifi.where()
logging.info("Certifi version: %s", certifi.__version__)
logging.info("Loaded additional certificates from: %s", os.environ["SSL_CERT_FILE"])
logging.info("Certifi version = %s", certifi.__version__)
logging.info("Loaded additional certificates from %s", os.environ["SSL_CERT_FILE"])
except:
# Sometimes the certificate file is blocked
logging.warning(T("Could not load additional certificates from certifi package"))
@@ -1220,38 +1214,16 @@ def main():
# Extra startup info
if sabnzbd.cfg.log_level() > 1:
# List the number of certificates available (can take up to 1.5 seconds)
ctx = ssl.create_default_context()
logging.debug("Available certificates: %s", repr(ctx.cert_store_stats()))
logging.debug("Available certificates = %s", repr(ssl.create_default_context().cert_store_stats()))
mylocalipv4 = localipv4()
if mylocalipv4:
logging.debug("My local IPv4 address = %s", mylocalipv4)
else:
logging.debug("Could not determine my local IPv4 address")
mypublicipv4 = publicipv4()
if mypublicipv4:
logging.debug("My public IPv4 address = %s", mypublicipv4)
else:
logging.debug("Could not determine my public IPv4 address")
myipv6 = ipv6()
if myipv6:
logging.debug("My IPv6 address = %s", myipv6)
else:
logging.debug("Could not determine my IPv6 address")
# List networking
logging.debug("Local IPv4 address = %s", localipv4())
logging.debug("Public IPv4 address = %s", publicipv4())
logging.debug("IPv6 address = %s", ipv6())
# Measure and log system performance measured by pystone and - if possible - CPU model
from sabnzbd.utils.getperformance import getpystone, getcpu
pystoneperf = getpystone()
if pystoneperf:
logging.debug("CPU Pystone available performance = %s", pystoneperf)
else:
logging.debug("CPU Pystone available performance could not be calculated")
cpumodel = getcpu() # Linux only
if cpumodel:
logging.debug("CPU model = %s", cpumodel)
logging.debug("CPU Pystone available performance = %s", getpystone())
logging.debug("CPU model = %s", getcpu())
logging.info("Using INI file %s", inifile)
@@ -1272,8 +1244,6 @@ def main():
# Handle the several tray icons
if sabnzbd.cfg.win_menu() and not sabnzbd.DAEMON and not sabnzbd.WIN_SERVICE:
if sabnzbd.WIN32:
import sabnzbd.sabtray
sabnzbd.WINTRAY = sabnzbd.sabtray.SABTrayThread()
elif sabnzbd.LINUX_POWER and os.environ.get("DISPLAY"):
try:
@@ -1362,6 +1332,10 @@ def main():
sabnzbd.cfg.username.set("")
sabnzbd.cfg.password.set("")
# Overwrite inet_exposure from command-line for VPS-setups
if inet_exposure:
sabnzbd.cfg.inet_exposure.set(inet_exposure)
mime_gzip = (
"text/*",
"application/javascript",
@@ -1632,10 +1606,9 @@ def main():
if sabnzbd.WIN32:
import servicemanager
class SABnzbd(win32serviceutil.ServiceFramework):
""" Win32 Service Handler """
"""Win32 Service Handler"""
_svc_name_ = "SABnzbd"
_svc_display_name_ = "SABnzbd Binary Newsreader"
@@ -1699,7 +1672,7 @@ def handle_windows_service():
Returns True when any service commands were detected or
when we have started as a service.
"""
# Detect if running as Windows Service (only Vista and above!)
# Detect if running as Windows Service
# Adapted from https://stackoverflow.com/a/55248281/5235502
# Only works when run from the exe-files
if hasattr(sys, "frozen") and win32ts.ProcessIdToSessionId(win32api.GetCurrentProcessId()) == 0:

View File

@@ -71,14 +71,14 @@ def safe_remove(path):
def delete_files_glob(name):
""" Delete one file or set of files from wild-card spec """
"""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 """
"""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()
@@ -90,7 +90,7 @@ def run_external_command(command):
def run_git_command(parms):
""" Run git command, raise error if it failed """
"""Run git command, raise error if it failed"""
return run_external_command(["git"] + parms)
@@ -148,7 +148,7 @@ if __name__ == "__main__":
patch_version_file(RELEASE_VERSION)
# To draft a release or not to draft a release?
RELEASE_THIS = "draft release" in run_git_command(["log", "-1", "--pretty=format:%b"])
RELEASE_THIS = "refs/tags/" in os.environ.get("GITHUB_REF", "")
# Rename release notes file
safe_remove("README.txt")
@@ -339,7 +339,7 @@ if __name__ == "__main__":
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, add 'draft release' to the commit message trigger notarization!")
print("Notarization skipped, tag commit to trigger notarization!")
else:
print("Notarization skipped, NOTARIZATION_USER or NOTARIZATION_PASS missing.")
else:
@@ -461,6 +461,23 @@ if __name__ == "__main__":
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
@@ -542,7 +559,7 @@ if __name__ == "__main__":
head=RELEASE_VERSION,
)
else:
print("To push release to GitHub, add 'draft release' to the commit message.")
print("To push release to GitHub, first tag the commit.")
print("Or missing the AUTOMATION_GITHUB_TOKEN, cannot push to GitHub without it.")
# Reset!

View File

@@ -1,5 +1,5 @@
# Basic build requirements
pyinstaller
pyinstaller==4.2
setuptools
pkginfo
certifi

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Config"#-->
<!--#set global $help_uri="configuration/3.2/configure"#-->
<!--#set global $help_uri="configuration/3.3/configure"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#from sabnzbd.encoding import CODEPAGE#-->

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Categories"#-->
<!--#set global $help_uri="configuration/3.2/categories"#-->
<!--#set global $help_uri="configuration/3.3/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.2/folders"#-->
<!--#set global $help_uri="configuration/3.3/folders"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="General"#-->
<!--#set global $help_uri="configuration/3.2/general"#-->
<!--#set global $help_uri="configuration/3.3/general"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -131,12 +131,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>
@@ -260,17 +255,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
}

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Email"#-->
<!--#set global $help_uri="configuration/3.2/notifications"#-->
<!--#set global $help_uri="configuration/3.3/notifications"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#def show_notify_checkboxes($section_label)#-->

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="RSS"#-->
<!--#set global $help_uri="configuration/3.2/rss"#-->
<!--#set global $help_uri="configuration/3.3/rss"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import html#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Scheduling"#-->
<!--#set global $help_uri="configuration/3.2/scheduling"#-->
<!--#set global $help_uri="configuration/3.3/scheduling"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<%

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Servers"#-->
<!--#set global $help_uri="configuration/3.2/servers"#-->
<!--#set global $help_uri="configuration/3.3/servers"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import json#-->
@@ -144,7 +144,7 @@
<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 #-->
@@ -388,7 +388,8 @@
// If values were missing
if(!isNaN(articleRatio)) {
\$('#server-article-value-' + server_id).text('$T("srv-articles-tried")'.replace('%f', articleRatio).replace('%d', totalArticlesTriedThisRange))
// 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")')
}

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Sorting"#-->
<!--#set global $help_uri="configuration/3.2/sorting"#-->
<!--#set global $help_uri="configuration/3.3/sorting"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -130,6 +130,11 @@
<td>%e_n</td>
<td>$T('ep-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('fileExt'):</b></td>
<td>%ext</td>
@@ -245,6 +250,11 @@
<td>%y</td>
<td>2009</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('extension'):</b></td>
<td>%ext</td>
@@ -407,6 +417,11 @@
<td>%0decade</td>
<td>2000</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('orgFilename'):</b></td>
<td>%fn</td>

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Special"#-->
<!--#set global $help_uri="configuration/3.2/special"#-->
<!--#set global $help_uri="configuration/3.3/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.2/switches"#-->
<!--#set global $help_uri="configuration/3.3/switches"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -120,6 +120,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>

View File

@@ -162,7 +162,6 @@ input[type="checkbox"]+.desc {
float: none;
overflow: hidden;
min-width: 555px;
position: relative;
}
.Key tr:nth-child(odd),
.tab-pane tr:nth-child(odd),
@@ -1104,6 +1103,10 @@ input[type="checkbox"] {
font-size: 1.2em;
}
.host-warning-highlight {
border-color: #F0AD4E !important;
}
.fileBrowser .glyphicon {
margin-right: 2px;
top: 1px;
@@ -1194,6 +1197,10 @@ 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;

View File

@@ -264,13 +264,13 @@ function do_restart() {
$.ajax({ url: '../../config/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

@@ -224,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

@@ -86,34 +86,34 @@
<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>
@@ -122,7 +122,7 @@
<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>
@@ -131,7 +131,7 @@
<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>
@@ -140,7 +140,7 @@
<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>
@@ -149,7 +149,7 @@
<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> 1 GB</a>

View File

@@ -109,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() }">

View File

@@ -52,7 +52,7 @@
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')"
@@ -60,8 +60,9 @@
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.deleteMsg = "$T('nzo-delete')";
glitterTranslate.removeDown = "$T('Glitter-confirmClearDownloads')";
glitterTranslate.removeDow1 = "$T('Glitter-confirmClear1Download')";
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

@@ -1014,6 +1014,11 @@ function ViewModel() {
$('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
**/
@@ -1087,6 +1092,11 @@ function ViewModel() {
// 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

View File

@@ -652,6 +652,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',

View File

@@ -103,7 +103,7 @@
<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#
This skin is no longer actively maintained! <a href="${path}config/general/#web_dir"><strong>We recommend using the Glitter skin.</strong></a>
<a href="${path}config/general/#web_dir"><strong style="color: red">This skin will be removed in SABnzbd 3.4.0! <br>We recommend using the Glitter skin.</strong></a>
#end if#
</div>
</div>

View File

@@ -91,40 +91,7 @@
<div id="tabs-connections">
<a href="refresh_conn?apikey=$apikey" class="juiButton">$T('Plush-button-refresh')</a>
<a href="disconnect?apikey=$apikey" class="juiButton">$T('link-forceDisc')</a>
<hr>
<!--#if $servers#-->
<!--#set $count=0#-->
<!--#for $server in $servers#-->
<!--#set $count=$count+1#-->
<p>$T('swtag-server'): <strong>$server[0]</strong></p>
<p>$T('Priority') = $server[7]&nbsp;&nbsp;<!--#if int($server[8]) != 0#-->$T('optional').capitalize()<!--#else#-->$T('enabled').capitalize()<!--#end if#--></p>
<p># $T('connections'): $server[2]</p>
<!--#if not $server[5]#-->
<a href="./unblock_server?server=$server[0]&apikey=$apikey" class="juiButton">$T('server-blocked')</a>
&nbsp;&nbsp;$server[6]
<!--#end if#-->
<!--#if $server[3]#-->
<table class="rssTable">
<tr>
<th>$T('article-id')</th>
<th>$T('filename')</th>
<th>$T('file-set')</th>
</tr>
<!--#set $odd = False#-->
<!--#for $thrd in $server[3]#-->
<!--#set $odd = not $odd#-->
<tr class="<!--#if $odd then "odd" else "even"#-->">
<td>$thrd[1]</td><td>$thrd[2]</td><td>$thrd[3]</td></tr>
<!--#end for#-->
</table>
<!--#end if#-->
<br/><hr/><br/>
<!--#end for#-->
<!--#else#-->
<p>$T('none')</p>
<!--#end if#-->
</div>
<div id="tabs-dashboard">

View File

@@ -18,7 +18,7 @@ After=network-online.target
[Service]
Environment="PYTHONIOENCODING=utf-8"
ExecStart=/opt/sabnzbd/SABnzbd.py --logging 1 --browser 0
ExecStart=/opt/sabnzbd/SABnzbd.py --disable-file-log --logging 1 --browser 0
User=%I
Type=simple
Restart=on-failure

View File

Binary file not shown.

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"

View File

@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Language-Team: Czech (https://www.transifex.com/sabnzbd/teams/111101/cs/)\n"
"MIME-Version: 1.0\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Danish (https://www.transifex.com/sabnzbd/teams/111101/da/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: German (https://www.transifex.com/sabnzbd/teams/111101/de/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Spanish (https://www.transifex.com/sabnzbd/teams/111101/es/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Finnish (https://www.transifex.com/sabnzbd/teams/111101/fi/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: French (https://www.transifex.com/sabnzbd/teams/111101/fr/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: ION, 2020\n"
"Language-Team: Hebrew (https://www.transifex.com/sabnzbd/teams/111101/he/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/sabnzbd/teams/111101/nb/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Dutch (https://www.transifex.com/sabnzbd/teams/111101/nl/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Polish (https://www.transifex.com/sabnzbd/teams/111101/pl/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/sabnzbd/teams/111101/pt_BR/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Romanian (https://www.transifex.com/sabnzbd/teams/111101/ro/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Russian (https://www.transifex.com/sabnzbd/teams/111101/ru/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Serbian (https://www.transifex.com/sabnzbd/teams/111101/sr/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Swedish (https://www.transifex.com/sabnzbd/teams/111101/sv/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Chinese (China) (https://www.transifex.com/sabnzbd/teams/111101/zh_CN/)\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"
@@ -567,6 +567,15 @@ msgstr ""
msgid "Failed moving %s to %s"
msgstr ""
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -596,6 +605,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr ""
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1114,10 +1124,6 @@ msgstr ""
msgid "%s -> Unknown encoding"
msgstr ""
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr ""
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -2984,20 +2990,12 @@ msgstr ""
msgid "API Key QR Code"
msgstr ""
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr ""
#: sabnzbd/skintext.py
msgid "All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr ""
#: sabnzbd/skintext.py
msgid "You can set access rights for systems outside your local network. Requires List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3262,7 +3260,7 @@ msgid "Action when unwanted extension detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
@@ -3270,7 +3268,15 @@ msgid "Unwanted extensions"
msgstr ""
#: sabnzbd/skintext.py
msgid "List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgstr ""
#: sabnzbd/skintext.py
@@ -4549,6 +4555,10 @@ msgstr ""
msgid "View Script Log"
msgstr ""
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid "LocalStorage (cookies) are disabled in your browser, interface settings will be lost after you close the browser!"
msgstr ""

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Pavel C <quoing_transifex@mess.cz>, 2021\n"
"Language-Team: Czech (https://www.transifex.com/sabnzbd/teams/111101/cs/)\n"
@@ -596,6 +596,15 @@ msgstr "Chyba vytváření (%s)"
msgid "Failed moving %s to %s"
msgstr "Chyba přesunu %s do %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Odmítnuté spojení s hostem \"%s\" z:"
@@ -637,6 +646,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Přihlášené selhalo, zkontrolujte jméno a heslo."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Nezdařený pokus o přihlášení od %s"
@@ -1178,10 +1188,6 @@ msgstr "NZB přidáno do fronty"
msgid "%s -> Unknown encoding"
msgstr "%s -> Neznámé kódování"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr ""
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3096,23 +3102,12 @@ msgstr "Generovat nový klíč"
msgid "API Key QR Code"
msgstr ""
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3408,16 +3403,25 @@ msgid "Action when unwanted extension detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr ""
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
#: sabnzbd/skintext.py
@@ -4734,6 +4738,10 @@ msgstr ""
msgid "View Script Log"
msgstr ""
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Danish (https://www.transifex.com/sabnzbd/teams/111101/da/)\n"
@@ -607,6 +607,15 @@ msgstr "Oprettelse af (%s) mislykkedes"
msgid "Failed moving %s to %s"
msgstr "Det lykkedes ikke at flytte %s til %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -648,6 +657,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Godkendelse mislykkedes, kontrollere brugernavn/adgangskode."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Mislykkede login forsøg fra %s"
@@ -1187,10 +1197,6 @@ msgstr "NZB tilføjet i køen"
msgid "%s -> Unknown encoding"
msgstr "%s -> Ukendt kodning"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => mangler fra alle servere, afviser"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3153,28 +3159,13 @@ msgstr "Generere Ny Nøgle"
msgid "API Key QR Code"
msgstr "API nøgle QR kode"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Liste over lokale netværk intervaller"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Alle lokale netværksadresser starter med disse præfikser (ofte "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Eksterne internetadgang"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
"Du kan angive adgangsrettigheder for systemer uden for dit lokale netværk. "
"Kræver liste over lokale netværks intervaller, skal defineres."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3495,18 +3486,26 @@ msgid "Action when unwanted extension detected"
msgstr "Aktion når uønsket extension er fundet"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Aktion når uønsket extension er fundet i RAR fil"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Uønsket extension"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Vis alle uønskede extensions. For eksempel: <b>exe</b> or <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4852,6 +4851,10 @@ msgstr "Skjul/vis komplette filer"
msgid "View Script Log"
msgstr "Vis scriptlog"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -3,16 +3,17 @@
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2020
# C E <githubce@eiselt.ch>, 2020
# Nikolai Bohl <n.kay01@gmail.com>, 2020
# reloxx13 <reloxx@interia.pl>, 2021
# Ben Hecht <benjamin.hecht@me.com>, 2021
# Safihre <safihre@sabnzbd.org>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: reloxx13 <reloxx@interia.pl>, 2021\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2021\n"
"Language-Team: German (https://www.transifex.com/sabnzbd/teams/111101/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -334,7 +335,7 @@ msgstr "Server-Adresse wird benötigt"
#: sabnzbd/cfg.py
msgid "%s is not a valid script"
msgstr ""
msgstr "%s ist kein gültiges Script"
#. Warning message
#: sabnzbd/config.py
@@ -516,12 +517,12 @@ msgstr "Wird beendet …"
#. Warning message
#: sabnzbd/downloader.py
msgid "Server %s is expiring in %s day(s)"
msgstr ""
msgstr "Server %s läuft in %s tag(en) ab"
#. Warning message
#: sabnzbd/downloader.py
msgid "Server %s has used the specified quota"
msgstr ""
msgstr "Server %s hat die angegebene Quote verbraucht"
#: sabnzbd/emailer.py
msgid "Failed to connect to mail server"
@@ -628,6 +629,15 @@ msgstr "Erstellen von %s fehlgeschlagen"
msgid "Failed moving %s to %s"
msgstr "Verschieben von %s nach %s fehlgeschlagen"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr "Versuch das Verzeichnis %s zu erstellen wurde blockiert"
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr "Abgelehnte Verbindung von:"
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Verbindung vom Host \"%s\" abgelehnt von:"
@@ -670,6 +680,7 @@ msgid "Authentication failed, check username/password."
msgstr ""
"Authentifizierung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Fehlerhafter Login Versuch von %s"
@@ -1224,10 +1235,6 @@ msgstr "NZB zur Warteschlange hinzugefügt"
msgid "%s -> Unknown encoding"
msgstr "%s -> Unbekannte Kodierung"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s wurde auf keinem Server gefunden und daher übersprungen"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3232,28 +3239,14 @@ msgstr "Neuen Schlüssel generieren"
msgid "API Key QR Code"
msgstr "API-Key OR-Code"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Liste der lokalen Netzwerkadressenbereiche"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Alle lokalen Netzwerkadressen starten mit diesen Präfixen (oft "
"\"192.168.1.1\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Externer Internetzugriff"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
"Du kannst Zugriffsrechte für Systeme ausserhalb deines Netzwerkes setzen. "
"Benötigt die Definition einer Liste von lokalen Netzwerkbereichen."
"Du kannst Zugriffsrechte für Systeme ausserhalb deines Netzwerkes setzen."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3592,19 +3585,26 @@ msgid "Action when unwanted extension detected"
msgstr "Aktion bei ungewollter Dateienendung"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Aktion bei ungewollter Dateiendung innerhalb RAR-Archiven"
msgid "Action when an unwanted extension is detected"
msgstr "Aktion bei ungewollter Dateienendung"
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Ungewollte Dateiendungen"
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr "Blacklist"
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr "Whitelist"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Liste aller ungewollter Dateiendungen. Zum Beispiel: <b>exe</b> or <b>exe, "
"com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4177,12 +4177,12 @@ msgstr "Download erzwingen"
#. Config->RSS edit button
#: sabnzbd/skintext.py
msgid "Edit"
msgstr ""
msgstr "Bearbeiten"
#. Config->RSS when will be the next RSS scan
#: sabnzbd/skintext.py
msgid "Next scan at"
msgstr ""
msgstr "Nächster scan um"
#. Config->RSS table column header
#: sabnzbd/skintext.py
@@ -4976,6 +4976,10 @@ msgstr "Vollendete Dateien anzeigen/verstecken"
msgid "View Script Log"
msgstr "Skript-Protokoll anzeigen"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -9,7 +9,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: 1024mb <angelb2203@gmail.com>, 2020\n"
"Language-Team: Spanish (https://www.transifex.com/sabnzbd/teams/111101/es/)\n"
@@ -628,6 +628,15 @@ msgstr "Error al crear (%s)"
msgid "Failed moving %s to %s"
msgstr "Error al mover %s a %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Se deniega la conexión con el nombre de equipo \"%s\" desde:"
@@ -669,6 +678,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Autenticación fallida, compruebe el usuario o la contraseña."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Intento fallido de inicio de sesión desde %s"
@@ -1230,10 +1240,6 @@ msgstr "NZB añadido a la cola"
msgid "%s -> Unknown encoding"
msgstr "%s -> Codificación desconocida"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => faltando de todos servidores, desechando"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3235,28 +3241,13 @@ msgstr "Generar nueva clave"
msgid "API Key QR Code"
msgstr "Código QR de la clave API"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista de rangos de red local"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Todas las direcciones de red locales comienzan con estos prefijos (a menudo "
"\" 192.168.1 . \" )"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Acceso a internet externa"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
"Puede configurar los derechos de acceso para los sistemas fuera de su red "
"local. Es necesario definir los rangos de la lista de red local."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3583,19 +3574,26 @@ msgid "Action when unwanted extension detected"
msgstr "Acción al detectar extensiones no deseadas"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Acción cuando se detecta una extensión no deseada en archivos RAR"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "extensiones no deseadas"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Enumerar todas las extensiones no deseadas . Por ejemplo : < b> exe < / b > "
"o < b> exe, com < / b >"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4970,6 +4968,10 @@ msgstr "Ocultar/Mostrar ficheros completados"
msgid "View Script Log"
msgstr "Ver bitacora de Scripts"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Finnish (https://www.transifex.com/sabnzbd/teams/111101/fi/)\n"
@@ -603,6 +603,15 @@ msgstr "Kohteen (%s) luominen epäonnistui"
msgid "Failed moving %s to %s"
msgstr "Kohteen %s siirtäminen kohteeseen %s epäonnistui"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -644,6 +653,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Varmennus epäonnistui, tarkista käyttäjänimi/salasana."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1180,10 +1190,6 @@ msgstr "NZB lisätty jonoon"
msgid "%s -> Unknown encoding"
msgstr "%s -> Tuntematon koodaus"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => puuttuu kaikilta palvelimilta, hylätään"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3152,25 +3158,12 @@ msgstr "Luo uusi avain"
msgid "API Key QR Code"
msgstr "API avaimen QR-koodi"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista paikallisista verkko-osoitealueista"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Kaikki paikalliset verkko-osoitteet alkavat näillä etuliitteillä (yleensä "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Ulkoinen ohjelman käyttö"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3492,19 +3485,26 @@ msgid "Action when unwanted extension detected"
msgstr "Toiminto kun havaitaan ei toivottu tiedostopääte"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Toiminto kun ei toivottu tiedostopääte havaitaan RAR arkistossa"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Ei toivotut tiedostopäätteet"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lista ei toivotuista tiedostopäätteistä. Esimerkiksi: <b>exe</b> tai <b>exe,"
" com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4853,6 +4853,10 @@ msgstr "Piilota/näytä valmistuneet tiedostot"
msgid "View Script Log"
msgstr "Näytä skriptien loki"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Fred L <88com88@gmail.com>, 2021\n"
"Language-Team: French (https://www.transifex.com/sabnzbd/teams/111101/fr/)\n"
@@ -630,6 +630,15 @@ msgstr "Échec lors de la création de (%s)"
msgid "Failed moving %s to %s"
msgstr "Échec lors du déplacement de %s vers %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr "Tentative bloquée de création du répertoire %s"
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr "Connexion refusée de:"
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Connexion refusée avec le nom d'hôte \"%s\" à partir de :"
@@ -671,6 +680,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Echec d'authentification, vérifiez les identifiant/mot de passe."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Echec de la tentative de connexion de %s"
@@ -1227,10 +1237,6 @@ msgstr "NZB ajouté à la file d'attente"
msgid "%s -> Unknown encoding"
msgstr "%s -> Encodage inconnu"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => absent de tous les serveurs, rejeté"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3234,28 +3240,15 @@ msgstr "Générer une nouvelle clé"
msgid "API Key QR Code"
msgstr "Clé API code QR"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Liste des plages de réseau local"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Toutes les adresses de réseau local commencent par ces préfixes (souvent "
"\"192.168.1.\" )"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Accès Internet externe"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
"Vous pouvez définir les droits d'accès pour les systèmes en dehors de votre "
"réseau local. Requiert la liste des plages de réseaux locaux à définir."
"Vous pouvez définir des droits d'accès pour les systèmes en dehors de votre "
"réseau local."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3594,19 +3587,28 @@ msgid "Action when unwanted extension detected"
msgstr "Action si une extension indésirable est détecté"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Action si une extension indésirable est détecté dans les fichiers RAR"
msgid "Action when an unwanted extension is detected"
msgstr "Action lorsqu'une extension indésirable est détectée"
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Extensions indésirables"
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr "Liste noire"
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr "Liste blanche"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Afficher toutes les extensions indésirables. Par exemple : <b>exe</b> or "
"<b>exe, com</b>"
"Sélectionnez un mode et listez toutes les extensions (non) souhaitées. Par "
"exemple: <b>exe</b> ou <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4185,12 +4187,12 @@ msgstr "Forcer le téléchargement"
#. Config->RSS edit button
#: sabnzbd/skintext.py
msgid "Edit"
msgstr ""
msgstr "Modifier"
#. Config->RSS when will be the next RSS scan
#: sabnzbd/skintext.py
msgid "Next scan at"
msgstr ""
msgstr "Prochain scan à"
#. Config->RSS table column header
#: sabnzbd/skintext.py
@@ -4988,6 +4990,10 @@ msgstr "Afficher/masquer les fichiers terminés"
msgid "View Script Log"
msgstr "Afficher le journal des scripts"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr "Renommer la tâche annulera la Décompression Directe."
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: ION, 2021\n"
"Language-Team: Hebrew (https://www.transifex.com/sabnzbd/teams/111101/he/)\n"
@@ -600,6 +600,15 @@ msgstr "נכשל בעשייה (%s)"
msgid "Failed moving %s to %s"
msgstr "נכשל בהעברת %s אל %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr "ניסיון נחסם ליצור תיקייה %s"
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr "חיבור מסורב מאת:"
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "חיבור מסורב עם שם המארח \"%s\" מאת:"
@@ -639,6 +648,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "אימות נכשל, בדוק שם משתמש/סיסמה."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "ניסיון כניסה בלתי מוצלח מן %s"
@@ -1179,10 +1189,6 @@ msgstr "NZB התווסף לתור"
msgid "%s -> Unknown encoding"
msgstr "קידוד בלתי ידוע -> %s"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => חסר מכל השרתים, משליך"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3152,26 +3158,13 @@ msgstr "חולל מפתח חדש"
msgid "API Key QR Code"
msgstr "קוד QR של מפתח API"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "רשימה של טווחי רשת מקומית"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr "כל כתובות הרשת המקומית מתחילות במקדמים אלו (לעיתים \"192.168.1\")."
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "גישת אינטרנט חיצונית"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgstr ""
"אתה יכול לקבוע זכויות גישה עבור מערכות מחוץ לרשת המקומית שלך. דורש שרשימה של"
" טווחי רשת מקומית תהיה מוגדרת."
msgid "You can set access rights for systems outside your local network."
msgstr "אתה יכול להגדיר זכויות גישה עבור מערכות מחוץ אל הרשת המקומית שלך."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3487,18 +3480,28 @@ msgid "Action when unwanted extension detected"
msgstr "פעולה כאשר סיומת בלתי רצויה מתגלה"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "פעולה כאשר סיומת בלתי רצויה מתגלה בקבצי RAR"
msgid "Action when an unwanted extension is detected"
msgstr "פעולה כאשר סיומת בלתי רצויה מתגלה"
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "סיומות בלתי רצויות"
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr "רשימה שחורה"
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr "רשימה לבנה"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"רשום את כל הסיומות הבלתי רצויות. לדוגמה: <b>exe</b> או <b>exe, com</b>"
"בחר מצב וכתוב את כל הסיומות הבלתי רצויות. לדוגמה: <b>exe</b> או <b>exe, "
"com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4841,6 +4844,10 @@ msgstr "הסתר/הראה קבצים שלמים"
msgid "View Script Log"
msgstr "הצג יומן תסריטים"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr "שינוי השם של העבודה יבטל פריקה ישירה."
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/sabnzbd/teams/111101/nb/)\n"
@@ -599,6 +599,15 @@ msgstr "Opprettelse av (%s) mislyktes"
msgid "Failed moving %s to %s"
msgstr "Kunne ikke flytte %s til %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -640,6 +649,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Godkjenning mislyktes, kontroller brukernavn og passord."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Mislykket påloggingsforsøk fra %s"
@@ -1177,10 +1187,6 @@ msgstr "NZB er lagt til i køen"
msgid "%s -> Unknown encoding"
msgstr "%s -> Ukjent koding"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => mangler på alle servere, fjerner"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3140,24 +3146,12 @@ msgstr "Generer Ny Nøkkel"
msgid "API Key QR Code"
msgstr "API-nøkkel QR-kode"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Liste over lokale nettverksområder"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Alle lokale nettverksadresser starter med disse prefix (ofte \"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Ekstern internettilgang"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3474,19 +3468,26 @@ msgid "Action when unwanted extension detected"
msgstr "Handling når uønsket filtype oppdaget"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Handling når uønsket filtype blir oppdaget i RAR filer."
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Uønsket filtyper"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Skriv alle uønskende filtyper. For eksempel: <b>exe</b> eller <b>exe, "
"com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4824,6 +4825,10 @@ msgstr "Skjul/vis fullførte filer"
msgid "View Script Log"
msgstr "Se skriptlogg"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2021\n"
"Language-Team: Dutch (https://www.transifex.com/sabnzbd/teams/111101/nl/)\n"
@@ -619,6 +619,15 @@ msgstr "Aanmaken (%s) mislukt"
msgid "Failed moving %s to %s"
msgstr "Verplaatsen van %s naar %s mislukt"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr "Poging om map %s aan te maken geblokkeerd"
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr "Verbinding geweigerd van: "
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Verbinding met hostnaam \"%s\" geweigerd van:"
@@ -660,6 +669,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Inloggen mislukt, controleer gebruikersnaam en wachtwoord."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Mislukte login progin bij %s"
@@ -1209,10 +1219,6 @@ msgstr "Download aan wachtrij toegevoegd"
msgid "%s -> Unknown encoding"
msgstr "%s -> Onbekende codering"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => ontbreekt op alle servers, overslaan"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3204,28 +3210,14 @@ msgstr "Maak een nieuwe sleutel"
msgid "API Key QR Code"
msgstr "QR-code van de API-sleutel"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lijst van lokale netwerk bereiken"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Alle lokale netwerk adressen die beginnen met deze reeks (vaak "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Externe toegang"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
"Je kunt toegangsrechten instellen voor systemen buiten je lokale netwerk. "
"Hiervoor geef je een lijst van netwerk-bereiken in."
#: sabnzbd/skintext.py
msgid "No access"
@@ -3551,20 +3543,28 @@ msgid "Action when unwanted extension detected"
msgstr "Actie bij ontdekken van ongewenste extensie"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr ""
"Actie wanneer een ongewenste extensie wordt gevonden in een RAR-bestand"
msgid "Action when an unwanted extension is detected"
msgstr "Actie bij ontdekken van een ongewenste extensie"
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Ongewenste extensies"
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr "Blacklist"
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr "Whitelist"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lijst van alle ongewenste extensies. Voorbeeld: <b>exe</b> or <b>exe, "
"com</b>"
"Kies een stand en voer een lijst van alle (on)gewenste extensies in. "
"Voorbeeld: <b>exe</b> or <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4138,12 +4138,12 @@ msgstr "Forceer download"
#. Config->RSS edit button
#: sabnzbd/skintext.py
msgid "Edit"
msgstr ""
msgstr "Wijzigen"
#. Config->RSS when will be the next RSS scan
#: sabnzbd/skintext.py
msgid "Next scan at"
msgstr ""
msgstr "Wordt uitgevoerd om"
#. Config->RSS table column header
#: sabnzbd/skintext.py
@@ -4937,6 +4937,10 @@ msgstr "Toon/verberg voltooide bestanden"
msgid "View Script Log"
msgstr "Toon Script resultaat"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr "Als je de naam wijzigt zal het Direct Uitpakken gestopt worden."
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Polish (https://www.transifex.com/sabnzbd/teams/111101/pl/)\n"
@@ -598,6 +598,15 @@ msgstr "Nie udało się utworzyć (%s)"
msgid "Failed moving %s to %s"
msgstr "Nie udało się przenieść %s do %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -639,6 +648,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Błąd połączenia, sprawdź nazwę użytkownika i hasło."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1178,10 +1188,6 @@ msgstr "NZB dodany do kolejki"
msgid "%s -> Unknown encoding"
msgstr "%s -> Nieznane kodowanie"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => nie znaleziono na żadnym serwerze, porzucam"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3143,25 +3149,12 @@ msgstr "Utwórz nowy klucz"
msgid "API Key QR Code"
msgstr "Kod QR klucza API"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista zakresów sieci lokalnych"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Wszystkie lokalne adresy sieciowe zaczynają się od tych prefiksów (często "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Dostęp z zewnątrz"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3480,20 +3473,26 @@ msgid "Action when unwanted extension detected"
msgstr "Działanie dla niepożądanych rozszerzeń"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgid "Action when an unwanted extension is detected"
msgstr ""
"Działanie, które zostanie podjęte po wykryciu w pliku RAR niepożądanego "
"rozszerzenia"
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Niepożądane rozszerzenia"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lista niepożądanych rozszerzeń. Przykład: <b>exe</b> lub <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4834,6 +4833,10 @@ msgstr "Pokaż/ukryj ukończone pliki"
msgid "View Script Log"
msgstr "Zobacz log skryptu"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/sabnzbd/teams/111101/pt_BR/)\n"
@@ -602,6 +602,15 @@ msgstr "Falha ao criar (%s)"
msgid "Failed moving %s to %s"
msgstr "Falha ao mover %s para %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -643,6 +652,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Falha de autenticação, verifique usuário / senha."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1179,10 +1189,6 @@ msgstr "NZB adicionado à fila"
msgid "%s -> Unknown encoding"
msgstr "%s -> Codificação desconhecida"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => faltando em todos os servidores. Descartando"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3148,25 +3154,12 @@ msgstr "Gerar Nova Chave"
msgid "API Key QR Code"
msgstr "API Key QR Code"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista de intervalos de rede local"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Todas os endereços da rede local começam com esse prefixo (geralmente "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Acesso externo da Internet"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3484,19 +3477,26 @@ msgid "Action when unwanted extension detected"
msgstr "Ação quando extensão indesejada for detectada"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Ação quando uma extensão indesejada é detectada em arquivos RAR"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Extensões indesejadas"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lista todas as extensões indesejadas. Por exemplo: <b>exe</b> ou <b>exe, "
"com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4837,6 +4837,10 @@ msgstr "Esconder/Exibir arquivos completos"
msgid "View Script Log"
msgstr "Exibir Log do Script"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Eduard Baniceru <war4peace@gmail.com>, 2021\n"
"Language-Team: Romanian (https://www.transifex.com/sabnzbd/teams/111101/ro/)\n"
@@ -616,6 +616,15 @@ msgstr "Facere nereuşită (%s)"
msgid "Failed moving %s to %s"
msgstr "Mutare %s în %s nereuşită"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr "Conectare refuzată cu gazda „%s” de la:"
@@ -657,6 +666,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Autentificare nereuşită, verifică nume utilizator/parolă."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "Încercare de conectare nereușită de la %s"
@@ -1205,10 +1215,6 @@ msgstr "NZB adăugat în coadă"
msgid "%s -> Unknown encoding"
msgstr "%s -> Codificare Necunoscută"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => lipsă de pe toate serverele, ignorare"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3175,23 +3181,12 @@ msgstr "Generează o Cheie Nouă"
msgid "API Key QR Code"
msgstr "Cheie API sau Cod QR"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Listă de rețele locale"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr "Toate rețelele locale încep cu acest prefixe (de regulă \"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Acces extern la internet"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3508,19 +3503,26 @@ msgid "Action when unwanted extension detected"
msgstr "Acțiune când se detectează o extensie nedorită"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Acțiune când se detectează extensie nedorită într-un fișier RAR"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Extensii nedorite"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Listă cu toate extensiile nedorite. De exemplu: <b>exe</b> or <b>exe, "
"com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4861,6 +4863,10 @@ msgstr "Ascunde/arată fișierele finalizate"
msgid "View Script Log"
msgstr "Vezi Jurnal Script"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Russian (https://www.transifex.com/sabnzbd/teams/111101/ru/)\n"
@@ -598,6 +598,15 @@ msgstr "Не удалось создать (%s)"
msgid "Failed moving %s to %s"
msgstr "Не удалось переместить %s в %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -639,6 +648,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Ошибка проверки подлинности. Проверьте имя и пароль."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1179,10 +1189,6 @@ msgstr "NZB-файл добавлен в очередь"
msgid "%s -> Unknown encoding"
msgstr "%s -> неизвестная кодировка"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => отсутствует на всех серверах, отброшен"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3141,23 +3147,12 @@ msgstr "Создать новый ключ"
msgid "API Key QR Code"
msgstr "QR-код ключа API"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3476,16 +3471,25 @@ msgid "Action when unwanted extension detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr ""
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
#: sabnzbd/skintext.py
@@ -4827,6 +4831,10 @@ msgstr ""
msgid "View Script Log"
msgstr "Просмотреть журнал сценария"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Serbian (https://www.transifex.com/sabnzbd/teams/111101/sr/)\n"
@@ -597,6 +597,15 @@ msgstr "Neuspešno kreiranje (%s)"
msgid "Failed moving %s to %s"
msgstr "Neuspešno premeštanje %s u %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -636,6 +645,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Аутентификација погрешна, проверити име/лозинку."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1173,10 +1183,6 @@ msgstr "NZB додат у ред"
msgid "%s -> Unknown encoding"
msgstr "%s -> Непознато енкодирање"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => фали на свим серверима, одбацивање"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3128,25 +3134,12 @@ msgstr "Генериши нов кључ"
msgid "API Key QR Code"
msgstr "QR Код АПИ кључа"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista lokalnih mrežnih raspona"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Sve lokalne mrežne adrese počinju sa sledećim prefiksima (najčešće "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Екстерни приступ интернету"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3464,18 +3457,26 @@ msgid "Action when unwanted extension detected"
msgstr "Radnja kada je otkrivena neželjena ekstenzija"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Radnja kada je otkrivena neželjena ekstenzija u RAR datotekama"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Neželjene ekstenzije"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lista svih neželjenih ekstenzija. Na primer: <b>exe</b> or <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4809,6 +4810,10 @@ msgstr "Sakrij/prikaži sve završene datoteke"
msgid "View Script Log"
msgstr "Види извештај скрипта"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Swedish (https://www.transifex.com/sabnzbd/teams/111101/sv/)\n"
@@ -597,6 +597,15 @@ msgstr "Skapande av (%s) misslyckades"
msgid "Failed moving %s to %s"
msgstr "Det gick inte att flyta %s till %s"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -638,6 +647,7 @@ msgstr ""
msgid "Authentication failed, check username/password."
msgstr "Autentisering misslyckades, kontrollera användarnamn och lösenord."
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr ""
@@ -1177,10 +1187,6 @@ msgstr "NZB tillagd i kön"
msgid "%s -> Unknown encoding"
msgstr "%s -> Okänd kodning"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => saknas från alla servrar, kastar"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3139,25 +3145,12 @@ msgstr "Generera Ny Nyckel"
msgid "API Key QR Code"
msgstr "API- eller QR-kod"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "Lista av lokala nätverksomfång"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr ""
"Alla lokala nätverksadresser startar med dessa prefixer (ofta "
"\"192.168.1.\")"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "Extern internetåtkomst"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
@@ -3473,18 +3466,26 @@ msgid "Action when unwanted extension detected"
msgstr "Händelse när oönskad filändelse hittad"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "Händelse när en oönskad filändelse är hittad i RAR-filer."
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "Oönskade filändelser"
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
"Lista alla oönskade filändelser. Till Exempel: <b>exe</b> or <b>exe, com</b>"
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4821,6 +4822,10 @@ msgstr "Visa/göm färdiga filer"
msgid "View Script Log"
msgstr "Visa skriptlogg"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Chinese (China) (https://www.transifex.com/sabnzbd/teams/111101/zh_CN/)\n"
@@ -594,6 +594,15 @@ msgstr "创建失败 (%s)"
msgid "Failed moving %s to %s"
msgstr "将 %s 移动到 %s 失败"
#. Error message
#: sabnzbd/filesystem.py
msgid "Blocked attempt to create directory %s"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection from:"
msgstr ""
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
@@ -629,6 +638,7 @@ msgstr "缺身份认证信息,请在第三方程序中输入“配置”->“
msgid "Authentication failed, check username/password."
msgstr "身份认证失败,请检查用户名/密码。"
#. Warning message
#: sabnzbd/interface.py
msgid "Unsuccessful login attempt from %s"
msgstr "%s 中有失败的登陆请求"
@@ -1163,10 +1173,6 @@ msgstr "NZB 已添加到队列"
msgid "%s -> Unknown encoding"
msgstr "%s -> 未知编码"
#: sabnzbd/nzbstuff.py
msgid "%s => missing from all servers, discarding"
msgstr "%s => 所有服务器均缺失,正在舍弃"
#. Warning message
#: sabnzbd/nzbstuff.py
msgid "Invalid NZB file %s, skipping (reason=%s, line=%s)"
@@ -3107,24 +3113,13 @@ msgstr "生成新的 Key"
msgid "API Key QR Code"
msgstr "API Key QR 码"
#: sabnzbd/skintext.py
msgid "List of local network ranges"
msgstr "本地网段列表"
#: sabnzbd/skintext.py
msgid ""
"All local network addresses start with these prefixes (often \"192.168.1.\")"
msgstr "本地网络地址以这些前缀开头 (通常为“192.168.1.”)"
#: sabnzbd/skintext.py
msgid "External internet access"
msgstr "外部互联网访问"
#: sabnzbd/skintext.py
msgid ""
"You can set access rights for systems outside your local network. Requires "
"List of local network ranges to be defined."
msgstr "您可以设定非本地网络的访问权限。要求定义本地网络列表。"
msgid "You can set access rights for systems outside your local network."
msgstr ""
#: sabnzbd/skintext.py
msgid "No access"
@@ -3420,17 +3415,26 @@ msgid "Action when unwanted extension detected"
msgstr "侦测到不需要的扩展名时的操作"
#: sabnzbd/skintext.py
msgid "Action when an unwanted extension is detected in RAR files"
msgstr "RAR 文件中侦测到不需要的扩展名时的操作"
msgid "Action when an unwanted extension is detected"
msgstr ""
#: sabnzbd/skintext.py
msgid "Unwanted extensions"
msgstr "不需要的扩展名"
#: sabnzbd/skintext.py
msgid "Blacklist"
msgstr ""
#: sabnzbd/skintext.py
msgid "Whitelist"
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"List all unwanted extensions. For example: <b>exe</b> or <b>exe, com</b>"
msgstr "所有不需要扩展名的列表。例如: <b>exe</b> 或 <b>exe, com</b>"
"Select a mode and list all (un)wanted extensions. For example: <b>exe</b> or"
" <b>exe, com</b>"
msgstr ""
#: sabnzbd/skintext.py
msgid "Enable SFV-based checks"
@@ -4752,6 +4756,10 @@ msgstr "隐藏/显示已完成文件"
msgid "View Script Log"
msgstr "查看脚本日志"
#: sabnzbd/skintext.py
msgid "Renaming the job will abort Direct Unpack."
msgstr ""
#: sabnzbd/skintext.py
msgid ""
"LocalStorage (cookies) are disabled in your browser, interface settings will"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"

View File

@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Language-Team: Czech (https://www.transifex.com/sabnzbd/teams/111101/cs/)\n"
"MIME-Version: 1.0\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Danish (https://www.transifex.com/sabnzbd/teams/111101/da/)\n"

View File

@@ -4,12 +4,13 @@
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2020
# Ben Hecht <benjamin.hecht@me.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Last-Translator: Ben Hecht <benjamin.hecht@me.com>, 2021\n"
"Language-Team: German (https://www.transifex.com/sabnzbd/teams/111101/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -51,6 +52,8 @@ msgid ""
"The installer only supports Windows 8.1 and above, use the standalone legacy"
" version to run on older Windows version."
msgstr ""
"Der Installer unterstützt nur Windows 8.1 und höher. Benutze die Standalone "
"Version für ältere Windows Versionen."
#: builder/win/NSIS_Installer.nsi
msgid "This will uninstall SABnzbd from your system"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Ester Molla Aragones <moarages@gmail.com>, 2020\n"
"Language-Team: Spanish (https://www.transifex.com/sabnzbd/teams/111101/es/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Finnish (https://www.transifex.com/sabnzbd/teams/111101/fi/)\n"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Fred L <88com88@gmail.com>, 2021\n"
"Language-Team: French (https://www.transifex.com/sabnzbd/teams/111101/fr/)\n"

View File

@@ -8,7 +8,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: ION, 2021\n"
"Language-Team: Hebrew (https://www.transifex.com/sabnzbd/teams/111101/he/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/sabnzbd/teams/111101/nb/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2021\n"
"Language-Team: Dutch (https://www.transifex.com/sabnzbd/teams/111101/nl/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Polish (https://www.transifex.com/sabnzbd/teams/111101/pl/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/sabnzbd/teams/111101/pt_BR/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Romanian (https://www.transifex.com/sabnzbd/teams/111101/ro/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Russian (https://www.transifex.com/sabnzbd/teams/111101/ru/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Serbian (https://www.transifex.com/sabnzbd/teams/111101/sr/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Swedish (https://www.transifex.com/sabnzbd/teams/111101/sv/)\n"

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.2.0-develop\n"
"Project-Id-Version: SABnzbd-3.3.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2020\n"
"Language-Team: Chinese (China) (https://www.transifex.com/sabnzbd/teams/111101/zh_CN/)\n"

View File

@@ -21,6 +21,7 @@ import datetime
import tempfile
import pickle
import ctypes
import ctypes.util
import gzip
import time
import socket
@@ -35,7 +36,7 @@ from typing import Any, AnyStr
# Determine platform flags
##############################################################################
WIN32 = DARWIN = FOUNDATION = WIN64 = DOCKER = False
KERNEL32 = LIBC = None
KERNEL32 = LIBC = MACOSLIBC = None
if os.name == "nt":
WIN32 = True
@@ -56,12 +57,12 @@ elif os.name == "posix":
except:
pass
# See if we have Linux memory functions
# See if we have the GNU glibc malloc_trim() memory release function
try:
LIBC = ctypes.CDLL("libc.so.6")
LIBC.malloc_trim(0)
LIBC.malloc_trim(0) # try the malloc_trim() call, which is a GNU extension
except:
# No malloc_trim(), probably because no libc
# No malloc_trim(), probably because no glibc
LIBC = None
pass
@@ -70,6 +71,7 @@ elif os.name == "posix":
DARWIN = True
# 12 = Sierra, 11 = ElCaptain, 10 = Yosemite, 9 = Mavericks, 8 = MountainLion
DARWIN_VERSION = int(platform.mac_ver()[0].split(".")[1])
MACOSLIBC = ctypes.CDLL(ctypes.util.find_library("c"), use_errno=True) # the MacOS C library
try:
import Foundation
import sabnzbd.utils.sleepless as sleepless
@@ -78,6 +80,7 @@ elif os.name == "posix":
except:
pass
# Imported to be referenced from other files directly
from sabnzbd.version import __version__, __baseline__
@@ -449,13 +452,13 @@ def halt():
def notify_shutdown_loop():
""" Trigger the main loop to wake up"""
"""Trigger the main loop to wake up"""
with sabnzbd.SABSTOP_CONDITION:
sabnzbd.SABSTOP_CONDITION.notify()
def shutdown_program():
""" Stop program after halting and saving """
"""Stop program after halting and saving"""
if not sabnzbd.SABSTOP:
logging.info("[%s] Performing SABnzbd shutdown", misc.caller_name())
sabnzbd.halt()
@@ -465,7 +468,7 @@ def shutdown_program():
def trigger_restart(timeout=None):
""" Trigger a restart by setting a flag an shutting down CP """
"""Trigger a restart by setting a flag an shutting down CP"""
# Sometimes we need to wait a bit to send good-bye to the browser
if timeout:
time.sleep(timeout)
@@ -479,22 +482,22 @@ def trigger_restart(timeout=None):
# Misc Wrappers
##############################################################################
def new_limit():
""" Callback for article cache changes """
"""Callback for article cache changes"""
sabnzbd.ArticleCache.new_limit(cfg.cache_limit.get_int())
def guard_restart():
""" Callback for config options requiring a restart """
"""Callback for config options requiring a restart"""
sabnzbd.RESTART_REQ = True
def guard_top_only():
""" Callback for change of top_only option """
"""Callback for change of top_only option"""
sabnzbd.NzbQueue.set_top_only(cfg.top_only())
def guard_pause_on_pp():
""" Callback for change of pause-download-on-pp """
"""Callback for change of pause-download-on-pp"""
if cfg.pause_on_post_processing():
pass # Not safe to idle downloader, because we don't know
# if post-processing is active now
@@ -503,17 +506,17 @@ def guard_pause_on_pp():
def guard_quota_size():
""" Callback for change of quota_size """
"""Callback for change of quota_size"""
sabnzbd.BPSMeter.change_quota()
def guard_quota_dp():
""" Callback for change of quota_day or quota_period """
"""Callback for change of quota_day or quota_period"""
sabnzbd.Scheduler.restart()
def guard_language():
""" Callback for change of the interface language """
"""Callback for change of the interface language"""
sabnzbd.lang.set_language(cfg.language())
sabnzbd.api.clear_trans_cache()
@@ -531,12 +534,12 @@ def set_https_verification(value):
def guard_https_ver():
""" Callback for change of https verification """
"""Callback for change of https verification"""
set_https_verification(cfg.enable_https_verification())
def add_url(url, pp=None, script=None, cat=None, priority=None, nzbname=None, password=None):
""" Add NZB based on a URL, attributes optional """
"""Add NZB based on a URL, attributes optional"""
if "http" not in url:
return
if not pp or pp == "-1":
@@ -565,7 +568,7 @@ def add_url(url, pp=None, script=None, cat=None, priority=None, nzbname=None, pa
def save_state():
""" Save all internal bookkeeping to disk """
"""Save all internal bookkeeping to disk"""
config.save_config()
sabnzbd.ArticleCache.flush_articles()
sabnzbd.NzbQueue.save()
@@ -577,14 +580,14 @@ def save_state():
def pause_all():
""" Pause all activities than cause disk access """
"""Pause all activities than cause disk access"""
sabnzbd.PAUSED_ALL = True
sabnzbd.Downloader.pause()
logging.debug("PAUSED_ALL active")
def unpause_all():
""" Resume all activities """
"""Resume all activities"""
sabnzbd.PAUSED_ALL = False
sabnzbd.Downloader.resume()
logging.debug("PAUSED_ALL inactive")
@@ -596,20 +599,20 @@ def unpause_all():
def backup_exists(filename: str) -> bool:
""" Return True if backup exists and no_dupes is set """
"""Return True if backup exists and no_dupes is set"""
path = cfg.nzb_backup_dir.get_path()
return path and os.path.exists(os.path.join(path, filename + ".gz"))
def backup_nzb(filename: str, data: AnyStr):
""" Backup NZB file """
"""Backup NZB file"""
path = cfg.nzb_backup_dir.get_path()
if path:
save_compressed(path, filename, data)
def save_compressed(folder: str, filename: str, data: AnyStr):
""" Save compressed NZB file in folder """
"""Save compressed NZB file in folder"""
if filename.endswith(".nzb"):
filename += ".gz"
else:
@@ -725,7 +728,7 @@ def add_nzbfile(
def enable_server(server):
""" Enable server (scheduler only) """
"""Enable server (scheduler only)"""
try:
config.get_config("servers", server).enable.set(1)
except:
@@ -736,7 +739,7 @@ def enable_server(server):
def disable_server(server):
""" Disable server (scheduler only) """
"""Disable server (scheduler only)"""
try:
config.get_config("servers", server).enable.set(0)
except:
@@ -747,7 +750,7 @@ def disable_server(server):
def system_shutdown():
""" Shutdown system after halting download and saving bookkeeping """
"""Shutdown system after halting download and saving bookkeeping"""
logging.info("Performing system shutdown")
Thread(target=halt).start()
@@ -763,7 +766,7 @@ def system_shutdown():
def system_hibernate():
""" Hibernate system """
"""Hibernate system"""
logging.info("Performing system hybernation")
if sabnzbd.WIN32:
powersup.win_hibernate()
@@ -774,7 +777,7 @@ def system_hibernate():
def system_standby():
""" Standby system """
"""Standby system"""
logging.info("Performing system standby")
if sabnzbd.WIN32:
powersup.win_standby()
@@ -785,7 +788,7 @@ def system_standby():
def restart_program():
""" Restart program (used by scheduler) """
"""Restart program (used by scheduler)"""
logging.info("Scheduled restart request")
# Just set the stop flag, because stopping CherryPy from
# the scheduler is not reliable
@@ -828,7 +831,7 @@ def change_queue_complete_action(action, new=True):
def run_script(script):
""" Run a user script (queue complete only) """
"""Run a user script (queue complete only)"""
script_path = filesystem.make_script_path(script)
if script_path:
try:
@@ -839,7 +842,7 @@ def run_script(script):
def keep_awake():
""" If we still have work to do, keep Windows/macOS system awake """
"""If we still have work to do, keep Windows/macOS system awake"""
if KERNEL32 or FOUNDATION:
if sabnzbd.cfg.keep_awake():
ES_CONTINUOUS = 0x80000000
@@ -887,7 +890,7 @@ def get_new_id(prefix, folder, check_list=None):
def save_data(data, _id, path, do_pickle=True, silent=False):
""" Save data to a diskfile """
"""Save data to a diskfile"""
if not silent:
logging.debug("[%s] Saving data for %s in %s", misc.caller_name(), _id, path)
path = os.path.join(path, _id)
@@ -914,7 +917,7 @@ def save_data(data, _id, path, do_pickle=True, silent=False):
def load_data(data_id, path, remove=True, do_pickle=True, silent=False):
""" Read data from disk file """
"""Read data from disk file"""
path = os.path.join(path, data_id)
if not os.path.exists(path):
@@ -946,7 +949,7 @@ def load_data(data_id, path, remove=True, do_pickle=True, silent=False):
def remove_data(_id: str, path: str):
""" Remove admin file """
"""Remove admin file"""
path = os.path.join(path, _id)
try:
if os.path.exists(path):
@@ -956,19 +959,19 @@ def remove_data(_id: str, path: str):
def save_admin(data: Any, data_id: str):
""" Save data in admin folder in specified format """
"""Save data in admin folder in specified format"""
logging.debug("[%s] Saving data for %s", misc.caller_name(), data_id)
save_data(data, data_id, cfg.admin_dir.get_path())
def load_admin(data_id: str, remove=False, silent=False) -> Any:
""" Read data in admin folder in specified format """
"""Read data in admin folder in specified format"""
logging.debug("[%s] Loading data for %s", misc.caller_name(), data_id)
return load_data(data_id, cfg.admin_dir.get_path(), remove=remove, silent=silent)
def request_repair():
""" Request a full repair on next restart """
"""Request a full repair on next restart"""
path = os.path.join(cfg.admin_dir.get_path(), REPAIR_REQUEST)
try:
with open(path, "w") as f:
@@ -978,7 +981,7 @@ def request_repair():
def check_repair_request():
""" Return True if repair request found, remove afterwards """
"""Return True if repair request found, remove afterwards"""
path = os.path.join(cfg.admin_dir.get_path(), REPAIR_REQUEST)
if os.path.exists(path):
try:
@@ -1041,7 +1044,7 @@ def check_all_tasks():
def pid_file(pid_path=None, pid_file=None, port=0):
""" Create or remove pid file """
"""Create or remove pid file"""
if not sabnzbd.WIN32:
if pid_path and pid_path.startswith("/"):
sabnzbd.DIR_PID = os.path.join(pid_path, "sabnzbd-%d.pid" % port)
@@ -1074,14 +1077,14 @@ def check_incomplete_vs_complete():
def wait_for_download_folder():
""" Wait for download folder to become available """
"""Wait for download folder to become available"""
while not cfg.download_dir.test_path():
logging.debug('Waiting for "incomplete" folder')
time.sleep(2.0)
def test_ipv6():
""" Check if external IPv6 addresses are reachable """
"""Check if external IPv6 addresses are reachable"""
if not cfg.selftest_host():
# User disabled the test, assume active IPv6
return True
@@ -1109,7 +1112,7 @@ def test_ipv6():
def test_cert_checking():
""" Test quality of certificate validation """
"""Test quality of certificate validation"""
# User disabled the test, assume proper SSL certificates
if not cfg.selftest_host():
return True
@@ -1136,7 +1139,7 @@ def test_cert_checking():
def history_updated():
""" To make sure we always have a fresh history """
"""To make sure we always have a fresh history"""
sabnzbd.LAST_HISTORY_UPDATE += 1
# Never go over the limit
if sabnzbd.LAST_HISTORY_UPDATE + 1 >= sys.maxsize:

View File

@@ -29,7 +29,7 @@ import json
import cherrypy
import locale
from threading import Thread
from typing import List, Tuple
from typing import Tuple, Optional, List
import sabnzbd
from sabnzbd.constants import (
@@ -59,7 +59,7 @@ from sabnzbd.misc import (
opts_to_pp,
)
from sabnzbd.filesystem import diskspace, get_ext, clip_path, remove_all, list_scripts
from sabnzbd.encoding import xml_name
from sabnzbd.encoding import xml_name, utob
from sabnzbd.utils.servertests import test_nntp_server_dict
from sabnzbd.getipaddress import localipv4, publicipv4, ipv6, addresslookup
from sabnzbd.database import build_history_info, unpack_history_info, HistoryDB
@@ -86,26 +86,7 @@ _MSG_BAD_SERVER_PARMS = "Incorrect server settings"
def api_handler(kwargs):
""" API Dispatcher """
if cfg.api_logging():
# Was it proxy forwarded?
xff = cherrypy.request.headers.get("X-Forwarded-For")
if xff:
logging.debug(
"API-call from %s (X-Forwarded-For: %s) [%s] %s",
cherrypy.request.remote.ip,
xff,
cherrypy.request.headers.get("User-Agent", "??"),
kwargs,
)
else:
logging.debug(
"API-call from %s [%s] %s",
cherrypy.request.remote.ip,
cherrypy.request.headers.get("User-Agent", "??"),
kwargs,
)
"""API Dispatcher"""
# Clean-up the arguments
for vr in ("mode", "output", "name"):
if vr in kwargs and isinstance(kwargs[vr], list):
@@ -115,23 +96,18 @@ def api_handler(kwargs):
output = kwargs.get("output", "")
name = kwargs.get("name", "")
if mode not in ("version", "auth"):
msg = sabnzbd.interface.check_apikey(kwargs)
if msg:
return report(output, msg)
response = _api_table.get(mode, (_api_undefined, 2))[0](name, output, kwargs)
return response
def _api_get_config(name, output, kwargs):
""" API: accepts output, keyword, section """
"""API: accepts output, keyword, section"""
_, data = config.get_dconfig(kwargs.get("section"), kwargs.get("keyword"))
return report(output, keyword="config", data=data)
def _api_set_config(name, output, kwargs):
""" API: accepts output, keyword, section """
"""API: accepts output, keyword, section"""
if cfg.configlock():
return report(output, _MSG_CONFIG_LOCKED)
if kwargs.get("section") == "servers":
@@ -150,7 +126,7 @@ def _api_set_config(name, output, kwargs):
def _api_set_config_default(name, output, kwargs):
""" API: Reset requested config variables back to defaults. Currently only for misc-section """
"""API: Reset requested config variables back to defaults. Currently only for misc-section"""
if cfg.configlock():
return report(output, _MSG_CONFIG_LOCKED)
keywords = kwargs.get("keyword", [])
@@ -165,7 +141,7 @@ def _api_set_config_default(name, output, kwargs):
def _api_del_config(name, output, kwargs):
""" API: accepts output, keyword, section """
"""API: accepts output, keyword, section"""
if cfg.configlock():
return report(output, _MSG_CONFIG_LOCKED)
if del_from_section(kwargs):
@@ -175,13 +151,13 @@ def _api_del_config(name, output, kwargs):
def _api_queue(name, output, kwargs):
""" API: Dispatcher for mode=queue """
"""API: Dispatcher for mode=queue"""
value = kwargs.get("value", "")
return _api_queue_table.get(name, (_api_queue_default, 2))[0](output, value, kwargs)
def _api_queue_delete(output, value, kwargs):
""" API: accepts output, value """
"""API: accepts output, value"""
if value.lower() == "all":
removed = sabnzbd.NzbQueue.remove_all(kwargs.get("search"))
return report(output, keyword="", data={"status": bool(removed), "nzo_ids": removed})
@@ -195,7 +171,7 @@ def _api_queue_delete(output, value, kwargs):
def _api_queue_delete_nzf(output, value, kwargs):
""" API: accepts value(=nzo_id), value2(=nzf_id) """
"""API: accepts value(=nzo_id), value2(=nzf_id)"""
value2 = kwargs.get("value2")
if value and value2:
removed = sabnzbd.NzbQueue.remove_nzf(value, value2, force_delete=True)
@@ -205,7 +181,7 @@ def _api_queue_delete_nzf(output, value, kwargs):
def _api_queue_rename(output, value, kwargs):
""" API: accepts output, value(=old name), value2(=new name), value3(=password) """
"""API: accepts output, value(=old name), value2(=new name), value3(=password)"""
value2 = kwargs.get("value2")
value3 = kwargs.get("value3")
if value and value2:
@@ -216,19 +192,19 @@ def _api_queue_rename(output, value, kwargs):
def _api_queue_change_complete_action(output, value, kwargs):
""" API: accepts output, value(=action) """
"""API: accepts output, value(=action)"""
sabnzbd.change_queue_complete_action(value)
return report(output)
def _api_queue_purge(output, value, kwargs):
""" API: accepts output """
"""API: accepts output"""
removed = sabnzbd.NzbQueue.remove_all(kwargs.get("search"))
return report(output, keyword="", data={"status": bool(removed), "nzo_ids": removed})
def _api_queue_pause(output, value, kwargs):
""" API: accepts output, value(=list of nzo_id) """
"""API: accepts output, value(=list of nzo_id)"""
if value:
items = value.split(",")
handled = sabnzbd.NzbQueue.pause_multiple_nzo(items)
@@ -238,7 +214,7 @@ def _api_queue_pause(output, value, kwargs):
def _api_queue_resume(output, value, kwargs):
""" API: accepts output, value(=list of nzo_id) """
"""API: accepts output, value(=list of nzo_id)"""
if value:
items = value.split(",")
handled = sabnzbd.NzbQueue.resume_multiple_nzo(items)
@@ -248,7 +224,7 @@ def _api_queue_resume(output, value, kwargs):
def _api_queue_priority(output, value, kwargs):
""" API: accepts output, value(=nzo_id), value2(=priority) """
"""API: accepts output, value(=nzo_id), value2(=priority)"""
value2 = kwargs.get("value2")
if value and value2:
try:
@@ -266,7 +242,7 @@ def _api_queue_priority(output, value, kwargs):
def _api_queue_sort(output, value, kwargs):
""" API: accepts output, sort, dir """
"""API: accepts output, sort, dir"""
sort = kwargs.get("sort")
direction = kwargs.get("dir", "")
if sort:
@@ -277,7 +253,7 @@ def _api_queue_sort(output, value, kwargs):
def _api_queue_default(output, value, kwargs):
""" API: accepts output, sort, dir, start, limit """
"""API: accepts output, sort, dir, start, limit"""
start = int_conv(kwargs.get("start"))
limit = int_conv(kwargs.get("limit"))
search = kwargs.get("search")
@@ -288,7 +264,7 @@ def _api_queue_default(output, value, kwargs):
def _api_queue_rating(output, value, kwargs):
""" API: accepts output, value(=nzo_id), type, setting, detail """
"""API: accepts output, value(=nzo_id), type, setting, detail"""
vote_map = {"up": sabnzbd.Rating.VOTE_UP, "down": sabnzbd.Rating.VOTE_DOWN}
flag_map = {
"spam": sabnzbd.Rating.FLAG_SPAM,
@@ -320,17 +296,17 @@ def _api_queue_rating(output, value, kwargs):
def _api_options(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return options_list(output)
def _api_translate(name, output, kwargs):
""" API: accepts output, value(=acronym) """
"""API: accepts output, value(=acronym)"""
return report(output, keyword="value", data=T(kwargs.get("value", "")))
def _api_addfile(name, output, kwargs):
""" API: accepts name, output, pp, script, cat, priority, nzbname """
"""API: accepts name, output, pp, script, cat, priority, nzbname"""
# Normal upload will send the nzb in a kw arg called name or nzbfile
if not name or isinstance(name, str):
name = kwargs.get("nzbfile", None)
@@ -356,7 +332,7 @@ def _api_addfile(name, output, kwargs):
def _api_retry(name, output, kwargs):
""" API: accepts name, output, value(=nzo_id), nzbfile(=optional NZB), password (optional) """
"""API: accepts name, output, value(=nzo_id), nzbfile(=optional NZB), password (optional)"""
value = kwargs.get("value")
# Normal upload will send the nzb in a kw arg called nzbfile
if name is None or isinstance(name, str):
@@ -372,7 +348,7 @@ def _api_retry(name, output, kwargs):
def _api_cancel_pp(name, output, kwargs):
""" API: accepts name, output, value(=nzo_id) """
"""API: accepts name, output, value(=nzo_id)"""
nzo_id = kwargs.get("value")
if sabnzbd.PostProcessor.cancel_pp(nzo_id):
return report(output, keyword="", data={"status": True, "nzo_id": nzo_id})
@@ -381,7 +357,7 @@ def _api_cancel_pp(name, output, kwargs):
def _api_addlocalfile(name, output, kwargs):
""" API: accepts name, output, pp, script, cat, priority, nzbname """
"""API: accepts name, output, pp, script, cat, priority, nzbname"""
if name:
if os.path.exists(name):
pp = kwargs.get("pp")
@@ -419,7 +395,7 @@ def _api_addlocalfile(name, output, kwargs):
def _api_switch(name, output, kwargs):
""" API: accepts output, value(=first id), value2(=second id) """
"""API: accepts output, value(=first id), value2(=second id)"""
value = kwargs.get("value")
value2 = kwargs.get("value2")
if value and value2:
@@ -431,7 +407,7 @@ def _api_switch(name, output, kwargs):
def _api_change_cat(name, output, kwargs):
""" API: accepts output, value(=nzo_id), value2(=category) """
"""API: accepts output, value(=nzo_id), value2(=category)"""
value = kwargs.get("value")
value2 = kwargs.get("value2")
if value and value2:
@@ -446,7 +422,7 @@ def _api_change_cat(name, output, kwargs):
def _api_change_script(name, output, kwargs):
""" API: accepts output, value(=nzo_id), value2(=script) """
"""API: accepts output, value(=nzo_id), value2(=script)"""
value = kwargs.get("value")
value2 = kwargs.get("value2")
if value and value2:
@@ -461,7 +437,7 @@ def _api_change_script(name, output, kwargs):
def _api_change_opts(name, output, kwargs):
""" API: accepts output, value(=nzo_id), value2(=pp) """
"""API: accepts output, value(=nzo_id), value2(=pp)"""
value = kwargs.get("value")
value2 = kwargs.get("value2")
result = 0
@@ -471,13 +447,13 @@ def _api_change_opts(name, output, kwargs):
def _api_fullstatus(name, output, kwargs):
""" API: full history status"""
"""API: full history status"""
status = build_status(skip_dashboard=kwargs.get("skip_dashboard", 1), output=output)
return report(output, keyword="status", data=status)
def _api_history(name, output, kwargs):
""" API: accepts output, value(=nzo_id), start, limit, search, nzo_ids """
"""API: accepts output, value(=nzo_id), start, limit, search, nzo_ids"""
value = kwargs.get("value", "")
start = int_conv(kwargs.get("start"))
limit = int_conv(kwargs.get("limit"))
@@ -494,6 +470,9 @@ def _api_history(name, output, kwargs):
if categories and not isinstance(categories, list):
categories = [categories]
if nzo_ids and not isinstance(nzo_ids, list):
nzo_ids = nzo_ids.split(",")
if not limit:
limit = cfg.history_limit()
@@ -538,7 +517,7 @@ def _api_history(name, output, kwargs):
def _api_get_files(name, output, kwargs):
""" API: accepts output, value(=nzo_id) """
"""API: accepts output, value(=nzo_id)"""
value = kwargs.get("value")
if value:
return report(output, keyword="files", data=build_file_list(value))
@@ -547,7 +526,7 @@ def _api_get_files(name, output, kwargs):
def _api_addurl(name, output, kwargs):
""" API: accepts name, output, pp, script, cat, priority, nzbname """
"""API: accepts name, output, pp, script, cat, priority, nzbname"""
pp = kwargs.get("pp")
script = kwargs.get("script")
cat = kwargs.get("cat")
@@ -565,27 +544,27 @@ def _api_addurl(name, output, kwargs):
def _api_pause(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.Scheduler.plan_resume(0)
sabnzbd.Downloader.pause()
return report(output)
def _api_resume(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.Scheduler.plan_resume(0)
sabnzbd.unpause_all()
return report(output)
def _api_shutdown(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.shutdown_program()
return report(output)
def _api_warnings(name, output, kwargs):
""" API: accepts name, output """
"""API: accepts name, output"""
if name == "clear":
return report(output, keyword="warnings", data=sabnzbd.GUIHANDLER.clear())
elif name == "show":
@@ -596,22 +575,22 @@ def _api_warnings(name, output, kwargs):
def _api_get_cats(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, keyword="categories", data=list_cats(False))
def _api_get_scripts(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, keyword="scripts", data=list_scripts())
def _api_version(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, keyword="version", data=sabnzbd.__version__)
def _api_auth(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
auth = "None"
if not cfg.disable_key():
auth = "badkey"
@@ -629,7 +608,7 @@ def _api_auth(name, output, kwargs):
def _api_restart(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
logging.info("Restart requested by API")
# Do the shutdown async to still send goodbye to browser
Thread(target=sabnzbd.trigger_restart, kwargs={"timeout": 1}).start()
@@ -637,7 +616,7 @@ def _api_restart(name, output, kwargs):
def _api_restart_repair(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
logging.info("Queue repair requested by API")
sabnzbd.request_repair()
# Do the shutdown async to still send goodbye to browser
@@ -646,26 +625,26 @@ def _api_restart_repair(name, output, kwargs):
def _api_disconnect(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.Downloader.disconnect()
return report(output)
def _api_osx_icon(name, output, kwargs):
""" API: accepts output, value """
"""API: accepts output, value"""
value = kwargs.get("value", "1").strip()
cfg.osx_menu.set(value != "0")
return report(output)
def _api_rescan(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.NzbQueue.scan_jobs(all_jobs=False, action=True)
return report(output)
def _api_eval_sort(name, output, kwargs):
""" API: evaluate sorting expression """
"""API: evaluate sorting expression"""
name = kwargs.get("name", "")
value = kwargs.get("value", "")
title = kwargs.get("title")
@@ -678,43 +657,43 @@ def _api_eval_sort(name, output, kwargs):
def _api_watched_now(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.DirScanner.scan()
return report(output)
def _api_resume_pp(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.PostProcessor.paused = False
return report(output)
def _api_pause_pp(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sabnzbd.PostProcessor.paused = True
return report(output)
def _api_rss_now(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
# Run RSS scan async, because it can take a long time
sabnzbd.Scheduler.force_rss()
return report(output)
def _api_retry_all(name, output, kwargs):
""" API: Retry all failed items in History """
"""API: Retry all failed items in History"""
return report(output, keyword="status", data=retry_all_jobs())
def _api_reset_quota(name, output, kwargs):
""" Reset quota left """
"""Reset quota left"""
sabnzbd.BPSMeter.reset_quota(force=True)
return report(output)
def _api_test_email(name, output, kwargs):
""" API: send a test email, return result """
"""API: send a test email, return result"""
logging.info("Sending test email")
pack = {"download": ["action 1", "action 2"], "unpack": ["action 1", "action 2"]}
res = sabnzbd.emailer.endjob(
@@ -736,61 +715,61 @@ def _api_test_email(name, output, kwargs):
def _api_test_windows(name, output, kwargs):
""" API: send a test to Windows, return result """
"""API: send a test to Windows, return result"""
logging.info("Sending test notification")
res = sabnzbd.notifier.send_windows("SABnzbd", T("Test Notification"), "other")
return report(output, error=res)
def _api_test_notif(name, output, kwargs):
""" API: send a test to Notification Center, return result """
"""API: send a test to Notification Center, return result"""
logging.info("Sending test notification")
res = sabnzbd.notifier.send_notification_center("SABnzbd", T("Test Notification"), "other")
return report(output, error=res)
def _api_test_osd(name, output, kwargs):
""" API: send a test OSD notification, return result """
"""API: send a test OSD notification, return result"""
logging.info("Sending OSD notification")
res = sabnzbd.notifier.send_notify_osd("SABnzbd", T("Test Notification"))
return report(output, error=res)
def _api_test_prowl(name, output, kwargs):
""" API: send a test Prowl notification, return result """
"""API: send a test Prowl notification, return result"""
logging.info("Sending Prowl notification")
res = sabnzbd.notifier.send_prowl("SABnzbd", T("Test Notification"), "other", force=True, test=kwargs)
return report(output, error=res)
def _api_test_pushover(name, output, kwargs):
""" API: send a test Pushover notification, return result """
"""API: send a test Pushover notification, return result"""
logging.info("Sending Pushover notification")
res = sabnzbd.notifier.send_pushover("SABnzbd", T("Test Notification"), "other", force=True, test=kwargs)
return report(output, error=res)
def _api_test_pushbullet(name, output, kwargs):
""" API: send a test Pushbullet notification, return result """
"""API: send a test Pushbullet notification, return result"""
logging.info("Sending Pushbullet notification")
res = sabnzbd.notifier.send_pushbullet("SABnzbd", T("Test Notification"), "other", force=True, test=kwargs)
return report(output, error=res)
def _api_test_nscript(name, output, kwargs):
""" API: execute a test notification script, return result """
"""API: execute a test notification script, return result"""
logging.info("Executing notification script")
res = sabnzbd.notifier.send_nscript("SABnzbd", T("Test Notification"), "other", force=True, test=kwargs)
return report(output, error=res)
def _api_undefined(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, _MSG_NOT_IMPLEMENTED)
def _api_browse(name, output, kwargs):
""" Return tree of local path """
"""Return tree of local path"""
compact = kwargs.get("compact")
if compact and compact == "1":
@@ -804,14 +783,14 @@ def _api_browse(name, output, kwargs):
def _api_config(name, output, kwargs):
""" API: Dispatcher for "config" """
"""API: Dispatcher for "config" """
if cfg.configlock():
return report(output, _MSG_CONFIG_LOCKED)
return _api_config_table.get(name, (_api_config_undefined, 2))[0](output, kwargs)
def _api_config_speedlimit(output, kwargs):
""" API: accepts output, value(=speed) """
"""API: accepts output, value(=speed)"""
value = kwargs.get("value")
if not value:
value = "0"
@@ -820,12 +799,12 @@ def _api_config_speedlimit(output, kwargs):
def _api_config_get_speedlimit(output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, keyword="speedlimit", data=sabnzbd.Downloader.get_limit())
def _api_config_set_colorscheme(output, kwargs):
""" API: accepts output"""
"""API: accepts output"""
value = kwargs.get("value")
if value:
cfg.web_color.set(value)
@@ -835,21 +814,21 @@ def _api_config_set_colorscheme(output, kwargs):
def _api_config_set_pause(output, kwargs):
""" API: accepts output, value(=pause interval) """
"""API: accepts output, value(=pause interval)"""
value = kwargs.get("value")
sabnzbd.Scheduler.plan_resume(int_conv(value))
return report(output)
def _api_config_set_apikey(output, kwargs):
""" API: accepts output """
"""API: accepts output"""
cfg.api_key.set(config.create_api_key())
config.save_config()
return report(output, keyword="apikey", data=cfg.api_key())
def _api_config_set_nzbkey(output, kwargs):
""" API: accepts output """
"""API: accepts output"""
cfg.nzb_key.set(config.create_api_key())
config.save_config()
return report(output, keyword="nzbkey", data=cfg.nzb_key())
@@ -870,7 +849,7 @@ def _api_config_regenerate_certs(output, kwargs):
def _api_config_test_server(output, kwargs):
""" API: accepts output, server-params """
"""API: accepts output, server-params"""
result, msg = test_nntp_server_dict(kwargs)
response = {"result": result, "message": msg}
if output:
@@ -880,12 +859,12 @@ def _api_config_test_server(output, kwargs):
def _api_config_undefined(output, kwargs):
""" API: accepts output """
"""API: accepts output"""
return report(output, _MSG_NOT_IMPLEMENTED)
def _api_server_stats(name, output, kwargs):
""" API: accepts output """
"""API: accepts output"""
sum_t, sum_m, sum_w, sum_d = sabnzbd.BPSMeter.get_sums()
stats = {"total": sum_t, "month": sum_m, "week": sum_w, "day": sum_d, "servers": {}}
@@ -945,27 +924,27 @@ _api_table = {
"version": (_api_version, 1),
"auth": (_api_auth, 1),
"restart": (_api_restart, 3),
"restart_repair": (_api_restart_repair, 2),
"restart_repair": (_api_restart_repair, 3),
"disconnect": (_api_disconnect, 2),
"osx_icon": (_api_osx_icon, 3),
"gc_stats": (_api_gc_stats, 3),
"rescan": (_api_rescan, 2),
"eval_sort": (_api_eval_sort, 2),
"eval_sort": (_api_eval_sort, 3),
"watched_now": (_api_watched_now, 2),
"resume_pp": (_api_resume_pp, 2),
"pause_pp": (_api_pause_pp, 2),
"rss_now": (_api_rss_now, 2),
"browse": (_api_browse, 2),
"browse": (_api_browse, 3),
"retry_all": (_api_retry_all, 2),
"reset_quota": (_api_reset_quota, 2),
"test_email": (_api_test_email, 2),
"test_windows": (_api_test_windows, 2),
"test_notif": (_api_test_notif, 2),
"test_osd": (_api_test_osd, 2),
"test_pushover": (_api_test_pushover, 2),
"test_pushbullet": (_api_test_pushbullet, 2),
"test_prowl": (_api_test_prowl, 2),
"test_nscript": (_api_test_nscript, 2),
"reset_quota": (_api_reset_quota, 3),
"test_email": (_api_test_email, 3),
"test_windows": (_api_test_windows, 3),
"test_notif": (_api_test_notif, 3),
"test_osd": (_api_test_osd, 3),
"test_pushover": (_api_test_pushover, 3),
"test_pushbullet": (_api_test_pushbullet, 3),
"test_prowl": (_api_test_prowl, 3),
"test_nscript": (_api_test_nscript, 3),
}
_api_queue_table = {
@@ -985,23 +964,24 @@ _api_config_table = {
"speedlimit": (_api_config_speedlimit, 2),
"set_speedlimit": (_api_config_speedlimit, 2),
"get_speedlimit": (_api_config_get_speedlimit, 2),
"set_colorscheme": (_api_config_set_colorscheme, 2),
"set_pause": (_api_config_set_pause, 2),
"set_colorscheme": (_api_config_set_colorscheme, 3),
"set_apikey": (_api_config_set_apikey, 3),
"set_nzbkey": (_api_config_set_nzbkey, 3),
"regenerate_certs": (_api_config_regenerate_certs, 3),
"test_server": (_api_config_test_server, 2),
"test_server": (_api_config_test_server, 3),
}
def api_level(cmd, name):
""" Return access level required for this API call """
if cmd in _api_table:
return _api_table[cmd][1]
if name == "queue" and cmd in _api_queue_table:
return _api_queue_table[cmd][1]
if name == "config" and cmd in _api_config_table:
return _api_config_table[cmd][1]
def api_level(mode: str, name: str) -> int:
"""Return access level required for this API call"""
if mode == "queue" and name in _api_queue_table:
return _api_queue_table[name][1]
if mode == "config" and name in _api_config_table:
return _api_config_table[name][1]
if mode in _api_table:
return _api_table[mode][1]
# It is invalid if it's none of these, but that's is handled somewhere else
return 4
@@ -1022,7 +1002,7 @@ def report(output, error=None, keyword="value", data=None):
info = data
else:
info = {keyword: data}
response = json.dumps(info).encode("utf-8")
response = utob(json.dumps(info))
elif output == "xml":
if not keyword:
@@ -1111,7 +1091,7 @@ class xml_factory:
def handle_server_api(output, kwargs):
""" Special handler for API-call 'set_config' [servers] """
"""Special handler for API-call 'set_config' [servers]"""
name = kwargs.get("keyword")
if not name:
name = kwargs.get("name")
@@ -1129,7 +1109,7 @@ def handle_server_api(output, kwargs):
def handle_rss_api(output, kwargs):
""" Special handler for API-call 'set_config' [rss] """
"""Special handler for API-call 'set_config' [rss]"""
name = kwargs.get("keyword")
if not name:
name = kwargs.get("name")
@@ -1163,7 +1143,7 @@ def handle_rss_api(output, kwargs):
def handle_cat_api(output, kwargs):
""" Special handler for API-call 'set_config' [categories] """
"""Special handler for API-call 'set_config' [categories]"""
name = kwargs.get("keyword")
if not name:
name = kwargs.get("name")
@@ -1188,6 +1168,7 @@ def build_status(skip_dashboard=False, output=None):
info["loglevel"] = str(cfg.log_level())
info["folders"] = sabnzbd.NzbQueue.scan_jobs(all_jobs=False, action=False)
info["configfn"] = config.get_filename()
info["warnings"] = sabnzbd.GUIHANDLER.content()
# Dashboard: Speed of System
info["cpumodel"] = getcpu()
@@ -1217,42 +1198,22 @@ def build_status(skip_dashboard=False, output=None):
info["dnslookup"] = None
info["servers"] = []
servers = sorted(sabnzbd.Downloader.servers[:], key=lambda svr: "%02d%s" % (svr.priority, svr.displayname.lower()))
for server in servers:
# Servers-list could be modified during iteration, so we need a copy
for server in sabnzbd.Downloader.servers[:]:
connected = sum(nw.connected for nw in server.idle_threads[:])
serverconnections = []
connected = 0
for nw in server.idle_threads[:]:
if nw.connected:
connected += 1
for nw in server.busy_threads[:]:
article = nw.article
art_name = ""
nzf_name = ""
nzo_name = ""
if article:
nzf = article.nzf
nzo = nzf.nzo
art_name = article.article
# filename field is not always present
try:
nzf_name = nzf.filename
except: # attribute error
nzf_name = nzf.subject
nzo_name = nzo.final_name
# For the templates or for JSON
if output:
thread_info = {"thrdnum": nw.thrdnum, "art_name": art_name, "nzf_name": nzf_name, "nzo_name": nzo_name}
serverconnections.append(thread_info)
else:
serverconnections.append((nw.thrdnum, art_name, nzf_name, nzo_name))
if nw.connected:
connected += 1
if nw.article:
serverconnections.append(
{
"thrdnum": nw.thrdnum,
"art_name": nw.article.article,
"nzf_name": nw.article.nzf.filename,
"nzo_name": nw.article.nzf.nzo.final_name,
}
)
if server.warning and not (connected or server.errormsg):
connected = server.warning
@@ -1260,38 +1221,20 @@ def build_status(skip_dashboard=False, output=None):
if server.request and not server.info:
connected = T("&nbsp;Resolving address").replace("&nbsp;", "")
# For the templates or for JSON
if output:
server_info = {
"servername": server.displayname,
"serveractiveconn": connected,
"servertotalconn": server.threads,
"serverconnections": serverconnections,
"serverssl": server.ssl,
"serversslinfo": server.ssl_info,
"serveractive": server.active,
"servererror": server.errormsg,
"serverpriority": server.priority,
"serveroptional": server.optional,
"serverbps": to_units(sabnzbd.BPSMeter.server_bps.get(server.id, 0)),
}
info["servers"].append(server_info)
else:
info["servers"].append(
(
server.displayname,
"",
connected,
serverconnections,
server.ssl,
server.active,
server.errormsg,
server.priority,
server.optional,
)
)
info["warnings"] = sabnzbd.GUIHANDLER.content()
server_info = {
"servername": server.displayname,
"serveractiveconn": connected,
"servertotalconn": server.threads,
"serverconnections": serverconnections,
"serverssl": server.ssl,
"serversslinfo": server.ssl_info,
"serveractive": server.active,
"servererror": server.errormsg,
"serverpriority": server.priority,
"serveroptional": server.optional,
"serverbps": to_units(sabnzbd.BPSMeter.server_bps.get(server.id, 0)),
}
info["servers"].append(server_info)
return info
@@ -1407,7 +1350,7 @@ def build_queue(start=0, limit=0, trans=False, output=None, search=None, nzo_ids
def fast_queue() -> Tuple[bool, int, float, str]:
""" Return paused, bytes_left, bpsnow, time_left """
"""Return paused, bytes_left, bpsnow, time_left"""
bytes_left = sabnzbd.sabnzbd.NzbQueue.remaining()
paused = sabnzbd.Downloader.paused
bpsnow = sabnzbd.BPSMeter.bps
@@ -1429,7 +1372,7 @@ def build_file_list(nzo_id: str):
for nzf in finished_files:
jobs.append(
{
"filename": nzf.filename if nzf.filename else nzf.subject,
"filename": nzf.filename,
"mbleft": "%.2f" % (nzf.bytes_left / MEBI),
"mb": "%.2f" % (nzf.bytes / MEBI),
"bytes": "%.2f" % nzf.bytes,
@@ -1442,7 +1385,7 @@ def build_file_list(nzo_id: str):
for nzf in active_files:
jobs.append(
{
"filename": nzf.filename if nzf.filename else nzf.subject,
"filename": nzf.filename,
"mbleft": "%.2f" % (nzf.bytes_left / MEBI),
"mb": "%.2f" % (nzf.bytes / MEBI),
"bytes": "%.2f" % nzf.bytes,
@@ -1455,7 +1398,7 @@ def build_file_list(nzo_id: str):
for nzf in queued_files:
jobs.append(
{
"filename": nzf.filename if nzf.filename else nzf.subject,
"filename": nzf.filename,
"set": nzf.setname,
"mbleft": "%.2f" % (nzf.bytes_left / MEBI),
"mb": "%.2f" % (nzf.bytes / MEBI),
@@ -1487,7 +1430,7 @@ def options_list(output):
def retry_job(job, new_nzb=None, password=None):
""" Re enter failed job in the download queue """
"""Re enter failed job in the download queue"""
if job:
history_db = sabnzbd.get_db_connection()
futuretype, url, pp, script, cat = history_db.get_other(job)
@@ -1504,7 +1447,7 @@ def retry_job(job, new_nzb=None, password=None):
def retry_all_jobs():
""" Re enter all failed jobs in the download queue """
"""Re enter all failed jobs in the download queue"""
# Fetch all retryable folders from History
items = sabnzbd.api.build_history()[0]
nzo_ids = []
@@ -1515,14 +1458,14 @@ def retry_all_jobs():
def del_job_files(job_paths):
""" Remove files of each path in the list """
"""Remove files of each path in the list"""
for path in job_paths:
if path and clip_path(path).lower().startswith(cfg.download_dir.get_clipped_path().lower()):
remove_all(path, recursive=True)
def del_hist_job(job, del_files):
""" Remove history element """
"""Remove history element"""
if job:
path = sabnzbd.PostProcessor.get_path(job)
if path:
@@ -1534,7 +1477,7 @@ def del_hist_job(job, del_files):
def Tspec(txt):
""" Translate special terms """
"""Translate special terms"""
if txt == "None":
return T("None")
elif txt in ("Default", "*"):
@@ -1563,14 +1506,14 @@ def Ttemplate(txt):
def clear_trans_cache():
""" Clean cache for skin translations """
"""Clean cache for skin translations"""
global _SKIN_CACHE
_SKIN_CACHE = {}
sabnzbd.WEBUI_READY = True
def build_header(webdir="", output=None, trans_functions=True):
""" Build the basic header """
"""Build the basic header"""
try:
uptime = calc_age(sabnzbd.START)
except:
@@ -1648,7 +1591,7 @@ def build_header(webdir="", output=None, trans_functions=True):
def build_queue_header(search=None, nzo_ids=None, start=0, limit=0, output=None):
""" Build full queue header """
"""Build full queue header"""
header = build_header(output=output)
@@ -1685,7 +1628,14 @@ def build_queue_header(search=None, nzo_ids=None, start=0, limit=0, output=None)
return header, qnfo.list, bytespersec, qnfo.q_fullsize, qnfo.bytes_left_previous_page
def build_history(start=0, limit=0, search=None, failed_only=0, categories=None, nzo_ids=None):
def build_history(
start: int = 0,
limit: int = 0,
search: Optional[str] = None,
failed_only: int = 0,
categories: Optional[List[str]] = None,
nzo_ids: Optional[List[str]] = None,
):
"""Combine the jobs still in post-processing and the database history"""
if not limit:
limit = 1000000
@@ -1696,7 +1646,7 @@ def build_history(start=0, limit=0, search=None, failed_only=0, categories=None,
# Filter out any items that don't match the search term or category
if postproc_queue:
# It would be more efficient to iterate only once, but we accept the penalty for code clarity
if isinstance(search, list):
if isinstance(categories, list):
postproc_queue = [nzo for nzo in postproc_queue if nzo.cat in categories]
if isinstance(search, str):
@@ -1708,6 +1658,9 @@ def build_history(start=0, limit=0, search=None, failed_only=0, categories=None,
except:
logging.error(T("Failed to compile regex for search term: %s"), search_text)
if nzo_ids:
postproc_queue = [nzo for nzo in postproc_queue if nzo.nzo_id in nzo_ids]
# Multi-page support for postproc items
postproc_queue_size = len(postproc_queue)
if start > postproc_queue_size:
@@ -1792,7 +1745,7 @@ def build_history(start=0, limit=0, search=None, failed_only=0, categories=None,
def get_active_history(queue, items):
""" Get the currently in progress and active history queue. """
"""Get the currently in progress and active history queue."""
for nzo in queue:
item = {}
(
@@ -1835,7 +1788,7 @@ def get_active_history(queue, items):
def calc_timeleft(bytesleft, bps):
""" Calculate the time left in the format HH:MM:SS """
"""Calculate the time left in the format HH:MM:SS"""
try:
if bytesleft <= 0:
return "0:00:00"
@@ -1887,7 +1840,7 @@ def plural_to_single(kw, def_kw=""):
def del_from_section(kwargs):
""" Remove keyword in section """
"""Remove keyword in section"""
section = kwargs.get("section", "")
if section in ("servers", "rss", "categories"):
keyword = kwargs.get("keyword")
@@ -1905,7 +1858,7 @@ def del_from_section(kwargs):
def history_remove_failed():
""" Remove all failed jobs from history, including files """
"""Remove all failed jobs from history, including files"""
logging.info("Scheduled removal of all failed jobs")
with HistoryDB() as history_db:
del_job_files(history_db.get_failed_paths())
@@ -1913,7 +1866,7 @@ def history_remove_failed():
def history_remove_completed():
""" Remove all completed jobs from history """
"""Remove all completed jobs from history"""
logging.info("Scheduled removal of all completed jobs")
with HistoryDB() as history_db:
history_db.remove_completed()

View File

@@ -55,7 +55,7 @@ class ArticleCache:
return ANFO(len(self.__article_table), abs(self.__cache_size), self.__cache_limit_org)
def new_limit(self, limit: int):
""" Called when cache limit changes """
"""Called when cache limit changes"""
self.__cache_limit_org = limit
if limit < 0:
self.__cache_limit = self.__cache_upper_limit
@@ -70,20 +70,20 @@ class ArticleCache:
@synchronized(ARTICLE_COUNTER_LOCK)
def reserve_space(self, data_size: int):
""" Reserve space in the cache """
"""Reserve space in the cache"""
self.__cache_size += data_size
@synchronized(ARTICLE_COUNTER_LOCK)
def free_reserved_space(self, data_size: int):
""" Remove previously reserved space """
"""Remove previously reserved space"""
self.__cache_size -= data_size
def space_left(self) -> bool:
""" Is there space left in the set limit? """
"""Is there space left in the set limit?"""
return self.__cache_size < self.__cache_limit
def save_article(self, article: Article, data: bytes):
""" Save article in cache, either memory or disk """
"""Save article in cache, either memory or disk"""
nzo = article.nzf.nzo
if nzo.is_gone():
# Do not discard this article because the
@@ -115,7 +115,7 @@ class ArticleCache:
self.__flush_article_to_disk(article, data)
def load_article(self, article: Article):
""" Load the data of the article """
"""Load the data of the article"""
data = None
nzo = article.nzf.nzo
@@ -145,7 +145,7 @@ class ArticleCache:
logging.debug("Failed to flush item from cache, probably already deleted or written to disk")
def purge_articles(self, articles: List[Article]):
""" Remove all saved articles, from memory and disk """
"""Remove all saved articles, from memory and disk"""
logging.debug("Purging %s articles from the cache/disk", len(articles))
for article in articles:
if article in self.__article_table:

View File

@@ -30,7 +30,14 @@ from typing import Tuple, Optional, List
import sabnzbd
from sabnzbd.misc import get_all_passwords, match_str
from sabnzbd.filesystem import set_permissions, clip_path, has_win_device, diskspace, get_filename, get_ext
from sabnzbd.filesystem import (
set_permissions,
clip_path,
has_win_device,
diskspace,
get_filename,
has_unwanted_extension,
)
from sabnzbd.constants import Status, GIGI, MAX_ASSEMBLER_QUEUE
import sabnzbd.cfg as cfg
from sabnzbd.nzbstuff import NzbObject, NzbFile
@@ -259,7 +266,7 @@ SAFE_EXTS = (".mkv", ".mp4", ".avi", ".wmv", ".mpg", ".webm")
def is_cloaked(nzo: NzbObject, path: str, names: List[str]) -> bool:
""" Return True if this is likely to be a cloaked encrypted post """
"""Return True if this is likely to be a cloaked encrypted post"""
fname = os.path.splitext(get_filename(path.lower()))[0]
for name in names:
name = get_filename(name.lower())
@@ -288,7 +295,7 @@ def is_cloaked(nzo: NzbObject, path: str, names: List[str]) -> bool:
def check_encrypted_and_unwanted_files(nzo: NzbObject, filepath: str) -> Tuple[bool, Optional[str]]:
""" Combines check for unwanted and encrypted files to save on CPU and IO """
"""Combines check for unwanted and encrypted files to save on CPU and IO"""
encrypted = False
unwanted = None
@@ -346,7 +353,7 @@ def check_encrypted_and_unwanted_files(nzo: NzbObject, filepath: str) -> Tuple[b
except rarfile.RarCRCError as e:
# CRC errors can be thrown for wrong password or
# missing the next volume (with correct password)
if "cannot find volume" in str(e).lower():
if match_str(str(e), ("cannot find volume", "unexpected end of archive")):
# We assume this one worked!
password_hit = password
break
@@ -377,7 +384,7 @@ def check_encrypted_and_unwanted_files(nzo: NzbObject, filepath: str) -> Tuple[b
if cfg.unwanted_extensions() and cfg.action_on_unwanted_extensions():
for somefile in zf.namelist():
logging.debug("File contains: %s", somefile)
if get_ext(somefile).replace(".", "").lower() in cfg.unwanted_extensions():
if has_unwanted_extension(somefile):
logging.debug("Unwanted file %s", somefile)
unwanted = somefile
zf.close()

View File

@@ -26,6 +26,7 @@ from typing import List, Dict, Optional
import sabnzbd
from sabnzbd.constants import BYTES_FILE_NAME, KIBI
from sabnzbd.misc import to_units
import sabnzbd.cfg as cfg
DAY = float(24 * 60 * 60)
@@ -38,14 +39,14 @@ RE_HHMM = re.compile(r"(\d+):(\d+)\s*$")
def tomorrow(t: float) -> float:
""" Return timestamp for tomorrow (midnight) """
"""Return timestamp for tomorrow (midnight)"""
now = time.localtime(t)
ntime = (now[0], now[1], now[2], 0, 0, 0, now[6], now[7], now[8])
return time.mktime(ntime) + DAY
def this_week(t: float) -> float:
""" Return timestamp for start of this week (monday) """
"""Return timestamp for start of this week (monday)"""
while 1:
tm = time.localtime(t)
if tm.tm_wday == 0:
@@ -56,19 +57,19 @@ def this_week(t: float) -> float:
def next_week(t: float) -> float:
""" Return timestamp for start of next week (monday) """
"""Return timestamp for start of next week (monday)"""
return this_week(t) + WEEK
def this_month(t: float) -> float:
""" Return timestamp for start of next month """
"""Return timestamp for start of next month"""
now = time.localtime(t)
ntime = (now[0], now[1], 1, 0, 0, 0, 0, 0, now[8])
return time.mktime(ntime)
def last_month_day(tm: time.struct_time) -> int:
""" Return last day of this month """
"""Return last day of this month"""
year, month = tm[:2]
day = DAYS[month]
# This simple formula for leap years is good enough
@@ -78,7 +79,7 @@ def last_month_day(tm: time.struct_time) -> int:
def next_month(t: float) -> float:
""" Return timestamp for start of next month """
"""Return timestamp for start of next month"""
now = time.localtime(t)
month = now.tm_mon + 1
year = now.tm_year
@@ -90,6 +91,38 @@ def next_month(t: float) -> float:
class BPSMeter:
__slots__ = (
"start_time",
"log_time",
"speed_log_time",
"last_update",
"bps",
"bps_list",
"server_bps",
"cached_amount",
"sum_cached_amount",
"day_total",
"week_total",
"month_total",
"grand_total",
"timeline_total",
"article_stats_tried",
"article_stats_failed",
"day_label",
"end_of_day",
"end_of_week",
"end_of_month",
"q_day",
"q_period",
"quota",
"left",
"have_quota",
"q_time",
"q_hour",
"q_minute",
"quota_enabled",
)
def __init__(self):
t = time.time()
self.start_time = t
@@ -100,6 +133,8 @@ class BPSMeter:
self.bps_list: List[int] = []
self.server_bps: Dict[str, float] = {}
self.cached_amount: Dict[str, int] = {}
self.sum_cached_amount: int = 0
self.day_total: Dict[str, int] = {}
self.week_total: Dict[str, int] = {}
self.month_total: Dict[str, int] = {}
@@ -125,7 +160,7 @@ class BPSMeter:
self.quota_enabled: bool = True # Scheduled quota enable/disable
def save(self):
""" Save admin to disk """
"""Save admin to disk"""
sabnzbd.save_admin(
(
self.last_update,
@@ -147,7 +182,7 @@ class BPSMeter:
)
def defaults(self):
""" Get the latest data from the database and assign to a fake server """
"""Get the latest data from the database and assign to a fake server"""
logging.debug("Setting default BPS meter values")
with sabnzbd.database.HistoryDB() as history_db:
grand, month, week = history_db.get_history_size()
@@ -164,7 +199,7 @@ class BPSMeter:
self.quota = self.left = cfg.quota_size.get_float()
def read(self):
""" Read admin from disk, return True when pause is needed """
"""Read admin from disk, return True when pause is needed"""
res = False
quota = self.left = cfg.quota_size.get_float() # Quota for this period
self.have_quota = bool(cfg.quota_size())
@@ -189,6 +224,12 @@ class BPSMeter:
if len(data) > 12:
self.article_stats_tried, self.article_stats_failed = data[12:14]
# Clean the data, it could have invalid values in older versions
for server in self.timeline_total:
for data_data in self.timeline_total[server]:
if not isinstance(self.timeline_total[server][data_data], int):
self.timeline_total[server][data_data] = 0
# Trigger quota actions
if abs(quota - self.quota) > 0.5:
self.change_quota()
@@ -197,74 +238,99 @@ class BPSMeter:
self.defaults()
return res
def update(self, server: Optional[str] = None, amount: int = 0):
""" Update counters for "server" with "amount" bytes """
t = time.time()
if t > self.end_of_day:
# current day passed. get new end of day
self.day_label = time.strftime("%Y-%m-%d")
self.day_total = {}
self.end_of_day = tomorrow(t) - 1.0
def init_server_stats(self, server: str = None):
"""Initialize counters for "server" """
if server not in self.cached_amount:
self.cached_amount[server] = 0
self.server_bps[server] = 0.0
if server not in self.day_total:
self.day_total[server] = 0
if server not in self.week_total:
self.week_total[server] = 0
if server not in self.month_total:
self.month_total[server] = 0
if server not in self.month_total:
self.month_total[server] = 0
if server not in self.grand_total:
self.grand_total[server] = 0
if server not in self.timeline_total:
self.timeline_total[server] = {}
if self.day_label not in self.timeline_total[server]:
self.timeline_total[server][self.day_label] = 0
if server not in self.server_bps:
self.server_bps[server] = 0.0
if server not in self.article_stats_tried:
self.article_stats_tried[server] = {}
self.article_stats_failed[server] = {}
if self.day_label not in self.article_stats_tried[server]:
self.article_stats_tried[server][self.day_label] = 0
self.article_stats_failed[server][self.day_label] = 0
def update(self, server: Optional[str] = None, amount: int = 0):
"""Update counters for "server" with "amount" bytes"""
# Add amount to temporary storage
if server:
self.cached_amount[server] += amount
self.sum_cached_amount += amount
return
t = time.time()
if t > self.end_of_day:
# Current day passed, get new end of day
self.day_label = time.strftime("%Y-%m-%d")
self.end_of_day = tomorrow(t) - 1.0
self.day_total = {}
# Check end of week and end of month
if t > self.end_of_week:
self.week_total = {}
self.end_of_week = next_week(t) - 1.0
if t > self.end_of_month:
self.month_total = {}
self.end_of_month = next_month(t) - 1.0
if server:
if server not in self.day_total:
self.day_total[server] = 0
self.day_total[server] += amount
# Need to reset all counters
for server in sabnzbd.Downloader.servers[:]:
self.init_server_stats(server.id)
if server not in self.week_total:
self.week_total[server] = 0
self.week_total[server] += amount
# Add amounts that have been stored temporarily to statistics
for srv in self.cached_amount:
if self.cached_amount[srv]:
self.day_total[srv] += self.cached_amount[srv]
self.week_total[srv] += self.cached_amount[srv]
self.month_total[srv] += self.cached_amount[srv]
self.grand_total[srv] += self.cached_amount[srv]
self.timeline_total[srv][self.day_label] += self.cached_amount[srv]
if server not in self.month_total:
self.month_total[server] = 0
self.month_total[server] += amount
# Update server bps
try:
self.server_bps[srv] = (
self.server_bps[srv] * (self.last_update - self.start_time) + self.cached_amount[srv]
) / (t - self.start_time)
except ZeroDivisionError:
self.server_bps[srv] = 0.0
if server not in self.grand_total:
self.grand_total[server] = 0
self.grand_total[server] += amount
# Reset for next time
self.cached_amount[srv] = 0
if server not in self.timeline_total:
self.timeline_total[server] = {}
if self.day_label not in self.timeline_total[server]:
self.timeline_total[server][self.day_label] = 0
self.timeline_total[server][self.day_label] += amount
# Quota check
if self.have_quota and self.quota_enabled:
self.left -= amount
if self.left <= 0.0:
if not sabnzbd.Downloader.paused:
sabnzbd.Downloader.pause()
logging.warning(T("Quota spent, pausing downloading"))
# Quota check
if self.have_quota and self.quota_enabled:
self.left -= self.sum_cached_amount
if self.left <= 0.0:
if not sabnzbd.Downloader.paused:
sabnzbd.Downloader.pause()
logging.warning(T("Quota spent, pausing downloading"))
# Speedometer
try:
self.bps = (self.bps * (self.last_update - self.start_time) + amount) / (t - self.start_time)
except:
self.bps = (self.bps * (self.last_update - self.start_time) + self.sum_cached_amount) / (
t - self.start_time
)
except ZeroDivisionError:
self.bps = 0.0
self.server_bps = {}
if server and server not in self.server_bps:
self.server_bps[server] = 0.0
for server_to_update in self.server_bps:
try:
# Only add data to the current server, update the rest to get correct average speed
self.server_bps[server_to_update] = (
self.server_bps[server_to_update] * (self.last_update - self.start_time)
+ amount * (server_to_update == server)
) / (t - self.start_time)
except:
self.server_bps[server_to_update] = 0.0
self.sum_cached_amount = 0
self.last_update = t
check_time = t - 5.0
@@ -276,7 +342,7 @@ class BPSMeter:
self.reset()
elif self.log_time < check_time:
logging.debug("bps: %s", self.bps)
logging.debug("Speed: %sB/s", to_units(self.bps))
self.log_time = t
if self.speed_log_time < (t - 1.0):
@@ -286,20 +352,10 @@ class BPSMeter:
def register_server_article_tried(self, server: str):
"""Keep track how many articles were tried for each server"""
if server not in self.article_stats_tried:
self.article_stats_tried[server] = {}
self.article_stats_failed[server] = {}
if self.day_label not in self.article_stats_tried[server]:
self.article_stats_tried[server][self.day_label] = 0
self.article_stats_failed[server][self.day_label] = 0
# Update the counters
self.article_stats_tried[server][self.day_label] += 1
def register_server_article_failed(self, server: str):
"""Keep track how many articles failed for each server"""
# This function is always called after the one above,
# so we can skip the check if the keys in the dict exist
self.article_stats_failed[server][self.day_label] += 1
def reset(self):
@@ -307,8 +363,11 @@ class BPSMeter:
self.start_time = t
self.log_time = t
self.last_update = t
# Reset general BPS and the for all servers
self.bps = 0.0
self.server_bps = {}
for server in self.server_bps:
self.server_bps[server] = 0.0
def add_empty_time(self):
# Extra zeros, but never more than the maximum!
@@ -321,7 +380,7 @@ class BPSMeter:
self.bps_list = self.bps_list[len(self.bps_list) - BPS_LIST_MAX :]
def get_sums(self):
""" return tuple of grand, month, week, day totals """
"""return tuple of grand, month, week, day totals"""
return (
sum([v for v in self.grand_total.values()]),
sum([v for v in self.month_total.values()]),
@@ -330,7 +389,7 @@ class BPSMeter:
)
def amounts(self, server: str):
""" Return grand, month, week, day and article totals for specified server """
"""Return grand, month, week, day and article totals for specified server"""
return (
self.grand_total.get(server, 0),
self.month_total.get(server, 0),
@@ -342,7 +401,7 @@ class BPSMeter:
)
def clear_server(self, server: str):
""" Clean counters for specified server """
"""Clean counters for specified server"""
if server in self.day_total:
del self.day_total[server]
if server in self.week_total:
@@ -357,6 +416,7 @@ class BPSMeter:
del self.article_stats_tried[server]
if server in self.article_stats_failed:
del self.article_stats_failed[server]
self.init_server_stats(server)
self.save()
def get_bps_list(self):
@@ -407,7 +467,7 @@ class BPSMeter:
return True
def next_reset(self, t: Optional[float] = None):
""" Determine next reset time """
"""Determine next reset time"""
t = t or time.time()
tm = time.localtime(t)
if self.q_period == "d":
@@ -438,7 +498,7 @@ class BPSMeter:
logging.debug("Will reset quota at %s", tm)
def change_quota(self, allow_resume: bool = True):
""" Update quota, potentially pausing downloader """
"""Update quota, potentially pausing downloader"""
if not self.have_quota and self.quota < 0.5:
# Never set, use last period's size
per = cfg.quota_period()
@@ -468,7 +528,7 @@ class BPSMeter:
self.resume()
def get_quota(self):
""" If quota active, return check-function, hour, minute """
"""If quota active, return check-function, hour, minute"""
if self.have_quota:
self.q_period = cfg.quota_period()[0].lower()
self.q_day = 1
@@ -497,24 +557,19 @@ class BPSMeter:
return None, 0, 0
def set_status(self, status: bool, action: bool = True):
""" Disable/enable quota management """
"""Disable/enable quota management"""
self.quota_enabled = status
if action and not status:
self.resume()
@staticmethod
def resume():
""" Resume downloading """
"""Resume downloading"""
if cfg.quota_resume() and sabnzbd.Downloader.paused:
sabnzbd.Downloader.resume()
def midnight(self):
""" Midnight action: dummy update for all servers """
for server in self.day_total.keys():
self.update(server)
def quota_handler():
""" To be called from scheduler """
"""To be called from scheduler"""
logging.debug("Checking quota")
sabnzbd.BPSMeter.reset_quota()

View File

@@ -69,7 +69,7 @@ def validate_email(value):
def validate_server(value):
""" Check if server non-empty"""
"""Check if server non-empty"""
global email_endjob, email_full, email_rss
if value == "" and (email_endjob() or email_full() or email_rss()):
return T("Server address required"), None
@@ -78,7 +78,7 @@ def validate_server(value):
def validate_script(value):
""" Check if value is a valid script """
"""Check if value is a valid script"""
if not sabnzbd.__INITIALIZED__ or (value and sabnzbd.filesystem.is_valid_script(value)):
return None, value
elif (value and value == "None") or not value:
@@ -133,7 +133,6 @@ https_chain = OptionDir("misc", "https_chain", create=False)
enable_https = OptionBool("misc", "enable_https", False)
# 0=local-only, 1=nzb, 2=api, 3=full_api, 4=webui, 5=webui with login for external
inet_exposure = OptionNumber("misc", "inet_exposure", 0, protect=True)
local_ranges = OptionList("misc", "local_ranges", protect=True)
api_key = OptionStr("misc", "api_key", create_api_key())
nzb_key = OptionStr("misc", "nzb_key", create_api_key())
@@ -196,6 +195,7 @@ sanitize_safe = OptionBool("misc", "sanitize_safe", False)
cleanup_list = OptionList("misc", "cleanup_list")
unwanted_extensions = OptionList("misc", "unwanted_extensions")
action_on_unwanted_extensions = OptionNumber("misc", "action_on_unwanted_extensions", 0)
unwanted_extensions_mode = OptionNumber("misc", "unwanted_extensions_mode", 0)
new_nzb_on_failure = OptionBool("misc", "new_nzb_on_failure", False)
history_retention = OptionStr("misc", "history_retention", "0")
enable_meta = OptionBool("misc", "enable_meta", True)
@@ -283,7 +283,6 @@ keep_awake = OptionBool("misc", "keep_awake", True)
win_menu = OptionBool("misc", "win_menu", True)
allow_incomplete_nzb = OptionBool("misc", "allow_incomplete_nzb", False)
enable_broadcast = OptionBool("misc", "enable_broadcast", True)
max_art_opt = OptionBool("misc", "max_art_opt", False)
ipv6_hosting = OptionBool("misc", "ipv6_hosting", False)
fixed_ports = OptionBool("misc", "fixed_ports", False)
api_warnings = OptionBool("misc", "api_warnings", True, protect=True)
@@ -307,6 +306,7 @@ marker_file = OptionStr("misc", "nomedia_marker")
ipv6_servers = OptionNumber("misc", "ipv6_servers", 1, 0, 2)
url_base = OptionStr("misc", "url_base", "/sabnzbd", validation=validate_strip_right_slash)
host_whitelist = OptionList("misc", "host_whitelist", validation=all_lowercase)
local_ranges = OptionList("misc", "local_ranges", protect=True)
max_url_retries = OptionNumber("misc", "max_url_retries", 10, 1)
downloader_sleep_time = OptionNumber("misc", "downloader_sleep_time", 10, 0)
ssdp_broadcast_interval = OptionNumber("misc", "ssdp_broadcast_interval", 15, 1, 600)

View File

@@ -52,7 +52,7 @@ RE_PARAMFINDER = re.compile(r"""(?:'.*?')|(?:".*?")|(?:[^'",\s][^,]*)""")
class Option:
""" Basic option class, basic fields """
"""Basic option class, basic fields"""
def __init__(self, section: str, keyword: str, default_val: Any = None, add: bool = True, protect: bool = False):
"""Basic option
@@ -81,7 +81,7 @@ class Option:
anchor[keyword] = self
def get(self) -> Any:
""" Retrieve value field """
"""Retrieve value field"""
if self.__value is not None:
return self.__value
else:
@@ -91,11 +91,11 @@ class Option:
return str(self.get())
def get_dict(self, safe: bool = False) -> Dict[str, Any]:
""" Return value a dictionary """
"""Return value a dictionary"""
return {self.__keyword: self.get()}
def set_dict(self, values: Dict[str, Any]):
""" Set value based on dictionary """
"""Set value based on dictionary"""
if not self.__protect:
try:
self.set(values["value"])
@@ -103,7 +103,7 @@ class Option:
pass
def set(self, value: Any):
""" Set new value, no validation """
"""Set new value, no validation"""
global modified
if value is not None:
if isinstance(value, list) or isinstance(value, dict) or value != self.__value:
@@ -116,11 +116,11 @@ class Option:
return self.__default_val
def callback(self, callback: Callable):
""" Set callback function """
"""Set callback function"""
self.__callback = callback
def ident(self):
""" Return section-list and keyword """
"""Return section-list and keyword"""
return self.__sections, self.__keyword
@@ -145,7 +145,7 @@ class OptionNumber(Option):
super().__init__(section, keyword, default_val, add=add, protect=protect)
def set(self, value: Any):
""" set new value, limited by range """
"""set new value, limited by range"""
if value is not None:
try:
if self.__int:
@@ -165,12 +165,12 @@ class OptionNumber(Option):
super().set(value)
def __call__(self) -> Union[int, float]:
""" get() replacement """
"""get() replacement"""
return self.get()
class OptionBool(Option):
""" Boolean option class, always returns 0 or 1."""
"""Boolean option class, always returns 0 or 1."""
def __init__(self, section: str, keyword: str, default_val: bool = False, add: bool = True, protect: bool = False):
super().__init__(section, keyword, int(default_val), add=add, protect=protect)
@@ -180,12 +180,12 @@ class OptionBool(Option):
super().set(sabnzbd.misc.int_conv(value))
def __call__(self) -> int:
""" get() replacement """
"""get() replacement"""
return int(self.get())
class OptionDir(Option):
""" Directory option class """
"""Directory option class"""
def __init__(
self,
@@ -206,7 +206,7 @@ class OptionDir(Option):
super().__init__(section, keyword, default_val, add=add)
def get(self) -> str:
""" Return value, corrected for platform """
"""Return value, corrected for platform"""
p = super().get()
if sabnzbd.WIN32:
return p.replace("/", "\\") if "/" in p else p
@@ -214,7 +214,7 @@ class OptionDir(Option):
return p.replace("\\", "/") if "\\" in p else p
def get_path(self) -> str:
""" Return full absolute path """
"""Return full absolute path"""
value = self.get()
path = ""
if value:
@@ -224,11 +224,11 @@ class OptionDir(Option):
return path
def get_clipped_path(self) -> str:
""" Return clipped full absolute path """
"""Return clipped full absolute path"""
return clip_path(self.get_path())
def test_path(self) -> bool:
""" Return True if path exists """
"""Return True if path exists"""
value = self.get()
if value:
return os.path.exists(real_path(self.__root, value))
@@ -236,7 +236,7 @@ class OptionDir(Option):
return False
def set_root(self, root: str):
""" Set new root, is assumed to be valid """
"""Set new root, is assumed to be valid"""
self.__root = root
def set(self, value: str, create: bool = False) -> Optional[str]:
@@ -260,16 +260,16 @@ class OptionDir(Option):
return error
def set_create(self, value: bool):
""" Set auto-creation value """
"""Set auto-creation value"""
self.__create = value
def __call__(self) -> str:
""" get() replacement """
"""get() replacement"""
return self.get()
class OptionList(Option):
""" List option class """
"""List option class"""
def __init__(
self,
@@ -286,7 +286,7 @@ class OptionList(Option):
super().__init__(section, keyword, default_val, add=add, protect=protect)
def set(self, value: Union[str, List]) -> Optional[str]:
""" Set the list given a comma-separated string or a list """
"""Set the list given a comma-separated string or a list"""
error = None
if value is not None:
if not isinstance(value, list):
@@ -301,20 +301,20 @@ class OptionList(Option):
return error
def get_string(self) -> str:
""" Return the list as a comma-separated string """
"""Return the list as a comma-separated string"""
return ", ".join(self.get())
def default_string(self) -> str:
""" Return the default list as a comma-separated string """
"""Return the default list as a comma-separated string"""
return ", ".join(self.default())
def __call__(self) -> List[str]:
""" get() replacement """
"""get() replacement"""
return self.get()
class OptionStr(Option):
""" String class."""
"""String class."""
def __init__(
self,
@@ -331,15 +331,15 @@ class OptionStr(Option):
super().__init__(section, keyword, default_val, add=add, protect=protect)
def get_float(self) -> float:
""" Return value converted to a float, allowing KMGT notation """
"""Return value converted to a float, allowing KMGT notation"""
return sabnzbd.misc.from_units(self.get())
def get_int(self) -> int:
""" Return value converted to an int, allowing KMGT notation """
"""Return value converted to an int, allowing KMGT notation"""
return int(self.get_float())
def set(self, value: Any) -> Optional[str]:
""" Set stripped value """
"""Set stripped value"""
error = None
if isinstance(value, str) and self.__strip:
value = value.strip()
@@ -351,46 +351,46 @@ class OptionStr(Option):
return error
def __call__(self) -> str:
""" get() replacement """
"""get() replacement"""
return self.get()
class OptionPassword(Option):
""" Password class. """
"""Password class."""
def __init__(self, section: str, keyword: str, default_val: str = "", add: bool = True):
self.get_string = self.get_stars
super().__init__(section, keyword, default_val, add=add)
def get(self) -> Optional[str]:
""" Return decoded password """
"""Return decoded password"""
return decode_password(super().get(), self.ident())
def get_stars(self) -> Optional[str]:
""" Return non-descript asterisk string """
"""Return non-descript asterisk string"""
if self.get():
return "*" * 10
return ""
def get_dict(self, safe: bool = False) -> Dict[str, str]:
""" Return value a dictionary """
"""Return value a dictionary"""
if safe:
return {self.ident()[1]: self.get_stars()}
else:
return {self.ident()[1]: self.get()}
def set(self, pw: str):
""" Set password, encode it """
"""Set password, encode it"""
if (pw is not None and pw == "") or (pw and pw.strip("*")):
super().set(encode_password(pw))
def __call__(self) -> str:
""" get() replacement """
"""get() replacement"""
return self.get()
class ConfigServer:
""" Class defining a single server """
"""Class defining a single server"""
def __init__(self, name, values):
@@ -422,7 +422,7 @@ class ConfigServer:
add_to_database("servers", self.__name, self)
def set_dict(self, values: Dict[str, Any]):
""" Set one or more fields, passed as dictionary """
"""Set one or more fields, passed as dictionary"""
# Replace usage_at_start value with most recent statistics if the user changes the quota value
# Only when we are updating it from the Config
if sabnzbd.WEBUI_READY and values.get("quota", "") != self.quota():
@@ -459,7 +459,7 @@ class ConfigServer:
self.displayname.set(self.__name)
def get_dict(self, safe: bool = False) -> Dict[str, Any]:
""" Return a dictionary with all attributes """
"""Return a dictionary with all attributes"""
output_dict = {}
output_dict["name"] = self.__name
output_dict["displayname"] = self.displayname()
@@ -487,11 +487,11 @@ class ConfigServer:
return output_dict
def delete(self):
""" Remove from database """
"""Remove from database"""
delete_from_database("servers", self.__name)
def rename(self, name: str):
""" Give server new display name """
"""Give server new display name"""
self.displayname.set(name)
def ident(self) -> Tuple[str, str]:
@@ -499,7 +499,7 @@ class ConfigServer:
class ConfigCat:
""" Class defining a single category """
"""Class defining a single category"""
def __init__(self, name: str, values: Dict[str, Any]):
self.__name = name
@@ -516,7 +516,7 @@ class ConfigCat:
add_to_database("categories", self.__name, self)
def set_dict(self, values: Dict[str, Any]):
""" Set one or more fields, passed as dictionary """
"""Set one or more fields, passed as dictionary"""
for kw in ("order", "pp", "script", "dir", "newzbin", "priority"):
try:
value = values[kw]
@@ -525,7 +525,7 @@ class ConfigCat:
continue
def get_dict(self, safe: bool = False) -> Dict[str, Any]:
""" Return a dictionary with all attributes """
"""Return a dictionary with all attributes"""
output_dict = {}
output_dict["name"] = self.__name
output_dict["order"] = self.order()
@@ -537,19 +537,19 @@ class ConfigCat:
return output_dict
def delete(self):
""" Remove from database """
"""Remove from database"""
delete_from_database("categories", self.__name)
class OptionFilters(Option):
""" Filter list class """
"""Filter list class"""
def __init__(self, section, keyword, add=True):
super().__init__(section, keyword, add=add)
self.set([])
def move(self, current: int, new: int):
""" Move filter from position 'current' to 'new' """
"""Move filter from position 'current' to 'new'"""
lst = self.get()
try:
item = lst.pop(current)
@@ -570,7 +570,7 @@ class OptionFilters(Option):
self.set(lst)
def delete(self, pos: int):
""" Remove filter 'pos' """
"""Remove filter 'pos'"""
lst = self.get()
try:
lst.pop(pos)
@@ -579,14 +579,14 @@ class OptionFilters(Option):
self.set(lst)
def get_dict(self, safe: bool = False) -> Dict[str, str]:
""" Return filter list as a dictionary with keys 'filter[0-9]+' """
"""Return filter list as a dictionary with keys 'filter[0-9]+'"""
output_dict = {}
for n, rss_filter in enumerate(self.get()):
output_dict[f"filter{n}"] = rss_filter
return output_dict
def set_dict(self, values: Dict[str, Any]):
""" Create filter list from dictionary with keys 'filter[0-9]+' """
"""Create filter list from dictionary with keys 'filter[0-9]+'"""
filters = []
# We don't know how many filters there are, so just assume all values are filters
for n in range(len(values)):
@@ -597,12 +597,12 @@ class OptionFilters(Option):
self.set(filters)
def __call__(self) -> List[List[str]]:
""" get() replacement """
"""get() replacement"""
return self.get()
class ConfigRSS:
""" Class defining a single Feed definition """
"""Class defining a single Feed definition"""
def __init__(self, name, values):
self.__name = name
@@ -621,7 +621,7 @@ class ConfigRSS:
add_to_database("rss", self.__name, self)
def set_dict(self, values: Dict[str, Any]):
""" Set one or more fields, passed as dictionary """
"""Set one or more fields, passed as dictionary"""
for kw in ("uri", "cat", "pp", "script", "priority", "enable"):
try:
value = values[kw]
@@ -631,7 +631,7 @@ class ConfigRSS:
self.filters.set_dict(values)
def get_dict(self, safe: bool = False) -> Dict[str, Any]:
""" Return a dictionary with all attributes """
"""Return a dictionary with all attributes"""
output_dict = {}
output_dict["name"] = self.__name
output_dict["uri"] = self.uri()
@@ -646,11 +646,11 @@ class ConfigRSS:
return output_dict
def delete(self):
""" Remove from database """
"""Remove from database"""
delete_from_database("rss", self.__name)
def rename(self, new_name: str):
""" Update the name and the saved entries """
"""Update the name and the saved entries"""
delete_from_database("rss", self.__name)
sabnzbd.RSSReader.rename(self.__name, new_name)
self.__name = new_name
@@ -662,7 +662,7 @@ class ConfigRSS:
@synchronized(CONFIG_LOCK)
def add_to_database(section, keyword, obj):
""" add object as section/keyword to INI database """
"""add object as section/keyword to INI database"""
global database
if section not in database:
database[section] = {}
@@ -671,7 +671,7 @@ def add_to_database(section, keyword, obj):
@synchronized(CONFIG_LOCK)
def delete_from_database(section, keyword):
""" Remove section/keyword from INI database """
"""Remove section/keyword from INI database"""
global database, CFG, modified
del database[section][keyword]
if section == "servers" and "[" in keyword:
@@ -725,7 +725,7 @@ def get_dconfig(section, keyword, nested=False):
def get_config(section, keyword):
""" Return a config object, based on 'section', 'keyword' """
"""Return a config object, based on 'section', 'keyword'"""
try:
return database[section][keyword]
except KeyError:
@@ -734,7 +734,7 @@ def get_config(section, keyword):
def set_config(kwargs):
""" Set a config item, using values in dictionary """
"""Set a config item, using values in dictionary"""
try:
item = database[kwargs.get("section")][kwargs.get("keyword")]
except KeyError:
@@ -744,7 +744,7 @@ def set_config(kwargs):
def delete(section: str, keyword: str):
""" Delete specific config item """
"""Delete specific config item"""
try:
database[section][keyword].delete()
except KeyError:
@@ -842,7 +842,7 @@ def _read_config(path, try_backup=False):
@synchronized(SAVE_CONFIG_LOCK)
def save_config(force=False):
""" Update Setup file with current option values """
"""Update Setup file with current option values"""
global CFG, database, modified
if not (modified or force):
@@ -1025,7 +1025,7 @@ class ErrorCatchingArgumentParser(argparse.ArgumentParser):
def encode_password(pw):
""" Encode password in hexadecimal if needed """
"""Encode password in hexadecimal if needed"""
enc = False
if pw:
encPW = __PW_PREFIX
@@ -1058,7 +1058,7 @@ def decode_password(pw, name):
def clean_nice_ionice_parameters(value):
""" Verify that the passed parameters are not exploits """
"""Verify that the passed parameters are not exploits"""
if value:
parser = ErrorCatchingArgumentParser()
@@ -1081,7 +1081,7 @@ def clean_nice_ionice_parameters(value):
def all_lowercase(value):
""" Lowercase everything! """
"""Lowercase everything!"""
if isinstance(value, list):
# If list, for each item
return None, [item.lower() for item in value]
@@ -1089,7 +1089,7 @@ def all_lowercase(value):
def validate_octal(value):
""" Check if string is valid octal number """
"""Check if string is valid octal number"""
if not value:
return None, value
try:
@@ -1100,7 +1100,7 @@ def validate_octal(value):
def validate_no_unc(root, value, default):
""" Check if path isn't a UNC path """
"""Check if path isn't a UNC path"""
# Only need to check the 'value' part
if value and not value.startswith(r"\\"):
return validate_notempty(root, value, default)
@@ -1117,7 +1117,7 @@ def validate_safedir(root, value, default):
def validate_notempty(root, value, default):
""" If value is empty, return default """
"""If value is empty, return default"""
if value:
return None, value
else:
@@ -1131,7 +1131,7 @@ def validate_strip_right_slash(value):
return None, value
def validate_single_tag(value):
def validate_single_tag(value: List[str]) -> Tuple[None, List[str]]:
"""Don't split single indexer tags like "TV > HD"
into ['TV', '>', 'HD']
"""
@@ -1142,5 +1142,5 @@ def validate_single_tag(value):
def create_api_key():
""" Return a new randomized API_KEY """
"""Return a new randomized API_KEY"""
return uuid.uuid4().hex

View File

@@ -141,6 +141,8 @@ year_match = r"[\W]([1|2]\d{3})([^\w]|$)" # Something '(YYYY)' or '.YYYY.' or '
sample_match = r"((^|[\W_])(sample|proof))" # something-sample or something-proof
resolution_match = r"(^|[\W_])((240|360|480|540|576|720|900|1080|1440|2160|4320)[piP])([\W_]|$)" # 576i, 720p, 1080P
class Status:
COMPLETED = "Completed" # PP: Job is finished

View File

@@ -26,7 +26,7 @@ import logging
import sys
import threading
import sqlite3
from typing import Union, Dict
from typing import Union, Dict, Optional, List
import sabnzbd
import sabnzbd.cfg
@@ -41,7 +41,7 @@ DB_LOCK = threading.RLock()
def convert_search(search):
""" Convert classic wildcard to SQL wildcard """
"""Convert classic wildcard to SQL wildcard"""
if not search:
# Default value
search = ""
@@ -75,14 +75,14 @@ class HistoryDB:
@synchronized(DB_LOCK)
def __init__(self):
""" Determine databse path and create connection """
"""Determine databse path and create connection"""
self.con = self.c = None
if not HistoryDB.db_path:
HistoryDB.db_path = os.path.join(sabnzbd.cfg.admin_dir.get_path(), DB_HISTORY_NAME)
self.connect()
def connect(self):
""" Create a connection to the database """
"""Create a connection to the database"""
create_table = not os.path.exists(HistoryDB.db_path)
self.con = sqlite3.connect(HistoryDB.db_path)
self.con.row_factory = sqlite3.Row
@@ -117,7 +117,7 @@ class HistoryDB:
)
def execute(self, command, args=(), save=False):
""" Wrapper for executing SQL commands """
"""Wrapper for executing SQL commands"""
for tries in range(5, 0, -1):
try:
if args and isinstance(args, tuple):
@@ -161,7 +161,7 @@ class HistoryDB:
return False
def create_history_db(self):
""" Create a new (empty) database file """
"""Create a new (empty) database file"""
self.execute(
"""
CREATE TABLE "history" (
@@ -198,7 +198,7 @@ class HistoryDB:
self.execute("PRAGMA user_version = 2;")
def close(self):
""" Close database connection """
"""Close database connection"""
try:
self.c.close()
self.con.close()
@@ -207,7 +207,7 @@ class HistoryDB:
logging.info("Traceback: ", exc_info=True)
def remove_completed(self, search=None):
""" Remove all completed jobs from the database, optional with `search` pattern """
"""Remove all completed jobs from the database, optional with `search` pattern"""
search = convert_search(search)
logging.info("Removing all completed jobs from history")
return self.execute(
@@ -215,7 +215,7 @@ class HistoryDB:
)
def get_failed_paths(self, search=None):
""" Return list of all storage paths of failed jobs (may contain non-existing or empty paths) """
"""Return list of all storage paths of failed jobs (may contain non-existing or empty paths)"""
search = convert_search(search)
fetch_ok = self.execute(
"""SELECT path FROM history WHERE name LIKE ? AND status = ?""", (search, Status.FAILED)
@@ -226,7 +226,7 @@ class HistoryDB:
return []
def remove_failed(self, search=None):
""" Remove all failed jobs from the database, optional with `search` pattern """
"""Remove all failed jobs from the database, optional with `search` pattern"""
search = convert_search(search)
logging.info("Removing all failed jobs from history")
return self.execute(
@@ -234,7 +234,7 @@ class HistoryDB:
)
def remove_history(self, jobs=None):
""" Remove all jobs in the list `jobs`, empty list will remove all completed jobs """
"""Remove all jobs in the list `jobs`, empty list will remove all completed jobs"""
if jobs is None:
self.remove_completed()
else:
@@ -246,7 +246,7 @@ class HistoryDB:
logging.info("[%s] Removing job %s from history", caller_name(), job)
def auto_history_purge(self):
""" Remove history items based on the configured history-retention """
"""Remove history items based on the configured history-retention"""
if sabnzbd.cfg.history_retention() == "0":
return
@@ -279,7 +279,7 @@ class HistoryDB:
)
def add_history_db(self, nzo, storage="", postproc_time=0, script_output="", script_line=""):
""" Add a new job entry to the database """
"""Add a new job entry to the database"""
t = build_history_info(nzo, storage, postproc_time, script_output, script_line, series_info=True)
self.execute(
@@ -292,8 +292,16 @@ class HistoryDB:
)
logging.info("Added job %s to history", nzo.final_name)
def fetch_history(self, start=None, limit=None, search=None, failed_only=0, categories=None, nzo_ids=None):
""" Return records for specified jobs """
def fetch_history(
self,
start: Optional[int] = None,
limit: Optional[int] = None,
search: Optional[str] = None,
failed_only: int = 0,
categories: Optional[List[str]] = None,
nzo_ids: Optional[List[str]] = None,
):
"""Return records for specified jobs"""
command_args = [convert_search(search)]
post = ""
@@ -304,7 +312,6 @@ class HistoryDB:
post += ")"
command_args.extend(categories)
if nzo_ids:
nzo_ids = nzo_ids.split(",")
post += " AND (NZO_ID = ?"
post += " OR NZO_ID = ? " * (len(nzo_ids) - 1)
post += ")"
@@ -339,7 +346,7 @@ class HistoryDB:
return items, fetched_items, total_items
def have_episode(self, series, season, episode):
""" Check whether History contains this series episode """
"""Check whether History contains this series episode"""
total = 0
series = series.lower().replace(".", " ").replace("_", " ").replace(" ", " ")
if series and season and episode:
@@ -351,7 +358,7 @@ class HistoryDB:
return total > 0
def have_name_or_md5sum(self, name, md5sum):
""" Check whether this name or md5sum is already in History """
"""Check whether this name or md5sum is already in History"""
total = 0
if self.execute(
"""SELECT COUNT(*) FROM History WHERE ( LOWER(name) = LOWER(?) OR md5sum = ? ) AND STATUS != ?""",
@@ -386,7 +393,7 @@ class HistoryDB:
return total, month, week
def get_script_log(self, nzo_id):
""" Return decompressed log file """
"""Return decompressed log file"""
data = ""
t = (nzo_id,)
if self.execute("""SELECT script_log FROM history WHERE nzo_id = ?""", t):
@@ -397,7 +404,7 @@ class HistoryDB:
return data
def get_name(self, nzo_id):
""" Return name of the job `nzo_id` """
"""Return name of the job `nzo_id`"""
t = (nzo_id,)
name = ""
if self.execute("""SELECT name FROM history WHERE nzo_id = ?""", t):
@@ -409,7 +416,7 @@ class HistoryDB:
return name
def get_path(self, nzo_id: str):
""" Return the `incomplete` path of the job `nzo_id` if it is still there """
"""Return the `incomplete` path of the job `nzo_id` if it is still there"""
t = (nzo_id,)
path = ""
if self.execute("""SELECT path FROM history WHERE nzo_id = ?""", t):
@@ -423,7 +430,7 @@ class HistoryDB:
return None
def get_other(self, nzo_id):
""" Return additional data for job `nzo_id` """
"""Return additional data for job `nzo_id`"""
t = (nzo_id,)
if self.execute("""SELECT * FROM history WHERE nzo_id = ?""", t):
try:
@@ -435,11 +442,11 @@ class HistoryDB:
return "", "", "", "", ""
def __enter__(self):
""" For context manager support """
"""For context manager support"""
return self
def __exit__(self, exc_type, exc_val, exc_tb):
""" For context manager support, ignore any exception """
"""For context manager support, ignore any exception"""
self.close()
@@ -447,7 +454,7 @@ _PP_LOOKUP = {0: "", 1: "R", 2: "U", 3: "D"}
def build_history_info(nzo, workdir_complete="", postproc_time=0, script_output="", script_line="", series_info=False):
""" Collects all the information needed for the database """
"""Collects all the information needed for the database"""
completed = int(time.time())
pp = _PP_LOOKUP.get(opts_to_pp(*nzo.repair_opts), "X")

View File

@@ -59,7 +59,7 @@ class BadYenc(Exception):
class Decoder:
""" Implement thread-like coordinator for the decoders """
"""Implement thread-like coordinator for the decoders"""
def __init__(self):
logging.debug("Initializing decoders")
@@ -106,7 +106,7 @@ class Decoder:
class DecoderWorker(Thread):
""" The actuall workhorse that handles decoding! """
"""The actuall workhorse that handles decoding!"""
def __init__(self, decoder_queue):
super().__init__()
@@ -246,7 +246,7 @@ def decode(article: Article, raw_data: List[bytes]) -> bytes:
def search_new_server(article: Article) -> bool:
""" Shorthand for searching new server or else increasing bad_articles """
"""Shorthand for searching new server or else increasing bad_articles"""
# Continue to the next one if we found new server
if not article.search_new_server():
# Increase bad articles if no new server was found

View File

@@ -42,7 +42,7 @@ MIN_FILE_SIZE = 10 * 1024 * 1024
def decode_par2(parfile):
""" Parse a par2 file and rename files listed in the par2 to their real name """
"""Parse a par2 file and rename files listed in the par2 to their real name"""
# Check if really a par2 file
if not is_parfile(parfile):
logging.info("Par2 file %s was not really a par2 file")
@@ -89,6 +89,11 @@ def is_probably_obfuscated(myinputfilename):
# exactly 32 hex digits, so:
return True
# 0675e29e9abfd2.f7d069dab0b853283cc1b069a25f82.6547
if re.findall(r"^[a-f0-9\.]{40,}$", filebasename):
logging.debug("Obfuscated: starting with 40+ lower case hex digits and/or dots")
return True
# /some/thing/abc.xyz.a4c567edbcbf27.BLA is certainly obfuscated
if re.findall(r"^abc\.xyz", filebasename):
logging.debug("Obfuscated: starts with 'abc.xyz'")
@@ -127,7 +132,7 @@ def is_probably_obfuscated(myinputfilename):
def deobfuscate_list(filelist, usefulname):
""" Check all files in filelist, and if wanted, deobfuscate: rename to filename based on usefulname"""
"""Check all files in filelist, and if wanted, deobfuscate: rename to filename based on usefulname"""
# to be sure, only keep really exsiting files:
filelist = [f for f in filelist if os.path.exists(f)]
@@ -137,17 +142,17 @@ def deobfuscate_list(filelist, usefulname):
# Found any par2 files we can use?
run_renamer = True
if not par2_files:
logging.debug("No par2 files found to process, running renamer.")
logging.debug("No par2 files found to process, running renamer")
else:
# Run par2 from SABnzbd on them
for par2_file in par2_files:
# Analyse data and analyse result
logging.debug("Deobfuscate par2: handling %s", par2_file)
if decode_par2(par2_file):
logging.debug("Deobfuscate par2 repair/verify finished.")
logging.debug("Deobfuscate par2 repair/verify finished")
run_renamer = False
else:
logging.debug("Deobfuscate par2 repair/verify did not find anything to rename.")
logging.debug("Deobfuscate par2 repair/verify did not find anything to rename")
# No par2 files? Then we try to rename qualifying (big, not-excluded, obfuscated) files to the job-name
if run_renamer:
@@ -158,7 +163,7 @@ def deobfuscate_list(filelist, usefulname):
if os.path.getsize(file) < MIN_FILE_SIZE:
# too small to care
continue
_, ext = os.path.splitext(file)
ext = get_ext(file)
if ext in extcounter:
extcounter[ext] += 1
else:
@@ -203,5 +208,7 @@ def deobfuscate_list(filelist, usefulname):
logging.info("Deobfuscate renaming %s to %s", otherfile, new_name)
# Rename and make sure the new filename is unique
renamer(otherfile, new_name)
else:
logging.debug("%s excluded from deobfuscation based on size, extension or non-obfuscation", filename)
else:
logging.info("No qualifying files found to deobfuscate")

View File

@@ -106,7 +106,7 @@ class DirectUnpacker(threading.Thread):
return True
def set_volumes_for_nzo(self):
""" Loop over all files to detect the names """
"""Loop over all files to detect the names"""
none_counter = 0
found_counter = 0
for nzf in self.nzo.files + self.nzo.finished_files:
@@ -126,7 +126,7 @@ class DirectUnpacker(threading.Thread):
@synchronized(START_STOP_LOCK)
def add(self, nzf: NzbFile):
""" Add jobs and start instance of DirectUnpack """
"""Add jobs and start instance of DirectUnpack"""
if not cfg.direct_unpack_tested():
test_disk_performance()
@@ -350,7 +350,7 @@ class DirectUnpacker(threading.Thread):
@synchronized(START_STOP_LOCK)
def create_unrar_instance(self):
""" Start the unrar instance using the user's options """
"""Start the unrar instance using the user's options"""
# Generate extraction path and save for post-proc
if not self.unpack_dir_info:
try:
@@ -432,7 +432,7 @@ class DirectUnpacker(threading.Thread):
@synchronized(START_STOP_LOCK)
def abort(self):
""" Abort running instance and delete generated files """
"""Abort running instance and delete generated files"""
if not self.killed and self.cur_setname:
logging.info("Aborting DirectUnpack for %s", self.cur_setname)
self.killed = True
@@ -494,7 +494,7 @@ class DirectUnpacker(threading.Thread):
self.reset_active()
def get_formatted_stats(self):
""" Get percentage or number of rar's done """
"""Get percentage or number of rar's done"""
if self.cur_setname and self.cur_setname in self.total_volumes:
# This won't work on obfuscated posts
if self.total_volumes[self.cur_setname] >= self.cur_volume and self.cur_volume:
@@ -520,7 +520,7 @@ def analyze_rar_filename(filename):
def abort_all():
""" Abort all running DirectUnpackers """
"""Abort all running DirectUnpackers"""
logging.info("Aborting all DirectUnpackers")
for direct_unpacker in ACTIVE_UNPACKERS:
direct_unpacker.abort()

View File

@@ -32,7 +32,7 @@ import sabnzbd.cfg as cfg
def compare_stat_tuple(tup1, tup2):
""" Test equality of two stat-tuples, content-related parts only """
"""Test equality of two stat-tuples, content-related parts only"""
if tup1.st_ino != tup2.st_ino:
return False
if tup1.st_size != tup2.st_size:
@@ -45,7 +45,7 @@ def compare_stat_tuple(tup1, tup2):
def clean_file_list(inp_list, folder, files):
""" Remove elements of "inp_list" not found in "files" """
"""Remove elements of "inp_list" not found in "files" """
for path in sorted(inp_list):
fld, name = os.path.split(path)
if fld == folder:
@@ -89,31 +89,31 @@ class DirScanner(threading.Thread):
cfg.dirscan_speed.callback(self.newspeed)
def newdir(self):
""" We're notified of a dir change """
"""We're notified of a dir change"""
self.ignored = {}
self.suspected = {}
self.dirscan_dir = cfg.dirscan_dir.get_path()
self.dirscan_speed = cfg.dirscan_speed()
def newspeed(self):
""" We're notified of a scan speed change """
"""We're notified of a scan speed change"""
# If set to 0, use None so the wait() is forever
self.dirscan_speed = cfg.dirscan_speed() or None
with self.loop_condition:
self.loop_condition.notify()
def stop(self):
""" Stop the dir scanner """
"""Stop the dir scanner"""
self.shutdown = True
with self.loop_condition:
self.loop_condition.notify()
def save(self):
""" Save dir scanner bookkeeping """
"""Save dir scanner bookkeeping"""
sabnzbd.save_admin((self.dirscan_dir, self.ignored, self.suspected), SCAN_FILE_NAME)
def run(self):
""" Start the scanner """
"""Start the scanner"""
logging.info("Dirscanner starting up")
self.shutdown = False
@@ -125,7 +125,7 @@ class DirScanner(threading.Thread):
self.scan()
def scan(self):
""" Do one scan of the watched folder """
"""Do one scan of the watched folder"""
def run_dir(folder, catdir):
try:

View File

@@ -50,11 +50,50 @@ _PENALTY_PERM = 10 # Permanent error, like bad username/password
_PENALTY_SHORT = 1 # Minimal penalty when no_penalties is set
_PENALTY_VERYSHORT = 0.1 # Error 400 without cause clues
# Wait this many seconds between checking idle servers for new articles or busy threads for timeout
_SERVER_CHECK_DELAY = 0.5
# Wait this many seconds between updates of the BPSMeter
_BPSMETER_UPDATE_DELAY = 0.05
TIMER_LOCK = RLock()
class Server:
# Pre-define attributes to save memory and improve get/set performance
__slots__ = (
"id",
"newid",
"restart",
"displayname",
"host",
"port",
"timeout",
"threads",
"priority",
"ssl",
"ssl_verify",
"ssl_ciphers",
"optional",
"retention",
"send_group",
"username",
"password",
"busy_threads",
"next_busy_threads_check",
"idle_threads",
"next_article_search",
"active",
"bad_cons",
"errormsg",
"warning",
"info",
"ssl_info",
"request",
"have_body",
"have_stat",
"article_queue",
)
def __init__(
self,
server_id,
@@ -94,6 +133,7 @@ class Server:
self.password: Optional[str] = password
self.busy_threads: List[NewsWrapper] = []
self.next_busy_threads_check: float = 0
self.idle_threads: List[NewsWrapper] = []
self.next_article_search: float = 0
self.active: bool = True
@@ -105,10 +145,15 @@ class Server:
self.request: bool = False # True if a getaddrinfo() request is pending
self.have_body: bool = True # Assume server has "BODY", until proven otherwise
self.have_stat: bool = True # Assume server has "STAT", until proven otherwise
self.article_queue: List[sabnzbd.nzbstuff.Article] = []
# Initialize threads
for i in range(threads):
self.idle_threads.append(NewsWrapper(self, i + 1))
# Tell the BPSMeter about this server
sabnzbd.BPSMeter.init_server_stats(self.id)
@property
def hostip(self) -> str:
"""In case a server still has active connections, we use the same IP again
@@ -146,6 +191,11 @@ class Server:
logging.debug("%s: No successful IP connection was possible", self.host)
return ip
def deactivate(self):
"""Deactive server and reset queued articles"""
self.active = False
self.reset_article_queue()
def stop(self):
"""Remove all connections from server"""
for nw in self.idle_threads:
@@ -162,8 +212,14 @@ class Server:
self.request = True
Thread(target=self._request_info_internal).start()
def reset_article_queue(self):
logging.debug("Resetting article queue for %s", self)
for article in self.article_queue:
sabnzbd.NzbQueue.reset_try_lists(article, remove_fetcher_from_trylist=False)
self.article_queue = []
def _request_info_internal(self):
""" Async attempt to run getaddrinfo() for specified server """
"""Async attempt to run getaddrinfo() for specified server"""
logging.debug("Retrieving server address information for %s", self.host)
self.info = get_server_addrinfo(self.host, self.port)
if not self.info:
@@ -178,7 +234,25 @@ class Server:
class Downloader(Thread):
""" Singleton Downloader Thread """
"""Singleton Downloader Thread"""
# Improves get/set performance, even though it's inherited from Thread
# Due to the huge number of get-calls in run(), it can actually make a difference
__slots__ = (
"paused",
"bandwidth_limit",
"bandwidth_perc",
"can_be_slowed",
"can_be_slowed_timer",
"sleep_time",
"paused_for_postproc",
"shutdown",
"server_restarts",
"force_disconnect",
"read_fds",
"servers",
"timers",
)
def __init__(self, paused=False):
super().__init__()
@@ -214,8 +288,6 @@ class Downloader(Thread):
self.read_fds: Dict[int, NewsWrapper] = {}
self.servers: List[Server] = []
self.server_dict: Dict[str, Server] = {} # For faster lookups, but is not updated later!
self.server_nr: int = 0
self.timers: Dict[str, List[float]] = {}
for server in config.get_servers():
@@ -256,45 +328,46 @@ class Downloader(Thread):
create = False
server.newid = newserver
server.restart = True
server.reset_article_queue()
self.server_restarts += 1
break
if create and enabled and host and port and threads:
server = Server(
newserver,
displayname,
host,
port,
timeout,
threads,
priority,
ssl,
ssl_verify,
ssl_ciphers,
send_group,
username,
password,
optional,
retention,
self.servers.append(
Server(
newserver,
displayname,
host,
port,
timeout,
threads,
priority,
ssl,
ssl_verify,
ssl_ciphers,
send_group,
username,
password,
optional,
retention,
)
)
self.servers.append(server)
self.server_dict[newserver] = server
# Update server-count
self.server_nr = len(self.servers)
# Sort the servers for performance
self.servers.sort(key=lambda svr: "%02d%s" % (svr.priority, svr.displayname.lower()))
def add_socket(self, fileno: int, nw: NewsWrapper):
""" Add a socket ready to be used to the list to be watched """
"""Add a socket ready to be used to the list to be watched"""
self.read_fds[fileno] = nw
def remove_socket(self, nw: NewsWrapper):
""" Remove a socket to be watched """
"""Remove a socket to be watched"""
if nw.nntp:
self.read_fds.pop(nw.nntp.fileno, None)
@NzbQueueLocker
def set_paused_state(self, state: bool):
""" Set downloader to specified paused state """
"""Set downloader to specified paused state"""
self.paused = state
@NzbQueueLocker
@@ -307,7 +380,7 @@ class Downloader(Thread):
@NzbQueueLocker
def pause(self):
""" Pause the downloader, optionally saving admin """
"""Pause the downloader, optionally saving admin"""
if not self.paused:
self.paused = True
logging.info("Pausing")
@@ -407,22 +480,21 @@ class Downloader(Thread):
# Not fully the same as the code below for optional servers
server.bad_cons = 0
server.active = False
server.deactivate()
self.plan_server(server, _PENALTY_TIMEOUT)
# Optional and active server had too many problems.
# Disable it now and send a re-enable plan to the scheduler
if server.optional and server.active and (server.bad_cons / server.threads) > 3:
# Deactivate server
server.bad_cons = 0
server.active = False
server.deactivate()
logging.warning(T("Server %s will be ignored for %s minutes"), server.host, _PENALTY_TIMEOUT)
self.plan_server(server, _PENALTY_TIMEOUT)
# Remove all connections to server
for nw in server.idle_threads + server.busy_threads:
self.__reset_nw(
nw, "forcing disconnect", warn=False, wait=False, count_article_try=False, send_quit=False
)
self.__reset_nw(nw, "forcing disconnect", warn=False, wait=False, retry_article=False, send_quit=False)
# Make sure server address resolution is refreshed
server.info = None
@@ -438,6 +510,7 @@ class Downloader(Thread):
if not raw_data:
if not article.search_new_server():
sabnzbd.NzbQueue.register_article(article, success=False)
article.nzf.nzo.increase_bad_articles_counter("missing_articles")
return
# Send to decoder-queue
@@ -466,7 +539,9 @@ class Downloader(Thread):
logging.debug("SSL verification test: %s", sabnzbd.CERTIFICATE_VALIDATION)
# Kick BPS-Meter to check quota
sabnzbd.BPSMeter.update()
BPSMeter = sabnzbd.BPSMeter
BPSMeter.update()
next_bpsmeter_update = 0
# Check server expiration dates
check_server_expiration()
@@ -483,15 +558,17 @@ class Downloader(Thread):
if not server.busy_threads and server.next_article_search > now:
continue
for nw in server.busy_threads[:]:
if (nw.nntp and nw.nntp.error_msg) or (nw.timeout and now > nw.timeout):
if nw.nntp and nw.nntp.error_msg:
# Already showed error
self.__reset_nw(nw)
else:
self.__reset_nw(nw, "timed out", warn=True)
server.bad_cons += 1
self.maybe_block_server(server)
if server.next_busy_threads_check < now:
server.next_busy_threads_check = now + _SERVER_CHECK_DELAY
for nw in server.busy_threads[:]:
if (nw.nntp and nw.nntp.error_msg) or (nw.timeout and now > nw.timeout):
if nw.nntp and nw.nntp.error_msg:
# Already showed error
self.__reset_nw(nw)
else:
self.__reset_nw(nw, "timed out", warn=True)
server.bad_cons += 1
self.maybe_block_server(server)
if server.restart:
if not server.busy_threads:
@@ -509,7 +586,6 @@ class Downloader(Thread):
if (
not server.idle_threads
or server.restart
or self.is_paused()
or self.shutdown
or self.paused_for_postproc
@@ -531,20 +607,28 @@ class Downloader(Thread):
server.request_info()
break
article = sabnzbd.NzbQueue.get_article(server, self.servers)
if not article:
# Skip this server for 0.5 second
server.next_article_search = now + 0.5
break
if server.retention and article.nzf.nzo.avg_stamp < now - server.retention:
# Let's get rid of all the articles for this server at once
logging.info("Job %s too old for %s, moving on", article.nzf.nzo.final_name, server.host)
while article:
self.decode(article, None)
article = article.nzf.nzo.get_article(server, self.servers)
break
# Get article from pre-fetched ones or fetch new ones
if server.article_queue:
article = server.article_queue.pop(0)
else:
# Pre-fetch new articles
server.article_queue = sabnzbd.NzbQueue.get_articles(
server, self.servers, max(1, server.threads // 4)
)
if server.article_queue:
article = server.article_queue.pop(0)
# Mark expired articles as tried on this server
if server.retention and article.nzf.nzo.avg_stamp < now - server.retention:
self.decode(article, None)
while server.article_queue:
self.decode(server.article_queue.pop(), None)
# Move to the next server, allowing the next server to already start
# fetching the articles that were too old for this server
break
else:
# Skip this server for a short time
server.next_article_search = now + _SERVER_CHECK_DELAY
break
server.idle_threads.remove(nw)
server.busy_threads.append(nw)
@@ -572,16 +656,16 @@ class Downloader(Thread):
# Send goodbye if we have open socket
if nw.nntp:
self.__reset_nw(
nw,
"forcing disconnect",
wait=False,
count_article_try=False,
send_quit=True,
nw, "forcing disconnect", wait=False, count_article_try=False, send_quit=True
)
# Make sure server address resolution is refreshed
server.info = None
server.reset_article_queue()
self.force_disconnect = False
# Make sure we update the stats
BPSMeter.update()
# Exit-point
if self.shutdown:
logging.info("Shutting down")
@@ -599,20 +683,20 @@ class Downloader(Thread):
# Need to initialize the check during first 20 seconds
if self.can_be_slowed is None or self.can_be_slowed_timer:
# Wait for stable speed to start testing
if not self.can_be_slowed_timer and sabnzbd.BPSMeter.get_stable_speed(timespan=10):
if not self.can_be_slowed_timer and BPSMeter.get_stable_speed(timespan=10):
self.can_be_slowed_timer = time.time()
# Check 10 seconds after enabling slowdown
if self.can_be_slowed_timer and time.time() > self.can_be_slowed_timer + 10:
# Now let's check if it was stable in the last 10 seconds
self.can_be_slowed = sabnzbd.BPSMeter.get_stable_speed(timespan=10)
self.can_be_slowed = BPSMeter.get_stable_speed(timespan=10)
self.can_be_slowed_timer = 0
logging.debug("Downloader-slowdown: %r", self.can_be_slowed)
else:
read = []
sabnzbd.BPSMeter.reset()
BPSMeter.reset()
time.sleep(1.0)
@@ -625,8 +709,11 @@ class Downloader(Thread):
):
DOWNLOADER_CV.wait()
if now > next_bpsmeter_update:
BPSMeter.update()
next_bpsmeter_update = now + _BPSMETER_UPDATE_DELAY
if not read:
sabnzbd.BPSMeter.update()
continue
for selected in read:
@@ -640,7 +727,6 @@ class Downloader(Thread):
bytes_received, done, skip = (0, False, False)
if skip:
sabnzbd.BPSMeter.update()
continue
if bytes_received < 1:
@@ -649,22 +735,22 @@ class Downloader(Thread):
else:
try:
article.nzf.nzo.update_download_stats(sabnzbd.BPSMeter.bps, server.id, bytes_received)
article.nzf.nzo.update_download_stats(BPSMeter.bps, server.id, bytes_received)
except AttributeError:
# In case nzf has disappeared because the file was deleted before the update could happen
pass
if self.bandwidth_limit:
limit = self.bandwidth_limit
if bytes_received + sabnzbd.BPSMeter.bps > limit:
while sabnzbd.BPSMeter.bps > limit:
time.sleep(0.01)
sabnzbd.BPSMeter.update()
sabnzbd.BPSMeter.update(server.id, bytes_received)
BPSMeter.update(server.id, bytes_received)
if not done and nw.status_code != 222:
if self.bandwidth_limit:
if BPSMeter.bps + BPSMeter.sum_cached_amount > self.bandwidth_limit:
BPSMeter.update()
while BPSMeter.bps > self.bandwidth_limit:
time.sleep(0.01)
BPSMeter.update()
if nw.status_code != 222 and not done:
if not nw.connected or nw.status_code == 480:
done = False
try:
nw.finish_connect(nw.status_code)
if sabnzbd.LOG_ALL:
@@ -689,7 +775,7 @@ class Downloader(Thread):
server.errormsg = errormsg
logging.warning(T("Too many connections to server %s"), server.host)
# Don't count this for the tries (max_art_tries) on this server
self.__reset_nw(nw, count_article_try=False, send_quit=True)
self.__reset_nw(nw, send_quit=True)
self.plan_server(server, _PENALTY_TOOMANY)
server.threads -= 1
elif ecode in (502, 481, 482) and clues_too_many_ip(msg):
@@ -740,11 +826,11 @@ class Downloader(Thread):
block = True
if block or (penalty and server.optional):
if server.active:
server.active = False
server.deactivate()
if penalty and (block or server.optional):
self.plan_server(server, penalty)
# Note that this will count towards the tries (max_art_tries) on this server!
self.__reset_nw(nw, send_quit=True)
# Note that the article is discard for this server
self.__reset_nw(nw, retry_article=False, send_quit=True)
continue
except:
logging.error(
@@ -754,7 +840,7 @@ class Downloader(Thread):
nntp_to_msg(nw.data),
)
# No reset-warning needed, above logging is sufficient
self.__reset_nw(nw)
self.__reset_nw(nw, retry_article=False)
if nw.connected:
logging.info("Connecting %s@%s finished", nw.thrdnum, nw.server.host)
@@ -765,7 +851,6 @@ class Downloader(Thread):
logging.debug("Article <%s> is present", article.article)
elif nw.status_code == 211:
done = False
logging.debug("group command ok -> %s", nntp_to_msg(nw.data))
nw.group = nw.article.nzf.nzo.group
nw.clear_data()
@@ -815,6 +900,7 @@ class Downloader(Thread):
warn: bool = False,
wait: bool = True,
count_article_try: bool = True,
retry_article: bool = True,
send_quit: bool = False,
):
# Some warnings are errors, and not added as server.warning
@@ -835,16 +921,23 @@ class Downloader(Thread):
if nw.article:
# Only some errors should count towards the total tries for each server
if (
count_article_try
and nw.article.tries > cfg.max_art_tries()
and (nw.article.fetcher.optional or not cfg.max_art_opt())
):
if count_article_try:
nw.article.tries += 1
# Do we discard, or try again for this server
if not retry_article or nw.article.tries > cfg.max_art_tries():
# Too many tries on this server, consider article missing
self.decode(nw.article, None)
nw.article.tries = 0
else:
# Allow all servers to iterate over this nzo/nzf again
sabnzbd.NzbQueue.reset_try_lists(nw.article)
# Retry again with the same server
logging.debug(
"Re-adding article %s from %s to server %s",
nw.article.article,
nw.article.nzf.filename,
nw.article.fetcher,
)
nw.article.fetcher.article_queue.append(nw.article)
# Reset connection object
nw.hard_reset(wait, send_quit=send_quit)
@@ -883,7 +976,7 @@ class Downloader(Thread):
@synchronized(TIMER_LOCK)
def plan_server(self, server: Server, interval: int):
""" Plan the restart of a server in 'interval' minutes """
"""Plan the restart of a server in 'interval' minutes"""
if cfg.no_penalties() and interval > _PENALTY_SHORT:
# Overwrite in case of no_penalties
interval = _PENALTY_SHORT
@@ -898,7 +991,7 @@ class Downloader(Thread):
@synchronized(TIMER_LOCK)
def trigger_server(self, server_id: str, timestamp: float):
""" Called by scheduler, start server if timer still valid """
"""Called by scheduler, start server if timer still valid"""
logging.debug("Trigger planned server resume for server-id %s", server_id)
if server_id in self.timers:
if timestamp in self.timers[server_id]:
@@ -927,7 +1020,7 @@ class Downloader(Thread):
@NzbQueueLocker
@synchronized(TIMER_LOCK)
def check_timers(self):
""" Make sure every server without a non-expired timer is active """
"""Make sure every server without a non-expired timer is active"""
# Clean expired timers
now = time.time()
kicked = []
@@ -953,18 +1046,18 @@ class Downloader(Thread):
@NzbQueueLocker
def wakeup(self):
""" Just rattle the semaphore """
"""Just rattle the semaphore"""
pass
@NzbQueueLocker
def stop(self):
""" Shutdown, wrapped so the semaphore is notified """
"""Shutdown, wrapped so the semaphore is notified"""
self.shutdown = True
sabnzbd.notifier.send_notification("SABnzbd", T("Shutting down"), "startup")
def clues_login(text: str) -> bool:
""" Check for any "failed login" clues in the response code """
"""Check for any "failed login" clues in the response code"""
text = text.lower()
for clue in ("username", "password", "invalid", "authen", "access denied"):
if clue in text:
@@ -973,7 +1066,7 @@ def clues_login(text: str) -> bool:
def clues_too_many(text: str) -> bool:
""" Check for any "too many connections" clues in the response code """
"""Check for any "too many connections" clues in the response code"""
text = text.lower()
for clue in ("exceed", "connections", "too many", "threads", "limit"):
# Not 'download limit exceeded' error
@@ -983,7 +1076,7 @@ def clues_too_many(text: str) -> bool:
def clues_too_many_ip(text: str) -> bool:
""" Check for any "account sharing" clues in the response code """
"""Check for any "account sharing" clues in the response code"""
text = text.lower()
for clue in ("simultaneous ip", "multiple ip"):
if clue in text:
@@ -992,7 +1085,7 @@ def clues_too_many_ip(text: str) -> bool:
def clues_pay(text: str) -> bool:
""" Check for messages about payments """
"""Check for messages about payments"""
text = text.lower()
for clue in ("credits", "paym", "expired", "exceeded"):
if clue in text:

View File

@@ -44,14 +44,14 @@ def errormsg(msg):
def get_email_date():
""" Return un-localized date string for the Date: field """
"""Return un-localized date string for the Date: field"""
# Get locale independent date/time string: "Sun May 22 20:15:12 2011"
day, month, dayno, hms, year = time.asctime(time.gmtime()).split()
return "%s, %s %s %s %s +0000" % (day, dayno, month, year, hms)
def send_email(message, email_to, test=None):
""" Send message if message non-empty and email-parms are set """
"""Send message if message non-empty and email-parms are set"""
# we should not use CFG if we are testing. we should use values
# from UI instead.
# email_to is replaced at send_with_template, since it can be an array
@@ -153,7 +153,7 @@ def send_email(message, email_to, test=None):
def send_with_template(prefix, parm, test=None):
""" Send an email using template """
"""Send an email using template"""
parm["from"] = cfg.email_from()
parm["date"] = get_email_date()
@@ -203,7 +203,7 @@ def send_with_template(prefix, parm, test=None):
def endjob(
filename, cat, status, path, bytes_downloaded, fail_msg, stages, script, script_output, script_ret, test=None
):
""" Send end-of-job email """
"""Send end-of-job email"""
# Is it allowed?
if not check_cat("misc", cat, keyword="email") and not test:
return None
@@ -241,19 +241,19 @@ def endjob(
def rss_mail(feed, jobs):
""" Send notification email containing list of files """
"""Send notification email containing list of files"""
parm = {"amount": len(jobs), "feed": feed, "jobs": jobs}
return send_with_template("rss", parm)
def badfetch_mail(msg, url):
""" Send notification email about failed NZB fetch """
"""Send notification email about failed NZB fetch"""
parm = {"url": url, "msg": msg}
return send_with_template("badfetch", parm)
def diskfull_mail():
""" Send email about disk full, no templates """
"""Send email about disk full, no templates"""
if cfg.email_full():
return send_email(
T(
@@ -277,7 +277,7 @@ Please make room and resume SABnzbd manually.
def _prepare_message(txt):
""" Parse the headers in the template to real headers """
"""Parse the headers in the template to real headers"""
msg = EmailMessage()
payload = []
body = False

View File

@@ -28,14 +28,14 @@ CODEPAGE = locale.getpreferredencoding()
def utob(str_in: AnyStr) -> bytes:
""" Shorthand for converting UTF-8 string to bytes """
"""Shorthand for converting UTF-8 string to bytes"""
if isinstance(str_in, bytes):
return str_in
return str_in.encode("utf-8")
def ubtou(str_in: AnyStr) -> str:
""" Shorthand for converting unicode bytes to UTF-8 string """
"""Shorthand for converting unicode bytes to UTF-8 string"""
if not isinstance(str_in, bytes):
return str_in
return str_in.decode("utf-8")
@@ -78,5 +78,5 @@ def correct_unknown_encoding(str_or_bytes_in: AnyStr) -> str:
def xml_name(p):
""" Prepare name for use in HTML/XML contect """
"""Prepare name for use in HTML/XML contect"""
return escape(str(p))

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