Compare commits

...
158 Commits
Author SHA1 Message Date
Safihre 233bdd5b1d Update text files for 3.4.2RC2 2021-10-06 15:00:44 +02:00
Safihre a0ab6d35c7 Require at least 1 category to be set for Sorting and warn if not set
Before 3.4.0, only for TV sorting we allowed to set 0 categories. But for Movies and Date Sorting we did require at least 1 category to be set. This was harmonized in 3.4.0, breaking existing setups. Added warning for those users.
The Sorting behavior is different from Notifications: in Notifications selecting Default only(!) means to apply it to all categories.
However, that has never been the case for Sorting. So for now added a bit more help texts to the Affected categories box on both pages.
2021-10-06 14:50:00 +02:00
Sander bd29680ce7 make .cbz a well-known extension, so that no extension is added (#1960) 2021-10-06 14:49:54 +02:00
Sander 7139e92554 make .cbr a well-known extension, so that no extension (".rar") is added (#1959) 2021-10-05 12:19:55 +02:00
Safihre 897df53466 Check for puremagic and guessit first and add comments about cherrypy 2021-10-04 08:57:58 +02:00
Safihre 58281711f6 Always show number of MB missing
https://forums.sabnzbd.org/viewtopic.php?f=2&t=25573
2021-10-04 08:57:51 +02:00
Safihre b524383aa3 Job failure due to Sorting-problems was not shown in the interface 2021-10-01 15:35:09 +02:00
Safihre 75a16e3588 Update text files for 3.4.2RC1 2021-09-30 09:04:12 +02:00
Safihre 1453032ad6 rXX files are popular extensions and don't need renames
Closes #1955
2021-09-29 13:53:47 +02:00
Safihre 824ab4afad Do not search whole file when checking if txt or nzb file 2021-09-29 13:53:37 +02:00
Safihre 73dd41c67f Only run process_unpacked_par2 when cleanup happened
Relates to https://forums.sabnzbd.org/viewtopic.php?f=1&t=25552
2021-09-29 13:53:32 +02:00
Safihre 59ee77355d Make add_parfile return if it could actually add the file
Maybe it was long finished, which could result in crashes.
Closes #1953
2021-09-29 13:53:20 +02:00
Safihre 5c758773ad Do not rename in decode_par2 if the filename didn't change
Closes #1952
2021-09-29 13:53:14 +02:00
Safihre 46de49df06 Set version to 3.4.1 2021-09-23 09:21:11 +02:00
Safihre d1c54a9a74 Merge branch 'develop' 2021-09-23 08:50:17 +02:00
Safihre e7527c45cd Set version to 3.4.0 2021-09-17 22:01:19 +02:00
Safihre 7d5207aa67 Merge branch 'develop' 2021-09-17 20:46:31 +02:00
Safihre 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 a9d86a7447 Set version to 3.2.1 2021-03-31 10:24:42 +02:00
Safihre 2abe4c3cef Merge branch '3.2.x' 2021-03-31 09:25:49 +02:00
Safihre 0542c25003 Update text files for 3.2.1
draft release
2021-03-31 09:24:31 +02:00
puzzledsab 1b8ee4e290 Show server expiration date in server summary (#1841) 2021-03-31 08:57:38 +02:00
Safihre 51128cba55 Do not notify warning/errors from same source twice
Closes #1842
2021-03-30 17:30:07 +02:00
Safihre 3612432581 Do not discard data for CrcError's
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25278
2021-03-30 16:05:04 +02:00
Safihre deca000a1b Revert some improvements to the encrypted RAR-detection
Closes #1840
2021-03-29 14:05:52 +02:00
Safihre 39cccb5653 Update text files for 3.2.1RC2
draft release
2021-03-24 10:13:43 +01:00
Safihre f6838dc985 Improvements to the encrypted RAR-detection 2021-03-20 18:32:11 +01:00
Safihre 8cd4d92395 Make get_all_passwords return only unique passwords
If the filename and the NZB specified the same one it could occur 2 or 3 times.
2021-03-20 18:32:05 +01:00
Safihre 3bf9906f45 Update text files for 3.2.1RC1
draft release
2021-03-18 10:30:05 +01:00
Safihre 9f7daf96ef Update URL for Python 3 information 2021-03-18 09:10:39 +01:00
Sander 67de4df155 deobfuscate: no globber, but use given filelist (#1830) 2021-03-18 09:10:31 +01:00
Safihre bc51a4bd1c Remove old compatibility code from BPSMeter that causes crash on startup
Closes #1827
2021-03-18 09:10:23 +01:00
Sander bb54616018 deobfuscate: rename accompanying (smaller) files with same basename, and no renaming of collections with same extension (#1826)
* deobfuscate: rename accompanying (smaller) files with same basename

* deobfuscate: do not rename collections of same extension

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

* deobfuscate: globber_full, and cleanup

* deobfuscate: unittest test_deobfuscate_big_file_small_accompanying_files

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension

* deobfuscate: unittest test_deobfuscate_collection_with_same_extension
2021-03-18 09:10:18 +01:00
Safihre 6bcff5e014 More space for the RSS table
Closes #1824
2021-03-18 09:10:09 +01:00
puzzledsab 8970a03a9a Use binary mode to make write test more accurate on Windows (#1815) 2021-03-10 22:23:10 +01:00
Safihre 3ad717ca35 Single indexer categories would be saved with "," between each letter 2021-03-10 22:23:10 +01:00
jcfp b14f72c67a fix config auto_sort setting, broken by #1666 (#1813)
* fix config auto_sort setting, broken by #1666

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

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

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

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

* check for Windows \ and POSIX /

* check again within path, typo and formatting

* regex: square brackets

* cleanup: only "/" can occur in par2

* cleanup: better logging

* unit test: testing of filesystem.renamer()

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

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

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

* more comments in code

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

* make remote black happy too

* Small changes in wording of comments and error

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-03-10 22:23:10 +01:00
jxyzn e851813cef Sanitize names possibly derived from X-DNZB-EpisodeName (#1806) 2021-03-10 22:15:23 +01:00
thezoggy 4d49ad9141 3.2.x cleanup (#1808)
* Update uni_config bootstrap css to same version of js (3.3.7).
* small accessibility change, removed thin dot border on focus

* Ignore VS Code settings folder

* cherry picked 'Fix disabled select for Glitter Night'

* glitter night - fix search border color
2021-02-27 14:47:44 +01:00
Safihre 16618b3af2 Set version to 3.2.0 2021-02-26 10:30:00 +01:00
Safihre 0e5c0f664f Merge branch '3.2.x' 2021-02-26 10:29:39 +01:00
Safihre 7be9281431 Update text files for 3.2.0
draft release
2021-02-26 09:56:47 +01:00
Safihre ee0327fac1 Update macOS build Python to 3.9.2 2021-02-26 09:44:51 +01:00
Safihre 9930de3e7f Log all nzo_info when adding NZB's
Relates to #1806
2021-02-26 09:18:14 +01:00
Sander e8503e89c6 handle gracefully if no malloc_trim() available (#1800) 2021-02-26 09:18:00 +01:00
puzzledsab 1d9ed419eb Remove some redundant ifs (#1791) 2021-02-26 09:17:29 +01:00
Safihre 0207652e3e Update text files for 3.2.0RC2
draft release
2021-02-08 21:02:38 +01:00
Safihre 0f1e99c5cb Update translatable texts 2021-02-08 13:29:16 +01:00
puzzledsabandSafihre f134bc7efb Right-to-Left support for Glitter and Config (#1776)
* Add rtl on main page

* Adjustments to rtl

* Forgot to add black check for this checkout

* Remove unnecessary style

* Remove more redundant attributes

* Some more reordering and alignment

* Align sorting and nzb drop downs

* Update NZB details and shutdown page

* Fix format

* Fix SABnzbd Config title tag

* Change file list header direction

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

* Revert some changes and handle styling using CSS

* Move more items to CSS

* Config RTL

* Move even more to CSS

* Small tweak

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

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

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

* refuse to send ssdp description_xml to outsiders
2021-02-08 13:19:30 +01:00
Safihre f42d2e4140 Rename Glitter Default to Light and make Auto the new Default 2021-02-05 15:01:28 +01:00
Sam Edwards 88882cebbc Support for auto night mode switching in Glitter (#1783) 2021-02-05 15:01:13 +01:00
Safihre 17a979675c Do not re-release from GA when the release tag is pushed 2021-02-05 15:01:04 +01:00
Safihre 4642850c79 Set macOS Python installer target to "/" 2021-02-05 15:01:00 +01:00
Safihre 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
16 changed files with 91 additions and 42 deletions

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: SABnzbd Name: SABnzbd
Version: 3.4.1 Version: 3.4.2RC2
Summary: SABnzbd-3.4.1 Summary: SABnzbd-3.4.2RC2
Home-page: https://sabnzbd.org Home-page: https://sabnzbd.org
Author: The SABnzbd Team Author: The SABnzbd Team
Author-email: team@sabnzbd.org Author-email: team@sabnzbd.org
+12 -1
View File
@@ -1,6 +1,17 @@
Release Notes - SABnzbd 3.4.1 Release Notes - SABnzbd 3.4.2 Release Candidate 2
========================================================= =========================================================
## Bugfixes since 3.4.1
- Sorting requires at least 1 category te be selected since 3.4.0.
Warning will be shown if no category is selected.
- Job failure due to Sorting-problems was not shown in the History.
- Crash when `.par2` files were missing during download.
- Prevent scanning the whole file to identify the correct extension.
- `.rXX`, `.cbz` and `.cbr` extensions were wrongly renamed.
- Processing unpacked `.par2` files would also process source
`.par2` files and could result in duplicate (`.1`) filenames.
- Always show number of MB missing during download.
## Bugfixes since 3.4.0 ## Bugfixes since 3.4.0
- macOS: Failed to run on M1 systems or older macOS versions. - macOS: Failed to run on M1 systems or older macOS versions.
+4 -3
View File
@@ -46,6 +46,8 @@ try:
import portend import portend
import cryptography import cryptography
import chardet import chardet
import guessit
import puremagic
except ImportError as e: except ImportError as e:
print("Not all required Python modules are available, please check requirements.txt") print("Not all required Python modules are available, please check requirements.txt")
print("Missing module:", e.name) print("Missing module:", e.name)
@@ -1439,12 +1441,11 @@ def main():
try: try:
cherrypy.engine.start() cherrypy.engine.start()
except: except:
# Since the webserver is started by cherrypy in a separate thread, we can't really catch any
# start-up errors. This try/except only catches very few errors, the rest is only shown in the console.
logging.error(T("Failed to start web-interface: "), exc_info=True) logging.error(T("Failed to start web-interface: "), exc_info=True)
abort_and_show_error(browserhost, cherryport) abort_and_show_error(browserhost, cherryport)
# Wait for server to become ready
cherrypy.engine.wait(cherrypy.process.wspbus.states.STARTED)
if sabnzbd.WIN32: if sabnzbd.WIN32:
if enable_https: if enable_https:
mode = "s" mode = "s"
@@ -22,6 +22,7 @@
<option value="$ct" <!--#if $ct in $getVar($section_label + '_cats') then 'selected="selected"' else ""#-->>$Tspec($ct)</option> <option value="$ct" <!--#if $ct in $getVar($section_label + '_cats') then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#--> <!--#end for#-->
</select> </select>
<p>$T('defaultNotifiesAll')</p>
</div> </div>
<!--#end def#--> <!--#end def#-->
@@ -40,6 +41,7 @@
<option value="$ct" <!--#if $ct in $email_cats then 'selected="selected"' else ""#-->>$Tspec($ct)</option> <option value="$ct" <!--#if $ct in $email_cats then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#--> <!--#end for#-->
</select> </select>
<p>$T('defaultNotifiesAll')</p>
</div> </div>
</div> </div>
<div class="col1"> <div class="col1">
@@ -11,12 +11,13 @@
<h3>$T('seriesSorting') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3> <h3>$T('seriesSorting') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p> <p>
<b>$T('affectedCat')</b><br/> <b>$T('affectedCat')</b><br/>
<select name="tv_categories" multiple="multiple" class="multiple_cats"> <select name="tv_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#--> <!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $tv_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option> <option value="$ct" <!--#if $ct in $tv_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#--> <!--#end for#-->
</select> </select>
</p> </p>
<p>$T('selectOneCat')</p>
</div> </div>
<!-- /col2 --> <!-- /col2 -->
<div class="col1"> <div class="col1">
@@ -223,12 +224,13 @@
<h3>$T('movieSort') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3> <h3>$T('movieSort') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p> <p>
<b>$T('affectedCat')</b><br/> <b>$T('affectedCat')</b><br/>
<select name="movie_categories" multiple="multiple" class="multiple_cats"> <select name="movie_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#--> <!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $movie_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option> <option value="$ct" <!--#if $ct in $movie_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#--> <!--#end for#-->
</select> </select>
</p> </p>
<p>$T('selectOneCat')</p>
</div> </div>
<!-- /col2 --> <!-- /col2 -->
<div class="col1"> <div class="col1">
@@ -419,12 +421,13 @@
<h3>$T('dateSorting') <a href="$helpuri$help_uri#toc9" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3> <h3>$T('dateSorting') <a href="$helpuri$help_uri#toc9" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p> <p>
<b>$T('affectedCat')</b><br/> <b>$T('affectedCat')</b><br/>
<select name="date_categories" multiple="multiple" class="multiple_cats"> <select name="date_categories" multiple="multiple" class="multiple_cats" required="required">
<!--#for $ct in $categories#--> <!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $date_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option> <option value="$ct" <!--#if $ct in $date_categories then 'selected="selected"' else ""#--> >$Tspec($ct)</option>
<!--#end for#--> <!--#end for#-->
</select> </select>
</p> </p>
<p>$T('selectOneCat')</p>
</div> </div>
<!-- /col2 --> <!-- /col2 -->
<div class="col1"> <div class="col1">
@@ -531,11 +531,10 @@ function QueueModel(parent, data) {
return self.name() return self.name()
}) })
self.missingText = ko.pureComputed(function() { self.missingText = ko.pureComputed(function() {
// Check for missing data, the value is arbitrary! (1%) // Check for missing data, can show 0 if article-size is smaller than 500K, but we accept that
if(self.missingMB()/self.totalMB() > 0.01) { if(self.missingMB()) {
return self.missingMB().toFixed(0) + ' MB ' + glitterTranslate.misingArt return self.missingMB().toFixed(0) + ' MB ' + glitterTranslate.misingArt
} }
return;
}) })
self.statusText = ko.computed(function() { self.statusText = ko.computed(function() {
// Checking // Checking
+1 -1
View File
@@ -233,7 +233,7 @@ rating_filter_pause_keywords = OptionStr("misc", "rating_filter_pause_keywords")
############################################################################## ##############################################################################
enable_tv_sorting = OptionBool("misc", "enable_tv_sorting", False) enable_tv_sorting = OptionBool("misc", "enable_tv_sorting", False)
tv_sort_string = OptionStr("misc", "tv_sort_string") tv_sort_string = OptionStr("misc", "tv_sort_string")
tv_categories = OptionList("misc", "tv_categories", "") tv_categories = OptionList("misc", "tv_categories", ["tv"])
enable_movie_sorting = OptionBool("misc", "enable_movie_sorting", False) enable_movie_sorting = OptionBool("misc", "enable_movie_sorting", False)
movie_sort_string = OptionStr("misc", "movie_sort_string") movie_sort_string = OptionStr("misc", "movie_sort_string")
Regular → Executable
+5 -4
View File
@@ -64,9 +64,9 @@ def decode_par2(parfile: str) -> List[str]:
with open(filepath, "rb") as fileToMatch: with open(filepath, "rb") as fileToMatch:
first16k_data = fileToMatch.read(16384) first16k_data = fileToMatch.read(16384)
# Check if we have this hash # Check if we have this hash and the filename is different
file_md5of16k = hashlib.md5(first16k_data).digest() file_md5of16k = hashlib.md5(first16k_data).digest()
if file_md5of16k in md5of16k: if file_md5of16k in md5of16k and fn != md5of16k[file_md5of16k]:
new_path = os.path.join(dirname, md5of16k[file_md5of16k]) new_path = os.path.join(dirname, md5of16k[file_md5of16k])
# Make sure it's a unique name # Make sure it's a unique name
unique_filename = get_unique_filename(new_path) unique_filename = get_unique_filename(new_path)
@@ -166,7 +166,7 @@ def deobfuscate_list(filelist: List[str], usefulname: str):
# 2. if no meaningful extension, add it # 2. if no meaningful extension, add it
# 3. based on detecting obfuscated filenames # 3. based on detecting obfuscated filenames
# to be sure, only keep really exsiting files: # to be sure, only keep really existing files:
filelist = [f for f in filelist if os.path.isfile(f)] filelist = [f for f in filelist if os.path.isfile(f)]
# let's see if there are files with uncommon/unpopular (so: obfuscated) extensions # let's see if there are files with uncommon/unpopular (so: obfuscated) extensions
@@ -176,7 +176,7 @@ def deobfuscate_list(filelist: List[str], usefulname: str):
for file in filelist: for file in filelist:
if file_extension.has_popular_extension(file): if file_extension.has_popular_extension(file):
# common extension, like .doc or .iso, so assume OK and change nothing # common extension, like .doc or .iso, so assume OK and change nothing
logging.debug("extension of %s looks common", file) logging.debug("Extension of %s looks common", file)
newlist.append(file) newlist.append(file)
else: else:
# uncommon (so: obfuscated) extension # uncommon (so: obfuscated) extension
@@ -220,6 +220,7 @@ def deobfuscate_list(filelist: List[str], usefulname: str):
# check that file is still there (and not renamed by the secondary renaming process below) # check that file is still there (and not renamed by the secondary renaming process below)
if not os.path.isfile(filename): if not os.path.isfile(filename):
continue continue
logging.debug("Deobfuscate inspecting %s", filename) logging.debug("Deobfuscate inspecting %s", filename)
# Do we need to rename this file? # Do we need to rename this file?
# Criteria: big, not-excluded extension, obfuscated (in that order) # Criteria: big, not-excluded extension, obfuscated (in that order)
+1 -2
View File
@@ -1118,8 +1118,7 @@ def par2_repair(parfile_nzf: NzbFile, nzo: NzbObject, workdir, setname, single):
readd = False readd = False
for extrapar in nzo.extrapars[setname][:]: for extrapar in nzo.extrapars[setname][:]:
# Make sure we only get new par2 files # Make sure we only get new par2 files
if extrapar not in nzo.finished_files and extrapar not in nzo.files: if nzo.add_parfile(extrapar):
nzo.add_parfile(extrapar)
readd = True readd = True
if readd: if readd:
return readd, result return readd, result
+13 -11
View File
@@ -1105,8 +1105,7 @@ class NzbObject(TryList):
self.postpone_pars(nzf, setname) self.postpone_pars(nzf, setname)
# Get the next one # Get the next one
for new_nzf in self.extrapars[setname]: for new_nzf in self.extrapars[setname]:
if not new_nzf.completed: if self.add_parfile(new_nzf):
self.add_parfile(new_nzf)
# Add it to the top # Add it to the top
self.files.remove(new_nzf) self.files.remove(new_nzf)
self.files.insert(0, new_nzf) self.files.insert(0, new_nzf)
@@ -1143,8 +1142,8 @@ class NzbObject(TryList):
added_blocks = 0 added_blocks = 0
while added_blocks < needed_blocks: while added_blocks < needed_blocks:
new_nzf = block_list.pop() new_nzf = block_list.pop()
self.add_parfile(new_nzf) if self.add_parfile(new_nzf):
added_blocks += new_nzf.blocks added_blocks += new_nzf.blocks
logging.info("Added %s blocks to %s", added_blocks, self.final_name) logging.info("Added %s blocks to %s", added_blocks, self.final_name)
return added_blocks return added_blocks
@@ -1433,15 +1432,18 @@ class NzbObject(TryList):
self.unwanted_ext = 2 self.unwanted_ext = 2
@synchronized(NZO_LOCK) @synchronized(NZO_LOCK)
def add_parfile(self, parfile: NzbFile): def add_parfile(self, parfile: NzbFile) -> bool:
"""Add parfile to the files to be downloaded """Add parfile to the files to be downloaded
Resets trylist just to be sure Resets trylist just to be sure
Adjust download-size accordingly Adjust download-size accordingly
Returns False when the file couldn't be added
""" """
if not parfile.completed and parfile not in self.files and parfile not in self.finished_files: if not parfile.completed and parfile not in self.files and parfile not in self.finished_files:
parfile.reset_try_list() parfile.reset_try_list()
self.files.append(parfile) self.files.append(parfile)
self.bytes_tried -= parfile.bytes_left self.bytes_tried -= parfile.bytes_left
return True
return False
@synchronized(NZO_LOCK) @synchronized(NZO_LOCK)
def remove_parset(self, setname: str): def remove_parset(self, setname: str):
@@ -1468,12 +1470,12 @@ class NzbObject(TryList):
# from all the sets. This probably means we get too much par2, but it's worth it. # from all the sets. This probably means we get too much par2, but it's worth it.
blocks_new = 0 blocks_new = 0
for new_nzf in self.extrapars[parset]: for new_nzf in self.extrapars[parset]:
self.add_parfile(new_nzf) if self.add_parfile(new_nzf):
blocks_new += new_nzf.blocks blocks_new += new_nzf.blocks
# Enough now? # Enough now?
if blocks_new >= self.bad_articles: if blocks_new >= self.bad_articles:
logging.info("Prospectively added %s repair blocks to %s", blocks_new, self.final_name) logging.info("Prospectively added %s repair blocks to %s", blocks_new, self.final_name)
break break
# Reset NZO TryList # Reset NZO TryList
self.reset_try_list() self.reset_try_list()
+3 -1
View File
@@ -515,12 +515,14 @@ def process_job(nzo: NzbObject):
workdir_complete, ok = file_sorter.sorter.rename(newfiles, workdir_complete) workdir_complete, ok = file_sorter.sorter.rename(newfiles, workdir_complete)
if not ok: if not ok:
nzo.set_unpack_info("Unpack", T("Failed to move files")) nzo.set_unpack_info("Unpack", T("Failed to move files"))
nzo.fail_msg = T("Failed to move files")
all_ok = False all_ok = False
# Run further post-processing # Run further post-processing
if (all_ok or not cfg.safe_postproc()) and not nzb_list: if (all_ok or not cfg.safe_postproc()) and not nzb_list:
# Use par2 files to deobfuscate unpacked file names # Use par2 files to deobfuscate unpacked file names
if cfg.process_unpacked_par2(): # Only if we also run cleanup, so not to process the "regular" par2 files
if flag_delete and cfg.process_unpacked_par2():
newfiles = deobfuscate.recover_par2_names(newfiles) newfiles = deobfuscate.recover_par2_names(newfiles)
if cfg.deobfuscate_final_filenames(): if cfg.deobfuscate_final_filenames():
+4
View File
@@ -701,6 +701,9 @@ SKIN_TEXT = {
"link-download": TT("Download"), #: Config->RSS button "download item" "link-download": TT("Download"), #: Config->RSS button "download item"
"button-rssNow": TT("Read All Feeds Now"), #: Config->RSS button "button-rssNow": TT("Read All Feeds Now"), #: Config->RSS button
# Config->Notifications # Config->Notifications
"defaultNotifiesAll": TT(
"If only the <em>Default</em> category is selected, notifications are enabled for jobs in all categories."
),
"opt-email_endjob": TT("Email Notification On Job Completion"), "opt-email_endjob": TT("Email Notification On Job Completion"),
"email-never": TT("Never"), #: When to send email "email-never": TT("Never"), #: When to send email
"email-always": TT("Always"), #: When to send email "email-always": TT("Always"), #: When to send email
@@ -773,6 +776,7 @@ SKIN_TEXT = {
"catTags": TT("Indexer Categories / Groups"), "catTags": TT("Indexer Categories / Groups"),
"button-delCat": TT("X"), #: Small delete button "button-delCat": TT("X"), #: Small delete button
# Config->Sorting # Config->Sorting
"selectOneCat": TT("Select at least 1 category."),
"seriesSorting": TT("Series Sorting"), "seriesSorting": TT("Series Sorting"),
"opt-tvsort": TT("Enable TV Sorting"), "opt-tvsort": TT("Enable TV Sorting"),
"sort-legenda": TT("Pattern Key"), "sort-legenda": TT("Pattern Key"),
+15 -3
View File
@@ -305,7 +305,7 @@ class BaseSorter:
except: except:
logging.error(T("Failed to rename: %s to %s"), clip_path(current_path), clip_path(newpath)) logging.error(T("Failed to rename: %s to %s"), clip_path(current_path), clip_path(newpath))
logging.info("Traceback: ", exc_info=True) logging.info("Traceback: ", exc_info=True)
rename_similar(current_path, ext, self.filename_set, ()) rename_similar(current_path, ext, self.filename_set)
else: else:
logging.debug("Nothing to rename, %s", files) logging.debug("Nothing to rename, %s", files)
@@ -363,6 +363,10 @@ class SeriesSorter(BaseSorter):
self.matched = True self.matched = True
self.type = "tv" self.type = "tv"
# Require at least 1 category, this was not enforced before 3.4.0
if cfg.enable_tv_sorting() and not self.cats:
logging.warning("%s: %s", T("Series Sorting"), T("Select at least 1 category."))
def get_values(self): def get_values(self):
"""Collect all values needed for path replacement""" """Collect all values needed for path replacement"""
self.get_year() self.get_year()
@@ -426,6 +430,10 @@ class MovieSorter(BaseSorter):
self.matched = True self.matched = True
self.type = "movie" self.type = "movie"
# Require at least 1 category, this was not enforced before 3.4.0
if cfg.enable_movie_sorting() and not self.cats:
logging.warning("%s: %s", T("Movie Sorting"), T("Select at least 1 category."))
def get_values(self): def get_values(self):
"""Collect all values needed for path replacement""" """Collect all values needed for path replacement"""
self.get_year() self.get_year()
@@ -506,6 +514,10 @@ class DateSorter(BaseSorter):
self.matched = True self.matched = True
self.type = "date" self.type = "date"
# Require at least 1 category, this was not enforced before 3.4.0
if cfg.enable_date_sorting() and not self.cats:
logging.warning("%s: %s", T("Date Sorting"), T("Select at least 1 category."))
def get_date(self): def get_date(self):
"""Get month and day""" """Get month and day"""
self.info["month"] = str(self.guess.get("date").month) self.info["month"] = str(self.guess.get("date").month)
@@ -794,7 +806,7 @@ def strip_path_elements(path: str) -> str:
return "\\\\" + path if is_unc else path return "\\\\" + path if is_unc else path
def rename_similar(folder: str, skip_ext: str, name: str, skipped_files: List[str]): def rename_similar(folder: str, skip_ext: str, name: str, skipped_files: Optional[List[str]] = None):
"""Rename all other files in the 'folder' hierarchy after 'name' """Rename all other files in the 'folder' hierarchy after 'name'
and move them to the root of 'folder'. and move them to the root of 'folder'.
Files having extension 'skip_ext' will be moved, but not renamed. Files having extension 'skip_ext' will be moved, but not renamed.
@@ -807,7 +819,7 @@ def rename_similar(folder: str, skip_ext: str, name: str, skipped_files: List[st
for root, dirs, files in os.walk(folder): for root, dirs, files in os.walk(folder):
for f in files: for f in files:
path = os.path.join(root, f) path = os.path.join(root, f)
if path in skipped_files: if skipped_files and path in skipped_files:
continue continue
org, ext = os.path.splitext(f) org, ext = os.path.splitext(f)
if ext.lower() == skip_ext: if ext.lower() == skip_ext:
+15 -6
View File
@@ -8,10 +8,11 @@ Note: extension always contains a leading dot
import puremagic import puremagic
import os import os
import sys import sys
import re
from typing import List from typing import List
from pathlib import Path
from sabnzbd.filesystem import get_ext from sabnzbd.filesystem import get_ext
# common extension from https://www.computerhope.com/issues/ch001789.htm # common extension from https://www.computerhope.com/issues/ch001789.htm
POPULAR_EXT = ( POPULAR_EXT = (
"3g2", "3g2",
@@ -168,6 +169,8 @@ DOWNLOAD_EXT = (
"bdmv", "bdmv",
"bin", "bin",
"bup", "bup",
"cbr",
"cbz",
"clpi", "clpi",
"crx", "crx",
"db", "db",
@@ -234,16 +237,19 @@ DOWNLOAD_EXT = (
"xpi", "xpi",
) )
# combine to one tuple, with unique entries: # Combine to one tuple, with unique entries:
ALL_EXT = tuple(set(POPULAR_EXT + DOWNLOAD_EXT)) ALL_EXT = tuple(set(POPULAR_EXT + DOWNLOAD_EXT))
# prepend a dot to each extension, because we work with a leading dot in extensions # Prepend a dot to each extension, because we work with a leading dot in extensions
ALL_EXT = tuple(["." + i for i in ALL_EXT]) ALL_EXT = tuple(["." + i for i in ALL_EXT])
# Match old-style multi-rar extensions
SIMPLE_RAR_RE = re.compile(r"\.r\d\d\d?$", re.I)
def has_popular_extension(file_path: str) -> bool: def has_popular_extension(file_path: str) -> bool:
"""returns boolean if the extension of file_path is a popular, well-known extension""" """returns boolean if the extension of file_path is a popular, well-known extension"""
file_extension = get_ext(file_path) file_extension = get_ext(file_path)
return file_extension in ALL_EXT return file_extension in ALL_EXT or SIMPLE_RAR_RE.match(file_extension)
def all_possible_extensions(file_path: str) -> List[str]: def all_possible_extensions(file_path: str) -> List[str]:
@@ -264,9 +270,12 @@ def what_is_most_likely_extension(file_path: str) -> str:
# Check if text or NZB, as puremagic is not good at that. # Check if text or NZB, as puremagic is not good at that.
try: try:
txt = Path(file_path).read_text() # Only read the start, don't need the whole file
with open(file_path, "r") as inp_file:
txt = inp_file.read(200).lower()
# Yes, a text file ... so let's check if it's even an NZB: # Yes, a text file ... so let's check if it's even an NZB:
if txt.lower().find("<nzb xmlns=") >= 0 or txt.lower().find("!doctype nzb public") >= 0: if "!doctype nzb public" in txt or "<nzb xmlns=" in txt:
# yes, contains NZB signals: # yes, contains NZB signals:
return ".nzb" return ".nzb"
else: else:
+2 -2
View File
@@ -5,5 +5,5 @@
# You MUST use double quotes (so " and not ') # You MUST use double quotes (so " and not ')
__version__ = "develop" __version__ = "3.4.1"
__baseline__ = "unknown" __baseline__ = "447a7b684c32ca28dc8dfff285330c2c7de98377"
+4
View File
@@ -29,6 +29,10 @@ class Test_File_Extension:
assert file_extension.has_popular_extension("blabla/blabla.mkv") assert file_extension.has_popular_extension("blabla/blabla.mkv")
assert file_extension.has_popular_extension("blabla/blabla.srt") assert file_extension.has_popular_extension("blabla/blabla.srt")
assert file_extension.has_popular_extension("djjddj/aaaaa.epub") assert file_extension.has_popular_extension("djjddj/aaaaa.epub")
assert file_extension.has_popular_extension("test/testing.r01")
assert file_extension.has_popular_extension("test/testing.r901")
assert not file_extension.has_popular_extension("test/testing")
assert not file_extension.has_popular_extension("test/testing.rar01")
assert not file_extension.has_popular_extension("98ads098f098fa.a0ds98f098asdf") assert not file_extension.has_popular_extension("98ads098f098fa.a0ds98f098asdf")
def test_what_is_most_likely_extension(self): def test_what_is_most_likely_extension(self):