Compare commits

..

247 Commits

Author SHA1 Message Date
Safihre
730652e3e1 Set version to 2.3.3 2018-04-22 19:15:41 +02:00
Safihre
1aed59d52e Merge branch 'develop' 2018-04-22 19:14:52 +02:00
Safihre
1f04343a4d Update text files for 2.3.3 2018-04-22 18:56:38 +02:00
SABnzbd Automation
70f8509f6e Automatic translation update 2018-04-21 18:57:45 +00:00
jcfp
74a97296a5 Accept cheetah version newer than 2.x
I'm going to update cheetah to v. 3.x in debian soonish. All seems to work fine with sab in a quick test, apart from this version check.
2018-04-21 16:41:28 +02:00
Safihre
45d3440443 Multi-archive and split-files can also have more than 999 parts
https://forums.sabnzbd.org/viewtopic.php?f=3&t=23338
2018-04-18 09:23:19 +02:00
Safihre
c872ee16ab Changing Server priority would give JSON-page 2018-04-17 15:53:09 +02:00
Safihre
da473424f2 Bump SABYenc to 3.3.5 2018-04-17 15:52:20 +02:00
Safihre
e0dc988f94 Update text files for 2.3.3RC2 2018-04-13 13:24:24 +02:00
sanderjo
4021e6098c Improved SAN in SAB's self signed cert.
Closes #1127
Closes #1128
2018-04-13 13:05:14 +02:00
Safihre
f521037669 Files unpacked from 7zip/zip were not sorted
Closes #1124
Introduced new function to recursive list all files in a directory.
2018-04-13 10:04:45 +02:00
Safihre
246e9e421b Re-shuffle deriving of script from category
Closes #1125
2018-04-12 11:54:27 +02:00
Safihre
8aaee09652 Increase some logging and history update 2018-04-10 16:22:28 +02:00
Sander
e36450a666 Better IPv6 address handling in hostname check 2018-04-02 10:38:23 +02:00
Safihre
d84f31c116 Update text files for 2.3.3RC1 2018-03-27 12:52:37 +02:00
Safihre
e5fc51e9d7 Add option to disable X-Frame-Headers
Closes #1118
Now only added to page-requests, not also to every API-request. Only needed for real pages.
2018-03-27 10:51:51 +02:00
Safihre
291a72ec63 Bump SABYenc to 3.3.4 2018-03-25 17:16:47 +02:00
SABnzbd Automation
4dd5115b03 Automatic translation update 2018-03-23 20:09:30 +00:00
Safihre
3bdb8407d2 Hide smpl as option in Config General 2018-03-23 11:38:00 +01:00
Safihre
a88055c491 Restructure interface.py
Such a mess.
Time to clean up bit by bit.
2018-03-23 11:24:56 +01:00
Safihre
8a676aeab4 Use general shutdown_program function everywhere 2018-03-23 11:01:42 +01:00
Safihre
d41276aa82 Make maximum retries of URL fetches configurable
As a Special-option for now.
Closes #1115.
2018-03-21 22:57:04 +01:00
Safihre
96cb0aa8db Run PostProc on failed URL fetches in order to also run scripts
Closes #1108
Linked #1115
2018-03-21 10:06:23 +01:00
Safihre
03e7889d5c Evaluate cat/pp/script/priority also for placeholder NZO's
Needed to resolve #1108.
Also made small changes to improve readability of init() function.
2018-03-20 16:42:34 +01:00
Safihre
5c161b884c Remove unnecessary code from set_cat in interface
Need to get rid of SMPL.
2018-03-20 16:25:21 +01:00
Safihre
f77cc43b7d Indicate that SMPL skin may lose functionality in future releases 2018-03-20 15:15:37 +01:00
Safihre
bd709a7bdd Use VALID_NZB_FILES constant 2018-03-20 11:36:32 +01:00
Safihre
c3832a85f7 Job would stay forever if URLGrabber grabbed nonsense 2018-03-18 18:36:58 +01:00
Safihre
3c87fd45c3 Set version to 2.3.2 2017-12-21 20:41:52 +01:00
Safihre
d0a258ce28 Merge branch 'develop' 2017-12-21 20:38:19 +01:00
Safihre
5ca4811689 Set version to 2.3.1 and resolve merge conflicts 2017-10-27 10:12:36 +02:00
Safihre
043e5966ff Merge branch 'develop' 2017-10-27 10:07:42 +02:00
Safihre
d69796d351 Set version to 2.3.0 and resolve merge conflict 2017-09-21 10:13:56 +02:00
Safihre
a2d5713477 Merge branch 'develop' 2017-09-21 10:10:45 +02:00
Safihre
29ec4d9a23 Set 2.2.1 version and update translations 2017-08-25 22:11:47 +02:00
Safihre
22517a7cd7 Merge branch '2.2.x' 2017-08-25 22:07:15 +02:00
Safihre
bcc4dd75cf Update text files for 2.2.1 2017-08-25 21:58:48 +02:00
Safihre
97711ca82e Revert "Remove locks from ArticleCache"
This reverts commit 5e7558ce4a.
2017-08-25 21:57:16 +02:00
Safihre
e782237f27 More logging when adding NZB's 2017-08-25 21:49:24 +02:00
Safihre
52bb156c08 Ignore unpack errors in duplicate rarsets
Multipar and par2tbb will detect and log them so we can remove them, but par2cmdline will not.
2017-08-25 16:58:38 +02:00
Safihre
4361d82ddd Duplicate files in NZB could result in broken unpack after repair
Because par2 would detect them, but not use them. So ".1" files would later be used for unpack, even though it's not a real set.
2017-08-25 16:57:47 +02:00
Safihre
017cf8f285 Do not fail a job if recursive unpack fails
The user can handle it, we did our part.
2017-08-25 09:15:14 +02:00
Safihre
03cdf6ed5d Sync translatable texts from develop
To avoid conflicts on Launchpad
2017-08-24 23:40:37 +02:00
Safihre
cf347a8e90 Original files would be deleted after a MultiPar rename 2017-08-24 23:36:36 +02:00
Safihre
f06afe43e1 Use fileobj to prevent having to chdir, which can crash on macOS
If something is "wrong" with the current directory, for example when SABnzbd is started after downloading in a sandbox by macOS security, this function can error and break the adding of NZB's.
Have to use a fileobj, otherwise GZip will put the whole path inside there.
2017-08-24 16:36:13 +02:00
Safihre
fb301eb5c8 Update text files for 2.2.1RC2 2017-08-23 22:49:59 +02:00
Safihre
1562c3560b Handle '482 Download limt exceeded'
Closes #1009
2017-08-23 22:48:15 +02:00
Safihre
9813bc237f Only auto-disconnect after first run of verification 2017-08-23 21:42:56 +02:00
Safihre
b39fe059c6 Pause between unpacks on Windows, otherwise subprocess_fix overloads
Strange but true, but on jobs with many small files to unpack, it would just fail.
2017-08-23 21:42:17 +02:00
Safihre
a56c770a8b The real anti-stalling fix
Woohoo!
For each NZF (file) make sure all articles have tried a server before marking it as tried. Before if articles were still in transit they could be marked as tried on NZF level before the server could get to them,
2017-08-23 16:02:01 +02:00
Safihre
e3bf0edad8 TryList reset at NZO level also nessecary
Timing issue between when a new server is selected and when a job is added to the NZO-level try-list. Locks were tried, but failed.
2017-08-23 09:11:01 +02:00
Safihre
e35d9e4db3 Correct handeling of TryList when server has timeout 2017-08-23 08:32:47 +02:00
Safihre
c617d4321a Correctly remove + from INFO label in all languages 2017-08-22 16:13:24 +02:00
Safihre
0fd3a2881f Correct redirect after ports change 2017-08-22 10:19:42 +02:00
Safihre
0c1f7633de Only discard really non-unique hashes from md5of16k 2017-08-22 09:43:33 +02:00
Safihre
b7d5d49c84 Show hover-title that the compress icon is Direct Unpack 2017-08-22 09:43:26 +02:00
Safihre
9911b93ece Add error when NZO creation fails 2017-08-22 09:43:11 +02:00
Safihre
eeaad00968 Also hide email-accounts in logging 2017-08-22 09:43:06 +02:00
Safihre
e1bb8459e3 Take the risk of allowing up to 5 bad articles in jobs without Par2 2017-08-22 09:42:47 +02:00
Safihre
65c3ac0cc0 Warn in case the password file has too many passwords 2017-08-22 09:42:16 +02:00
Safihre
413c02a80f Do not run get_new_id forever in case of problems
#984
2017-08-22 09:41:40 +02:00
Safihre
80f118f304 UnRar is required to read some RAR files 2017-08-21 08:23:10 +02:00
Safihre
5c0a10e16b Update text files for 2.2.1RC1 2017-08-19 11:06:40 +02:00
Safihre
d9b32261e7 Reset all NZO TryList when doing Prospective Add
I thought in c14b3ed82a that this was enough, but clearly it is not.
2017-08-19 11:03:22 +02:00
Safihre
8d8ce52193 Stall prevention by checking TryList 2017-08-19 11:03:15 +02:00
Safihre
1cc2e25cda Update to 2.2.0 2017-08-17 10:47:04 +02:00
Safihre
4605c3fd30 Set version to 2.1.0 and make identical to develop 2017-06-09 11:35:46 +02:00
Safihre
ed7dc3f827 Merge branch 'develop' 2017-06-09 11:30:43 +02:00
Safihre
e69eeebdd8 Merge branch 'develop' - Update to 2.0.1 2017-05-24 12:14:56 +02:00
Safihre
5da5f1adc1 Set version to 2.0.0 2017-04-09 12:25:05 +02:00
Safihre
f47e92dec0 Merge branch 'develop' 2017-04-09 11:59:13 +02:00
Safihre
a894ca5171 Set version to 1.2.3 2017-03-18 13:05:04 +01:00
Safihre
5abe1140ae Merge branch '1.2.x' 2017-03-18 13:03:36 +01:00
Safihre
d34e14370c Chain certificates not loaded in all situations of extra servers 2017-03-18 11:43:46 +01:00
Safihre
c4f4a3131c Update 1.2.3 text files for extra bugfix 2017-03-18 11:40:57 +01:00
Safihre
dcbd9b57f3 CherryPy would fallback to (non-existing) pyopenssl for extra servers
Causing failed starts
2017-03-18 11:39:40 +01:00
Safihre
aad3b54a17 Update Text Files for 1.2.3
These patches were already tested within 2.0.0Alpha/Beta, so considerd safe.
2017-03-18 11:04:57 +01:00
Safihre
cde142a371 Windows paths can't end in a dot 2017-03-18 11:02:14 +01:00
Safihre
8bfc98ffc6 Glitter server unblock button wasn't working
Closes #864
2017-03-18 11:01:51 +01:00
Jonathon Saine
e46f21d566 Fix -w option as it no longer needs arguments. 2017-03-18 11:00:46 +01:00
Safihre
0e45fdcdfd Fix BPS manager breaking the downloader due to Quota 2017-03-18 10:28:31 +01:00
Safihre
eec7af16d7 Improve log obfuscation
It needs to match any charachters not just alpha-numeric
2017-03-18 10:28:03 +01:00
Safihre
6532425902 Kill the UnRar after a Windows failure
On Windows Server it seems unrar otherwise won't stop: https://forums.sabnzbd.org/viewtopic.php?f=3&t=22492
2017-03-18 10:27:57 +01:00
Safihre
44b896522c Unzip needs clipped paths
(7zip doesn't)
2017-03-18 10:26:32 +01:00
Safihre
1b16ee44cb Set version to 1.2.2 2017-02-28 11:17:24 +01:00
Safihre
d5f608c28c Merged branch 1.2.x into master 2017-02-28 11:16:59 +01:00
Safihre
555d8418e7 Update text files for 1.2.2 2017-02-25 22:12:34 +01:00
Safihre
8c22e35da4 Script paths were not clipped correctly 2017-02-25 22:07:25 +01:00
Safihre
95a7924b31 Set version to 1.2.1 and fix small discrepancies 2017-02-24 11:22:55 +01:00
Safihre
5830bebd95 Merge branch '1.2.x' 2017-02-24 11:16:18 +01:00
shypike
d32cf57c75 Update translations 2017-02-24 10:03:07 +01:00
Safihre
6d9242ebc5 Update text files for 1.2.1 Final 2017-02-23 11:53:56 +01:00
Safihre
cbc4f6a964 When retry of unpack due to Windows bug, send the actual password
We converted the password to "-p<password>" and when we had to retry it due to a Windows long-path fail, it would become "-p-p<password" and would incorrectly report that the password was wrong.
2017-02-21 20:09:07 +01:00
Safihre
2a3b2b9556 Forced diskspace check seperate from cached one
Closes #826. Otherwise the complete/incomplete get out of sync.
2017-02-20 15:43:55 +01:00
Safihre
53a219f12b Tooltip for Download/Incomplete in Status Windows
Closes #827
2017-02-20 09:03:45 +01:00
Safihre
48519dcfa0 Correct mistake in Diskspace calculation for Unix 2017-02-19 16:12:15 +01:00
Safihre
92542c58fe Diskspace for Complete folder was not calculated 2017-02-19 16:12:07 +01:00
Safihre
7eafe730f9 Modify RarFile to properly handle testrar on Windows
Because unrar doesn't support \\?\ notation for the path to the rarfile we used to clip the path. However, the Python functions that RarFile uses then fail on unicode or jobs with '?' in the filename. Now this is handled correctly, at the very last moment before testing the RAR.
2017-02-19 01:47:29 +01:00
Safihre
494e72a996 Update to 1.2.0 and set version 2017-01-13 17:00:51 +01:00
Safihre
84cc86f1d3 Update to 1.1.1 and set version (#731) 2016-11-11 13:58:07 +01:00
shypike
64479e2e5d Correct the merge of release 1.1.0 to the "master" branch. 2016-09-14 08:26:02 +02:00
shypike
13b523d9bd Merge pull request #681 from Safihre/master
Master to 1.1.0
2016-09-13 16:25:05 +02:00
Safihre
181881a21b Merge branch 'develop' 2016-09-11 22:16:42 +02:00
shypike
86d11095ac Merge pull request #592 from sabnzbd/1.0.x
Update master to 1.0.3
2016-06-10 19:01:03 +02:00
shypike
927ba3cd9d Update text files for 1.0.3 2016-06-04 13:34:11 +02:00
Safihre
6296fc1762 #568 Add code 482 to check for too-many-connections 2016-06-03 23:24:07 +02:00
shypike
60fbe44724 Support X-DNZB-PASSWORD header. 2016-06-03 22:18:56 +02:00
shypike
29e45da431 Fix NZB association for Windows.
Make sure that the second SABnzbd instance sends an UTF-8 encoded URL to the first instance.
Otherwise CherryPy will reject the API call.
2016-06-03 22:07:44 +02:00
shypike
d82e69eef4 Handle checksum error reports from unrar. 2016-06-02 23:19:57 +02:00
shypike
8c7d557252 Prevent job from hanging when adding back par2 files.
Sometimes already completed par2 files are being re-added to the queue as extra par2 files.
Because these files are already complete, there will be no attempt to download them
and as a result they will never leave the queue.
2016-06-02 22:11:59 +02:00
shypike
a56d6e5517 Merge pull request #577 from sabnzbd/1.0.x
1.0.x to master
2016-05-23 18:11:23 +02:00
shypike
7548d9e975 Correct base version number for 1.0.x releases. 2016-05-10 14:43:14 +02:00
shypike
b7e2bd9684 Update text files for 1.0.2 2016-05-03 19:39:45 +02:00
shypike
f0a243e3d3 Fix API status issues.
Remove the "ToPP" status, it serves no purpose.
Only truly deleted jobs should get the "Deleted" status,
not jobs moving from Download to PP queue.
2016-05-01 14:42:07 +02:00
shypike
6e108c9ef2 Prevent Completed and Failed jobs from getting status Deleted. 2016-04-30 11:47:03 +02:00
shypike
89edcc1924 Log the preferred character encoding 2016-04-30 11:18:32 +02:00
shypike
8a6aca47a1 Prevent stalling at 100% when QuickCheck is Off and "Download-all-pars" is On.
The repair function sent all extra par2 files back to the queue
even though they were already downloaded.
2016-04-28 22:42:51 +02:00
shypike
d03e5780b8 Fix API compatibility of queue statuses.
The new statuses TO_PP and DELETED should not be returned by the API.
Tools may not be able to handle them and they are only useful for internal purposes.
2016-04-27 12:03:37 +02:00
shypike
209d8f9b40 NNTP error 502 should not aways be interpreted as bad login.
It can also mean "too many connections".
2016-04-27 11:52:56 +02:00
shypike
c257b1be3d Update text files for 1.0.1 2016-04-26 19:57:22 +02:00
Safihre
2c48c8de2e Force MIME types for CSS and JS files
Caused problems on Windows if external programs overwriten it in registery.
See: http://forums.sabnzbd.org/viewtopic.php?f=2&t=20490
And: https://www.reddit.com/r/usenet/comments/4fkmcx/my_sab_interface_is_text_only/
2016-04-26 19:48:47 +02:00
shypike
a767ef6aed Fix API compatibility of queue.
The new statuses TO_PP and DELETED should not be returned by the API.
Tools may not be able to handle them and they are only useful for internal purposes.
2016-04-26 19:47:38 +02:00
shypike
ad61d1dd03 The pre-queue script can now return an accept value of 2, meaning immediate failure.
Supports front-ends which need the signal that an NZB has been
rejected by the pre-queue script.
2016-04-22 21:54:45 +02:00
shypike
33c3d187a0 Add start script for portable Windows installations 2016-04-22 16:44:37 +02:00
shypike
4eb486d4e2 Update text files for 1.0.0RC1 2016-04-16 15:31:48 +02:00
shypike
bfb6c167a4 Another attempt to set the default cache to 450M. 2016-04-16 15:27:35 +02:00
shypike
44abf3bdf6 Update text files for 1.0.1RC1 2016-04-15 23:12:22 +02:00
shypike
c950572592 Set default cache to 450M 2016-04-15 23:11:53 +02:00
shypike
3999cb13fd Update text files for 1.0.1RC1 2016-04-15 21:06:55 +02:00
shypike
af65075f0c Update text files for 1.0.0RC1 2016-04-15 21:05:53 +02:00
shypike
de2a2b465b Update text files for 1.0.1RC1 2016-04-13 22:41:13 +02:00
shypike
cd7a77f02d Revert "Set default cache size to 750MB on Windows and OSX."
This reverts commit 9b420e91c9.
2016-04-13 22:30:05 +02:00
shypike
f4a5394b63 Prevent creating orphan items in "incomplete" when deleting downloading jobs.
Due to previous issues where articles could be lost,
the nzf.deleted and no.deleted flags were not obeyed.
This could lead to creation of orphans when lost articles would be flushed.

Better solution: drop articles only when job is in a final state.
Also prevent NZO files from being saved when job is in "deleted" state.
2016-04-13 18:32:23 +02:00
jdfalk
3fb6a8dedb Update sabnzbd@.service
1. Added requirement for network to be up before sab starts.
2. Explicitly set service type to simple.
3. Enabled sabnzbd restart on service failure via systemd.
2016-04-13 18:22:11 +02:00
Safihre
50c8f84eba #448-#126 Forced item with missing articles caused overflow in paused queue
Closes #448
Closes #126
2016-04-13 18:21:41 +02:00
Safihre
2c7ecdee92 #464 Grabbing items don't always have status=grabbing
But now they do!
2016-04-07 21:45:28 +02:00
Safihre
72390a793a Add Optional label to Retry password 2016-04-07 21:45:17 +02:00
Safihre
04ad4e5d3e Update cache text to more 2016 values 2016-04-07 21:45:05 +02:00
Safihre
5ef9c6a433 #530 do not ignore files in QuickCheck
Par2 wouldn't ignore them either
2016-04-07 21:44:51 +02:00
shypike
e6baffc839 Prevent API crashes when 'mode' or 'name' have double entries. 2016-04-07 21:35:07 +02:00
shypike
e361eb25a5 Fix potential race condition in BPSmeter. 2016-04-01 21:18:19 +02:00
shypike
9b420e91c9 Set default cache size to 750MB on Windows and OSX.
To make handling of posts with large files more efficient.
2016-04-01 21:09:15 +02:00
Safihre
3a4bf971b2 #529 Fix unicode strip in OptionStr 2016-04-01 20:47:11 +02:00
Safihre
1128691c5d #527 Fix "Download all par2 files" behavior 2016-03-29 21:03:48 +02:00
Safihre
15043aef3f DB Strings should be encapsulated in ' not " 2016-03-29 21:03:30 +02:00
savef
2a3b4afa03 Treat ambiguous numeric values as number of minutes for custom pause time.
Currently if you just type "100" into the custom pause field it'll think you want 143015 minutes, that's useless. A lot of people are probably used to the old Plush behaviour of entering the number of minutes you want to pause for, it's also a much saner default. So in the case that the user just enters some numbers and nothing else, this assumes they want to pause for that many minutes.
2016-03-24 21:01:04 +01:00
shypike
00a98efa81 Fix race-condition when deleting an actively downloading job.
Closes #237
2016-03-24 20:57:27 +01:00
shypike
f013dd7f0d Accept MIME records that have only LF line endings.
Some tool developers just ignore the rule requiring CRLF.
2016-03-23 23:29:12 +01:00
shypike
7b91b1c769 Fix race condition when API and postprocessor both want to delete a history item. 2016-03-23 23:03:28 +01:00
shypike
5583cce322 When urlgrabber receives a 404, stop trying. 2016-03-23 23:00:38 +01:00
shypike
b995c5f992 Fix PushOver support.
Adjust priority levels to the current PushOver API.
Re-enable device field now that the PushOver API supports readable device labels.
2016-03-22 21:25:05 +01:00
shypike
214ac4a53d Prevent incompatibility due to missing 'script_log' field.
Fixes commit c0f2f59fc1
2016-03-20 15:24:07 +01:00
shypike
fc7e87f0df Merge branch '1.0.x' 2016-03-19 11:49:11 +01:00
Safihre
c0f2f59fc1 Fix breaking Glitter bug with large script_log 2016-03-18 14:11:54 +01:00
shypike
b90a847a6f Fix omission in README.mkd 2016-03-15 21:42:16 +01:00
shypike
a58bb385f5 Update text files for 1.0.0 2016-03-15 20:12:50 +01:00
shypike
9754baeb1c Fix handling of changed "ignore_samples" option.
Closes #510
2016-03-15 20:08:35 +01:00
shypike
ffcd154966 Update text files for 1.0.0 Final. 2016-03-14 19:12:59 +01:00
shypike
97cfe9488c Update text files for 1.0.0RC5 2016-03-11 19:24:27 +01:00
shypike
374b6f616a Fix crash in CherryPy when it reports problems with some IPv6 addresses.
A bug in Python's traceback logging causes a crash when an IPv6 address with an embedded % is reported.
2016-03-11 19:22:49 +01:00
Sander Jonkers
e2f51595b6 Because of dual IPv4/IPv6 clients, finding the public ipv4 needs special attention 2016-03-10 22:52:22 +01:00
shypike
04091a16aa Fix display of SABnzbd's icon by OSX Notification Center.
El Capitan doesn't accept the -sender parameter, so just omit it.
2016-03-08 16:40:44 +01:00
shypike
9d9d2fd9a2 Revert "Fix Plush dashboard"
This reverts commit 42f1a4926c.
2016-03-08 16:00:24 +01:00
shypike
5746115331 Suppress errors/warnings about bad "Rating" files when the feature is disabled. 2016-03-08 15:53:52 +01:00
Safihre
42f1a4926c Fix Plush dashboard 2016-03-05 11:23:19 +01:00
Safihre
7d87fd461b Fix Glitter display in <1MB/s range 2016-03-05 11:22:57 +01:00
shypike
1ba9976979 Update text files for 1.0.0RC4 2016-03-05 08:52:09 +01:00
shypike
659c199043 Fix --ipv6_hosting option.
Repairs commit 1cbff28
2016-03-05 08:50:13 +01:00
shypike
81a3f53226 Update text files for 1.0.0RC3 2016-03-04 20:39:01 +01:00
shypike
1cbff28f67 Disable listening on IPv6 addresses by the internal web server.
Setting Config->Special->ipv6_hosting to 1 will enable IPv6 listening.
Command line option --ipv6_hosting allows forcing the choice, should SABnzbd not start.
Closes #492
2016-03-04 19:26:50 +01:00
shypike
8e15acbf30 Update translations 2016-03-04 18:55:20 +01:00
Safihre
e07be60db6 #489 wrongly encoded & in the preload 2016-03-01 22:20:51 +01:00
Safihre
539c9662ff 'Default' not translated in Server-category 2016-03-01 22:20:35 +01:00
shypike
b396014f8d Fix IP test at startup.
Correction of problem introduced by commit afff88b "Use self-test.sabnzbd.org for connection tests".
2016-02-24 22:30:02 +01:00
shypike
1db32415b6 Update translations 2016-02-24 21:37:22 +01:00
shypike
b24629db6b Update text files for 1.0.0RC2 2016-02-24 21:11:43 +01:00
Safihre
9b5cdcf8fb Add trailing "/" to href's 2016-02-24 21:05:12 +01:00
shypike
4831415d14 Use self-test.sabnzbd.org for connection tests 2016-02-24 20:34:04 +01:00
Chris Thorn
a4c51f0b20 Parse bandwidth limit as a float instead of an integer so that non-integer values can be used as bandwidth limit 2016-02-24 20:09:02 +01:00
shypike
ec3ba1fb93 Changing server priorities during a download could lead to unexpected results and lockups.
Target priority of articles must be kept at the TryList level so that they
are reset when the try_list is reset.
Closes #378
2016-02-24 20:08:51 +01:00
Safihre
61966f7036 Plush dashboard local IPv4 wouldn't show if external failed
Typo!
For 1.0.0
2016-02-24 20:08:38 +01:00
Safihre
4f69e81841 Add link to information about SSL/yEnc 2016-02-24 20:07:48 +01:00
Safihre
d0d90581df Tweak first Config page 2016-02-24 20:07:35 +01:00
Safihre
8ea5c27633 Improve display of message on blocked server 2016-02-24 20:07:16 +01:00
shypike
517500fdf3 Add link to issue list on support site. 2016-02-19 22:42:30 +01:00
shypike
c4c1c9b6ab Prevent UI errors due to history_db handle not being available. 2016-02-19 22:22:42 +01:00
Safihre
2388889ede Filegrabber did not sanatize filename 2016-02-19 22:21:28 +01:00
Safihre
55cfe878d7 Catch failing Windows Notification
I assumed Windows notifications could not fail, but clearly they can:
http://forums.sabnzbd.org/viewtopic.php?f=11&t=20211&p=104438
When no tray-icon is available, it will fail and in the case of
completed NZB message it will restart the whole of SABnzbd.
2016-02-17 21:25:42 +01:00
Safihre
a2daaee468 Add Pystone score to Glitter status 2016-02-17 21:06:43 +01:00
Safihre
2c360e395e Limit to max 250 items per page (realistic limit) 2016-02-17 21:05:55 +01:00
Jonathon Saine
399cfee594 Add pyOpenSSL info to startup/utility/config base. Add OpenSSL & yEnc to config base as well. 2016-02-17 21:04:13 +01:00
shypike
be646ae6ab Set default for https verification to off. 2016-02-17 20:50:24 +01:00
shypike
b470253d9f Disable https verification when uploading NZB to running instance of SABnzbd. 2016-02-13 16:12:04 +01:00
shypike
b83c493492 Update translations 2016-02-11 01:06:52 +01:00
Safihre
991277bb01 Glitter broke on empty preload strings
See
http://forums.sabnzbd.org/viewtopic.php?f=11&t=20192&p=104368#p104368
In case of UnicodeError
2016-02-10 22:59:11 +01:00
Safihre
5626013b81 Don't allow name change or filesview on grabbing 2016-02-10 22:58:56 +01:00
Safihre
2810d37758 Make disabled servers look more disabled 2016-02-10 22:58:40 +01:00
Safihre
c2f08f01e0 #408 Show red when Add-NZB left empty 2016-02-10 22:57:30 +01:00
Safihre
17ff087e06 Do not confirm clearing warnings 2016-02-05 23:36:47 +01:00
Safihre
77de565b7c Link in message about Orphans was broken 2016-02-05 23:36:36 +01:00
Safihre
54d238aa4d Message labels were not translated
INFO and WARNING
2016-02-05 23:36:23 +01:00
Safihre
379d09f8cc Improve message about no localStorage
It happens more than I expected, so better make a proper message.
2016-02-05 23:35:23 +01:00
shypike
00de72b127 Update text files for 1.0.xRC1 2016-02-03 21:18:42 +01:00
shypike
f9c84fa7dd Fix trouble with disk speed meter (especially on Windows) Part 2.
Improve the benchmark by reducing Python overhead by writing larger blocks.
2016-02-03 21:08:47 +01:00
shypike
c8e46691bb Solve file name encoding issues for OSX.
- Names returned by unrar-commandline need to be Unicoded.
- For yEnc embedded names, only test for UTF-8 and CP1252, but not the local codepage.
- Suppress some bogus warnings
- Log the output of the unrar tool
2016-02-03 20:59:12 +01:00
shypike
df1bb636e5 Fix links in text files to pooit to 1.0.0 entries in the Wiki. 2016-02-03 20:51:19 +01:00
shypike
ff886fad0d Fix all links in the templates to point to 1.0.0 (or 1-0) entries in the Wiki. 2016-02-03 20:50:13 +01:00
shypike
6dbee7a413 Fix trouble with disk speed meter (especially on Windows) Part 2.
Move fix outside of the measurement loop.
Don't remove the test-file within the loop, but only after it's finished,
otherwise we'll still get a "Permission denied".
2016-01-30 10:52:28 +01:00
shypike
3f8fcd7172 Fix trouble with disk speed meter (especially on Windows).
Better handling when folder is not available or writable.
Windows requires some access outside of the Python code to avoid "permission denied".
2016-01-29 23:54:32 +01:00
shypike
d94f7388e6 Add a link on the main Config page, to the "issues" page on the Wiki 2016-01-29 19:55:04 +01:00
Safihre
ad8b49fea8 #408 Firefox-fix: word-wrap instead of word-break 2016-01-29 19:21:59 +01:00
Safihre
ce00270c12 #447 only show arguments-field for speedlimit 2016-01-29 19:21:41 +01:00
Safihre
8c501f8f58 #447 Servers in scheduler more clear 2016-01-29 19:21:30 +01:00
Safihre
ce313ebc65 #445 Reduce statusinfo timeout on startup 2016-01-29 19:21:18 +01:00
Safihre
887ad881a2 #444 HTTPS instead of HTTP for RSS favicon 2016-01-29 19:21:07 +01:00
Safihre
ce40827552 Fix breaking RSS page
Fixes http://forums.sabnzbd.org/viewtopic.php?f=11&t=20114
2016-01-29 19:20:52 +01:00
shypike
2777d89482 Fix typos that prevented notifications about disk full being sent. 2016-01-28 23:19:36 +01:00
shypike
727b300a0e Update translations 2016-01-24 16:34:40 +01:00
shypike
652b021a8e Update text files for 0.8.0Beta6 2016-01-24 16:26:26 +01:00
shypike
fdf33acfbb Allow "None" as selection for secondary skin. 2016-01-24 16:15:02 +01:00
shypike
b001bc9b6f Prevent multiple resume notifications.
Only report "Resume" when coming from Paused mode.
2016-01-24 15:18:24 +01:00
shypike
8802cb1d8c Notifications template contained two instances of "ncenter_enable", leading to problems.
The result was a list instead of a single value.
2016-01-24 15:18:07 +01:00
shypike
e19a2fbae7 Improve handling of an old queue when upgrading to 0.8.0+
Warn only for a non-empty queue.
For Windows, when using a relative "download_dir" based on the user profile,
prepend the path with "Documents".
No action when the -f parameter was used.
This way it will be easier to restore existing jobs.
2016-01-24 15:17:47 +01:00
Safihre
53e38f98f9 Firefox needs more time to process the Server AJAX 2016-01-24 15:16:52 +01:00
Safihre
e783e227f6 #438 Try to stop Firefox from checking checkboxes 2016-01-24 15:16:39 +01:00
shypike
f3dfbe4181 Fix problem where a stray RAR file would cause a failed unpack run.
When a job of which the RAR files are renamed by par2,
needs repair of one more more files, the original damaged files will stay behind.
This will cause SABnzbd to try a doomed attempt at unpacking.
SABnzbd should keep track of such files and delete them after repair.
2016-01-24 15:15:57 +01:00
shypike
bcd8ca8bc4 Fix potential crash when reverting par2 renames.
Can happen when files have been modified outside of SABnzbd's control.
2016-01-24 15:12:06 +01:00
shypike
816d6a63cd For SSL protocol choice, default to auto-negotiation.
The "V23" method is interpreted by OpenSSL as "negotiate the highest available protocol"
and should therefor be a safe choice (best chance of working and best security).
If a user wants to, it is possible to fix the protocol, to prevent interference in the negotiation.
We cannot just assume that we can use our highest fixed protocol, because some Usenet servers
are being slow with implementing TLS1.2
2016-01-24 15:11:30 +01:00
shypike
88d3f25700 Perform IPv6 test on port 443 instead of 80.
Works better with some proxies.
Closes issue #274
2016-01-19 18:13:42 +01:00
shypike
80f69b11db When trying to connect to another SABnzbd instance over HTTPS, don't verify certificates.
Very few SABnzbd installations will have valid certificates.
2016-01-19 18:03:33 +01:00
Safihre
81a11f20c8 Re-order Switches page 2016-01-19 17:30:01 +01:00
Safihre
9e2a839953 Config fixes 2016-01-19 17:30:01 +01:00
Safihre
3cefcde270 #408 Refresh on Config Special save to update the * 2016-01-19 17:30:01 +01:00
Safihre
87a1eacfe7 #408 Also close history-details on history-row click
Before it would only open
2016-01-19 17:30:01 +01:00
Safihre
7cbc1a8419 #408 Browser navbar to black on mobile 2016-01-19 17:30:01 +01:00
Safihre
7b5570eb0b #408 Extra space next to Folder icon 2016-01-19 17:30:00 +01:00
Safihre
1a43a4dcf0 #432 Change filename to name in Add NZB 2016-01-19 17:30:00 +01:00
Safihre
2c2a6592c7 End of queue script was forgotten in Glitter 2016-01-19 17:30:00 +01:00
shypike
f31de6ee4e The compiled OSX build wasn't restarted with original command line arguments.
Rare use case where the App was originally started with parameters.
Essential for correct preservation of the -f parameter.
2016-01-19 17:29:11 +01:00
shypike
8fcd1f6b6c Merge branch 'develop' into R0.8.0 2016-01-16 12:25:38 +01:00
shypike
d7f3a473d7 Merge branch 'develop' into R0.8.0 2016-01-13 21:51:51 +01:00
shypike
ab2eb0c94e Update text files for 0.8.0Beta5 2016-01-13 20:17:32 +01:00
shypike
e51f4fc45a Merge pull request #181 from discordianfish/add-dockerfile
Add Dockerfile
2014-10-08 21:38:15 +02:00
Johannes 'fish' Ziemke
65278120e2 Add Dockerfile
Usage:

        docker build -t sabnzbd .
        docker run -p 127.0.0.1:8080:8080 sabnzbd
2014-09-24 13:46:43 +02:00
shypike
2eed355e9c Revert "newsunpack.py: also handle output of unrar5 with password protected files"
This reverts commit 12fd63c1cf.
2013-11-11 20:24:11 +01:00
shypike
018955f4d5 Merge pull request #122 from sanderjo/patch-4
newsunpack.py: also handle output of unrar5 with password protected file...
2013-11-11 11:19:20 -08:00
sanderjo
12fd63c1cf newsunpack.py: also handle output of unrar5 with password protected files
as discussed http://forums.sabnzbd.org/viewtopic.php?f=3&t=16166&p=89054#p89054
2013-11-07 17:02:24 +01:00
30 changed files with 8457 additions and 8423 deletions

View File

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

View File

@@ -1,15 +1,18 @@
Release Notes - SABnzbd 2.3.3 Beta 1
Release Notes - SABnzbd 2.3.3
=========================================================
## Changes since 2.3.2
- Introduce and enforce "host_whitelist" to reject DNS Rebinding attacks.
If you access SABnzbd from a non-standard URL, you will need to add
the hostname. More info: https://sabnzbd.org/hostname-check
- SABYenc updated to 3.3.3 to fix false-positive CRC errors
- SABYenc updated to 3.3.5 to fix false-positive CRC errors
- SSL-Ciphers can now be set per-server
- Failed URL fetches also trigger post-processing script (if configured)
- Added "max_url_retries" to set maximum retries of URL fetching
- Added "ignore_empty_files" option to not warn on empty files in NZB
- Added "X-Frame-Options" HTTP-header to prevent click-jacking
- Added "httpOnly" HTTP-header to prevent script cookie access
- Added "ignore_empty_files" option to not warn on empty files in NZB
- Extended SAN list of newly generated self-signed certificates
- Indicate that SMPL-skin is no longer supported
- Removed undocumented "callback" option from API calls
- macOS: 64bit version of unrar instead of 32bit
@@ -18,9 +21,12 @@ Release Notes - SABnzbd 2.3.3 Beta 1
## Bugfixes since 2.3.2
- NZB's can be added via command-line but this was not shown in "--help"
- Language-change via API would not only change language after restart
- Correctly indicate that 99 is maximum server priority
- Only show SSL-warning if it was actually tested
- Only show bad-SSL-warning if it was actually tested
- Language-change via API did not directly change display language
- Cheetah 3 is also accepted as template engine
- Correctly indicate that 99 is the maximum server priority
- Results of unpacked zip/7zip files were not sorted
- Joining of split files was limited to 999 files
- Media files with "password" in filename were detected as encrypted
- Servers that could not be DNS-resolved could block the queue
- Detect '502 Byte limit exceeded' as payment problem

View File

@@ -44,7 +44,7 @@ import re
try:
import Cheetah
if Cheetah.Version[0] != '2':
if Cheetah.Version[0] < '2':
raise ValueError
except ValueError:
print "Sorry, requires Python module Cheetah 2.0rc7 or higher."
@@ -779,7 +779,7 @@ def commandline_handler(frozen=True):
if not service:
# Get and remove any NZB file names
for entry in args:
if get_ext(entry) in ('.nzb', '.zip', '.rar', '.gz', '.bz2'):
if get_ext(entry) in VALID_NZB_FILES + VALID_ARCHIVES:
upload_nzbs.append(os.path.abspath(entry))
for opt, arg in opts:
@@ -1344,8 +1344,6 @@ def main():
'tools.encode.on': True,
'tools.gzip.on': True,
'tools.gzip.mime_types': mime_gzip,
'tools.response_headers.on': True,
'tools.response_headers.headers': [('X-Frame-Options', 'SameOrigin')],
'request.show_tracebacks': True,
'error_page.401': sabnzbd.panic.error_page_401,
'error_page.404': sabnzbd.panic.error_page_404
@@ -1516,9 +1514,7 @@ def main():
# Or special restart cases like Mac and WindowsService
if sabnzbd.TRIGGER_RESTART:
# Shutdown
cherrypy.engine.exit()
sabnzbd.halt()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
if sabnzbd.downloader.Downloader.do.paused:
sabnzbd.RESTART_ARGS.append('-p')
@@ -1725,9 +1721,7 @@ if __name__ == '__main__':
def stop(self):
logging.info('[osx] sabApp Quit - stopping main thread ')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
logging.info('[osx] sabApp Quit - main thread stopped')
sabApp = startApp()

View File

@@ -415,6 +415,8 @@
// Exception when change of priority, reload
\$('input[name="priority"], input[name="displayname"]').on('change', function() {
\$('.fullform').submit(function() {
// No ajax this time
\$('input[name="ajax"]').val('')
// Skip the fancy stuff, just submit
this.submit()
})

View File

@@ -1255,7 +1255,7 @@ function loadingJSON(){
<option value="0" >$T("none")</option>
</select></p>
<p><strong>This skin is no longer supported</strong></p>
<p><strong>This skin is no longer supported and may lose functionality in future releases.</strong></p>
<!--#if $new_release#-->
<!--#set $msg=$T('ft-newRelease@1')%($new_release)#-->

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
dojo.hostenv.conditionalLoadModule({"common": ["MochiKit.MochiKit"]});
dojo.hostenv.moduleLoaded("MochiKit.*");
dojo.hostenv.conditionalLoadModule({"common": ["MochiKit.MochiKit"]});
dojo.hostenv.moduleLoaded("MochiKit.*");

View File

@@ -1,11 +1,11 @@
The original author of SABnzbd based his work on Pynewsleecher by Freddy@madcowdesease.org.
Few parts of Pynewsleecher have survived the generations of SABnzbd in a
recognizable form.
Still, we wish to thank Freddy for his inspiration.
The home of the Pynewsleecher project:
http://www.madcowdisease.org/mcd/pynewsleecher
The software does not carry any license information.
The original author of SABnzbd based his work on Pynewsleecher by Freddy@madcowdesease.org.
Few parts of Pynewsleecher have survived the generations of SABnzbd in a
recognizable form.
Still, we wish to thank Freddy for his inspiration.
The home of the Pynewsleecher project:
http://www.madcowdisease.org/mcd/pynewsleecher
The software does not carry any license information.

View File

@@ -1,8 +1,8 @@
On http://www.brunningonline.net/simon/blog/archives/001835.html,
the author licensed SysTrayIcon.py under a variant of the WTFPL:
> Any road up, help yourself. Consider SysTrayIcon.py to be under an
> "Aleister Crowley" style license - "Do what thou wilt shall be the
> only law".
>
> Err, but don't sue me if it doesn't work. ;-)
On http://www.brunningonline.net/simon/blog/archives/001835.html,
the author licensed SysTrayIcon.py under a variant of the WTFPL:
> Any road up, help yourself. Consider SysTrayIcon.py to be under an
> "Aleister Crowley" style license - "Do what thou wilt shall be the
> only law".
>
> Err, but don't sue me if it doesn't work. ;-)

View File

@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: sabnzbd\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2018-03-15 13:08+0000\n"
"PO-Revision-Date: 2018-02-14 14:17+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>\n"
"PO-Revision-Date: 2018-04-15 21:22+0000\n"
"Last-Translator: ciho <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2018-03-16 05:37+0000\n"
"X-Generator: Launchpad (build 18571)\n"
"X-Launchpad-Export-Date: 2018-04-16 05:40+0000\n"
"X-Generator: Launchpad (build 18610)\n"
#: SABnzbd.py [Error message]
msgid "MultiPar binary... NOT found!"
@@ -306,7 +306,7 @@ msgstr "Abgebrochen, unerwünschte Dateieindung gefunden"
#: sabnzbd/assembler.py [Warning message]
msgid "WARNING: Paused job \"%s\" because of rating (%s)"
msgstr "WARNUNG: Job \"%s\" aufgrund der Bewertung (%s) pausiert."
msgstr "WARNUNG: Aufgabe \"%s\" aufgrund der Bewertung (%s) pausiert."
#: sabnzbd/assembler.py [Warning message]
msgid "WARNING: Aborted job \"%s\" because of rating (%s)"
@@ -650,7 +650,7 @@ msgstr "Server-Adresse \"%s:%s\" ist ungültig."
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
msgstr "Verbindung vom Host \"%s\" abgelehnt von:"
#: sabnzbd/interface.py
msgid "User logged in to the web interface"
@@ -774,6 +774,8 @@ msgstr "Fehlerhafter Parameter"
msgid ""
"Category folder cannot be a subfolder of the Temporary Download Folder."
msgstr ""
"Der Category-Ordner darf kein Unterordner des Temporärer Download-Ordners "
"sein."
#: sabnzbd/interface.py # sabnzbd/interface.py
msgid "Back"
@@ -2539,6 +2541,9 @@ msgid ""
"Disconnect all active connections to usenet servers. Connections will be "
"reopened after a few seconds if there are items in the queue."
msgstr ""
"Alle aktiven Verbindungen zu Usenet-Servern trennen. Verbindungen werden "
"nach ein paar Sekunden wiederhergestellt, falls sich noch Artikel in der "
"Warteschlange befinden."
#: sabnzbd/skintext.py
msgid "This will send a test email to your account."
@@ -3287,7 +3292,8 @@ msgstr "Aktion wenn eine verschlüsselte RAR Datei geladen wird"
msgid ""
"In case of \"Pause\", you'll need to set a password and resume the job."
msgstr ""
"Im Fall von \"Pause\" müssen Sie ein Kennwort setzen und den Job fortsetzen."
"Im Fall von \"Pause\" müssen Sie ein Kennwort setzen und den Aufgabe "
"fortsetzen."
#: sabnzbd/skintext.py
msgid "Detect Duplicate Downloads"
@@ -3437,7 +3443,7 @@ msgstr "IONice-Parameter"
#: sabnzbd/skintext.py
msgid "External process priority"
msgstr ""
msgstr "Priorität von externem Prozess"
#: sabnzbd/skintext.py
msgid "Disconnect on Empty Queue"
@@ -4108,7 +4114,7 @@ msgstr "Geräte, welche die Nachrichten empfangen sollen"
#: sabnzbd/skintext.py [Pushover settings]
msgid "Emergency retry"
msgstr ""
msgstr "Notfall Wiederanlauf"
#: sabnzbd/skintext.py [Pushover settings]
msgid "How often (in seconds) the same notification will be sent"
@@ -4116,11 +4122,12 @@ msgstr "Wie oft die selbe benachrichtigung (in Sekunden) geschickt wird."
#: sabnzbd/skintext.py [Pushover settings]
msgid "Emergency expire"
msgstr ""
msgstr "Notfall Verfall"
#: sabnzbd/skintext.py [Pushover settings]
msgid "How many seconds your notification will continue to be retried"
msgstr ""
"Wieviele Sekunden soll versucht werden deine Nachricht erneut zu versenden"
#: sabnzbd/skintext.py [Header for Pushbullet notification section]
msgid "Pushbullet"
@@ -4277,7 +4284,7 @@ msgstr "S01E05 Episoden-Ordner"
#: sabnzbd/skintext.py
msgid "Job Name as Filename"
msgstr ""
msgstr "Aufgabe Name als Ordnername"
#: sabnzbd/skintext.py
msgid "Title"
@@ -4349,7 +4356,7 @@ msgstr "Ursprünglicher Dateiname"
#: sabnzbd/skintext.py
msgid "Original Job Name"
msgstr ""
msgstr "Ursprünglicher Aufgabe Name"
#: sabnzbd/skintext.py
msgid "Lower Case"
@@ -4721,6 +4728,8 @@ msgid ""
"All usernames, passwords and API-keys are automatically removed from the log "
"and the included copy of your settings."
msgstr ""
"Alle Benutzernamen, Passwörter und API-Schlüssel werden automatisch aus dem "
"Log und der darin enthaltenen Kopie deiner Einstellungen entfernt."
#: sabnzbd/skintext.py
msgid "Sort by Age <small>Oldest&rarr;Newest</small>"

View File

@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: sabnzbd\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2018-03-15 13:08+0000\n"
"PO-Revision-Date: 2018-02-14 14:17+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>\n"
"PO-Revision-Date: 2018-03-16 21:07+0000\n"
"Last-Translator: Fred <88com88@gmail.com>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2018-03-16 05:37+0000\n"
"X-Launchpad-Export-Date: 2018-03-17 05:36+0000\n"
"X-Generator: Launchpad (build 18571)\n"
#: SABnzbd.py [Error message]
@@ -653,7 +653,7 @@ msgstr "L' adresse du serveur \"%s:%s\" n'est pas valide."
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
msgstr "Connexion refusée avec le nom d'hôte \"%s\" à partir de :"
#: sabnzbd/interface.py
msgid "User logged in to the web interface"
@@ -2547,6 +2547,9 @@ msgid ""
"Disconnect all active connections to usenet servers. Connections will be "
"reopened after a few seconds if there are items in the queue."
msgstr ""
"Déconnecte toutes les connexions actives aux serveurs Usenet. Les connexions "
"seront rouvertes après quelques secondes si des éléments sont présents dans "
"la file d'attente."
#: sabnzbd/skintext.py
msgid "This will send a test email to your account."
@@ -3449,7 +3452,7 @@ msgstr "Paramètres 'IONice'"
#: sabnzbd/skintext.py
msgid "External process priority"
msgstr ""
msgstr "Priorité de processus externe"
#: sabnzbd/skintext.py
msgid "Disconnect on Empty Queue"

View File

@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: sabnzbd\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2018-03-15 13:08+0000\n"
"PO-Revision-Date: 2018-02-14 14:17+0000\n"
"PO-Revision-Date: 2018-03-16 12:21+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2018-03-16 05:37+0000\n"
"X-Launchpad-Export-Date: 2018-03-17 05:36+0000\n"
"X-Generator: Launchpad (build 18571)\n"
#: SABnzbd.py [Error message]
@@ -642,7 +642,7 @@ msgstr "Serveradres \"%s:%s\" is niet geldig."
#: sabnzbd/interface.py
msgid "Refused connection with hostname \"%s\" from:"
msgstr ""
msgstr "Verbinding met hostnaam \"%s\" geweigerd van:"
#: sabnzbd/interface.py
msgid "User logged in to the web interface"
@@ -2514,6 +2514,8 @@ msgid ""
"Disconnect all active connections to usenet servers. Connections will be "
"reopened after a few seconds if there are items in the queue."
msgstr ""
"Verbreek alle actieve verbindingen naar usenet servers. Verbindingen worden "
"na een paar seconden weer geopend als er nog downloads in de wachtrij staan."
#: sabnzbd/skintext.py
msgid "This will send a test email to your account."
@@ -3400,7 +3402,7 @@ msgstr "\"IONice\" parameters"
#: sabnzbd/skintext.py
msgid "External process priority"
msgstr ""
msgstr "Externe process prioriteit"
#: sabnzbd/skintext.py
msgid "Disconnect on Empty Queue"

View File

@@ -769,7 +769,7 @@ def system_standby():
def shutdown_program():
""" Stop program after halting and saving """
logging.info("Performing sabnzbd shutdown")
logging.info("[%s] Performing SABnzbd shutdown", misc.caller_name())
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True

View File

@@ -41,7 +41,7 @@ except ImportError:
pass
import sabnzbd
from sabnzbd.constants import VALID_ARCHIVES, Status, \
from sabnzbd.constants import VALID_ARCHIVES, VALID_NZB_FILES, Status, \
TOP_PRIORITY, REPAIR_PRIORITY, HIGH_PRIORITY, NORMAL_PRIORITY, LOW_PRIORITY, \
KIBI, MEBI, GIGI, JOB_ADMIN
import sabnzbd.config as config
@@ -398,7 +398,7 @@ def _api_addlocalfile(name, output, kwargs):
if get_ext(name) in VALID_ARCHIVES:
res = sabnzbd.dirscanner.ProcessArchiveFile(
fn, name, pp=pp, script=script, cat=cat, priority=priority, keep=True, nzbname=nzbname)
elif get_ext(name) in ('.nzb', '.gz', '.bz2'):
elif get_ext(name) in VALID_NZB_FILES:
res = sabnzbd.dirscanner.ProcessSingleFile(
fn, name, pp=pp, script=script, cat=cat, priority=priority, keep=True, nzbname=nzbname)
else:
@@ -589,10 +589,7 @@ def _api_resume(name, output, kwargs):
def _api_shutdown(name, output, kwargs):
""" API: accepts output """
logging.info('Shutdown requested by API')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
return report(output)

View File

@@ -264,6 +264,7 @@ disable_key = OptionBool('misc', 'disable_api_key', False, protect=True)
no_penalties = OptionBool('misc', 'no_penalties', False)
debug_log_decoding = OptionBool('misc', 'debug_log_decoding', False)
ignore_empty_files = OptionBool('misc', 'ignore_empty_files', False)
x_frame_options = OptionBool('misc', 'x_frame_options', True)
# Text values
rss_odd_titles = OptionList('misc', 'rss_odd_titles', ['nzbindex.nl/', 'nzbindex.com/', 'nzbclub.com/'])
@@ -280,6 +281,7 @@ marker_file = OptionStr('misc', 'nomedia_marker', '')
ipv6_servers = OptionNumber('misc', 'ipv6_servers', 1, 0, 2)
url_base = OptionStr('misc', 'url_base', '/sabnzbd')
host_whitelist = OptionList('misc', 'host_whitelist')
max_url_retries = OptionNumber('misc', 'max_url_retries', 10, 1)
##############################################################################
# Config - Notifications

View File

@@ -51,7 +51,7 @@ RENAMES_FILE = '__renames__'
ATTRIB_FILE = 'SABnzbd_attrib'
REPAIR_REQUEST = 'repair-all.sab'
SABYENC_VERSION_REQUIRED = '3.3.3'
SABYENC_VERSION_REQUIRED = '3.3.5'
DB_HISTORY_VERSION = 1
DB_HISTORY_NAME = 'history%s.db' % DB_HISTORY_VERSION
@@ -78,7 +78,6 @@ DEF_ARTICLE_CACHE_DEFAULT = '500M'
DEF_ARTICLE_CACHE_MAX = '1G'
DEF_TIMEOUT = 60
DEF_SCANRATE = 5
MAX_URL_RETRIES = 10
MAX_DECODE_QUEUE = 10
LIMIT_DECODE_QUEUE = 100
MAX_WARNINGS = 20
@@ -98,6 +97,7 @@ STOP_PRIORITY = -4
STAGES = {'Source': 0, 'Download': 1, 'Servers': 2, 'Repair': 3, 'Filejoin': 4, 'Unpack': 5, 'Script': 6}
VALID_ARCHIVES = ('.zip', '.rar', '.7z')
VALID_NZB_FILES = ('.nzb', '.gz', '.bz2')
IGNORED_FOLDERS = ('@eaDir', '.appleDouble')

View File

@@ -28,7 +28,7 @@ import bz2
import threading
import sabnzbd
from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES
from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES, VALID_NZB_FILES
import sabnzbd.utils.rarfile as rarfile
from sabnzbd.encoding import platform_encode
from sabnzbd.decorators import NzbQueueLocker
@@ -358,7 +358,7 @@ class DirScanner(threading.Thread):
continue
ext = os.path.splitext(path)[1].lower()
candidate = ext in ('.nzb', '.gz', '.bz2') or ext in VALID_ARCHIVES
candidate = ext in VALID_NZB_FILES + VALID_ARCHIVES
if candidate:
try:
stat_tuple = os.stat(path)

View File

@@ -42,7 +42,7 @@ import sabnzbd.scheduler as scheduler
from Cheetah.Template import Template
from sabnzbd.misc import real_path, to_units, from_units, time_format, \
long_path, calc_age, same_file, probablyipv4, probablyipv6, \
cat_to_opts, int_conv, globber, globber_full, remove_all, get_base_url
int_conv, globber, globber_full, remove_all, get_base_url
from sabnzbd.newswrapper import GetServerParms
from sabnzbd.rating import Rating
from sabnzbd.bpsmeter import BPSMeter
@@ -70,6 +70,7 @@ from sabnzbd.api import list_scripts, list_cats, del_from_section, \
format_bytes, std_time, report, del_hist_job, Ttemplate, build_queue_header, \
_api_test_email, _api_test_notif
##############################################################################
# Global constants
##############################################################################
@@ -81,17 +82,9 @@ DIRECTIVES = {
FILTER = LatinFilter
def check_server(host, port, ajax):
""" Check if server address resolves properly """
if host.lower() == 'localhost' and sabnzbd.AMBI_LOCALHOST:
return badParameterResponse(T('Warning: LOCALHOST is ambiguous, use numerical IP-address.'), ajax)
if GetServerParms(host, int_conv(port)):
return ""
else:
return badParameterResponse(T('Server address "%s:%s" is not valid.') % (host, port), ajax)
##############################################################################
# Security functions
##############################################################################
def secured_expose(wrap_func=None, check_configlock=False, check_session_key=False):
""" Wrapper for both cherrypy.expose and login/access check """
if not wrap_func:
@@ -102,6 +95,10 @@ def secured_expose(wrap_func=None, check_configlock=False, check_session_key=Fal
@functools.wraps(wrap_func)
def internal_wrap(*args, **kwargs):
# Add X-Frame-Headers headers to page-requests
if cfg.x_frame_options():
cherrypy.response.headers['X-Frame-Options'] = 'SameOrigin'
# Check if config is locked
if check_configlock and cfg.configlock():
cherrypy.response.status = 403
@@ -165,8 +162,9 @@ def check_hostname():
if not host:
return False
# Remove the port-part
host = host.split(':')[0].lower()
# Remove the port-part (like ':8080'), if it is there, always on the right hand side.
# Not to be confused with IPv6 colons (within square brackets)
host = re.sub(':[0123456789]+$', '', host).lower()
# Fine if localhost or IP
if host == 'localhost' or probablyipv4(host) or probablyipv6(host):
@@ -181,67 +179,6 @@ def check_hostname():
return False
def ConvertSpecials(p):
""" Convert None to 'None' and 'Default' to '' """
if p is None:
p = 'None'
elif p.lower() == T('Default').lower():
p = ''
return p
def Raiser(root='', **kwargs):
args = {}
for key in kwargs:
val = kwargs.get(key)
if val:
args[key] = val
# Add extras
if args:
root = '%s?%s' % (root, urllib.urlencode(args))
# Optionally add the leading /sabnzbd/ (or what the user set)
if not root.startswith(cfg.url_base()):
root = cherrypy.request.script_name + root
# Send the redirect
return cherrypy.HTTPRedirect(root)
def queueRaiser(root, kwargs):
return Raiser(root, start=kwargs.get('start'),
limit=kwargs.get('limit'),
search=kwargs.get('search'))
def rssRaiser(root, kwargs):
return Raiser(root, feed=kwargs.get('feed'))
def IsNone(value):
""" Return True if either None, 'None' or '' """
return value is None or value == "" or value.lower() == 'none'
def Strip(txt):
""" Return stripped string, can handle None """
try:
return txt.strip()
except:
return None
##############################################################################
# Web login support
##############################################################################
def get_users():
users = {}
users[cfg.username()] = cfg.password()
return users
def encrypt_pwd(pwd):
return pwd
# Create a more unique ID for each instance
COOKIE_SECRET = str(randint(1000,100000)*os.getpid())
@@ -294,6 +231,16 @@ def check_login():
return check_login_cookie()
def get_users():
users = {}
users[cfg.username()] = cfg.password()
return users
def encrypt_pwd(pwd):
return pwd
def set_auth(conf):
""" Set the authentication for CherryPy """
if cfg.username() and cfg.password() and not cfg.html_login():
@@ -379,6 +326,37 @@ def log_warning_and_ip(txt):
logging.warning('%s', txt)
##############################################################################
# Helper raiser functions
##############################################################################
def Raiser(root='', **kwargs):
args = {}
for key in kwargs:
val = kwargs.get(key)
if val:
args[key] = val
# Add extras
if args:
root = '%s?%s' % (root, urllib.urlencode(args))
# Optionally add the leading /sabnzbd/ (or what the user set)
if not root.startswith(cfg.url_base()):
root = cherrypy.request.script_name + root
# Send the redirect
return cherrypy.HTTPRedirect(root)
def queueRaiser(root, kwargs):
return Raiser(root, start=kwargs.get('start'),
limit=kwargs.get('limit'),
search=kwargs.get('search'))
def rssRaiser(root, kwargs):
return Raiser(root, feed=kwargs.get('feed'))
##############################################################################
# Page definitions
##############################################################################
class MainPage(object):
@@ -463,10 +441,7 @@ class MainPage(object):
if pid_in and int(pid_in) != os.getpid():
return "Incorrect PID for this instance, remove PID from URL to initiate shutdown."
logging.info('Shutdown requested by interface')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
return T('SABnzbd shutdown finished')
@secured_expose(check_session_key=True)
@@ -636,10 +611,7 @@ class Wizard(object):
@secured_expose
def exit(self, **kwargs):
""" Stop SABnzbd """
logging.info('Shutdown requested by wizard')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
return T('SABnzbd shutdown finished')
def get_access_info():
@@ -1025,19 +997,12 @@ class QueuePage(object):
if cat == 'None':
cat = None
NzbQueue.do.change_cat(nzo_id, cat)
cat, pp, script, priority = cat_to_opts(cat)
NzbQueue.do.change_script(nzo_id, script)
NzbQueue.do.change_opts(nzo_id, pp)
NzbQueue.do.set_priority(nzo_id, priority)
raise queueRaiser(self.__root, kwargs)
@secured_expose(check_session_key=True)
def shutdown(self, **kwargs):
logging.info('Shutdown requested by interface')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
return T('SABnzbd shutdown finished')
@secured_expose(check_session_key=True)
@@ -1403,11 +1368,11 @@ SPECIAL_BOOL_LIST = \
'rss_filenames', 'ipv6_hosting', 'keep_awake', 'empty_postproc', 'html_login', 'wait_for_dfolder',
'max_art_opt', 'warn_empty_nzb', 'enable_bonjour', 'reject_duplicate_files', 'warn_dupl_jobs',
'replace_illegal', 'backup_for_duplicates', 'disable_api_key', 'api_logging',
'ignore_empty_files'
'ignore_empty_files', 'x_frame_options'
)
SPECIAL_VALUE_LIST = \
('size_limit', 'folder_max_length', 'fsys_type', 'movie_rename_limit', 'nomedia_marker',
'req_completion_rate', 'wait_ext_drive', 'show_sysload', 'url_base',
'max_url_retries', 'req_completion_rate', 'wait_ext_drive', 'show_sysload', 'url_base',
'direct_unpack_threads', 'ipv6_servers', 'selftest_host', 'rating_host'
)
SPECIAL_LIST_LIST = ('rss_odd_titles', 'quick_check_ext_ignore', 'host_whitelist')
@@ -1488,15 +1453,16 @@ class ConfigGeneral(object):
wlist = []
interfaces = globber_full(sabnzbd.DIR_INTERFACES)
for k in interfaces:
if k.endswith(DEF_STDINTF):
interfaces.remove(k)
interfaces.insert(0, k)
break
for k in interfaces:
if k.endswith(DEF_STDCONFIG):
interfaces.remove(k)
break
continue
# TEMPORARY: Remove when smpl is really depricated
# Do not show smpl unless it's selected one
if k.endswith('smpl') and 'smpl' not in cfg.web_dir():
interfaces.remove(k)
for web in interfaces:
rweb = os.path.basename(web)
if os.access(web + '/' + DEF_MAIN_TMPL, os.R_OK):
@@ -1662,6 +1628,17 @@ def unique_svr_name(server):
return new_name
def check_server(host, port, ajax):
""" Check if server address resolves properly """
if host.lower() == 'localhost' and sabnzbd.AMBI_LOCALHOST:
return badParameterResponse(T('Warning: LOCALHOST is ambiguous, use numerical IP-address.'), ajax)
if GetServerParms(host, int_conv(port)):
return ""
else:
return badParameterResponse(T('Server address "%s:%s" is not valid.') % (host, port), ajax)
def handle_server(kwargs, root=None, new_svr=False):
""" Internal server handler """
ajax = kwargs.get('ajax')
@@ -2020,6 +1997,28 @@ class ConfigRss(object):
raise rssRaiser(self.__root, kwargs)
def ConvertSpecials(p):
""" Convert None to 'None' and 'Default' to '' """
if p is None:
p = 'None'
elif p.lower() == T('Default').lower():
p = ''
return p
def IsNone(value):
""" Return True if either None, 'None' or '' """
return value is None or value == "" or value.lower() == 'none'
def Strip(txt):
""" Return stripped string, can handle None """
try:
return txt.strip()
except:
return None
##############################################################################
_SCHED_ACTIONS = ('resume', 'pause', 'pause_all', 'shutdown', 'restart', 'speedlimit',
'pause_post', 'resume_post', 'scan_folder', 'rss_scan', 'remove_failed',

View File

@@ -174,7 +174,7 @@ def cat_to_opts(cat, pp=None, script=None, priority=None):
if priority == DEFAULT_PRIORITY:
priority = def_cat.priority()
# logging.debug('Cat->Attrib cat=%s pp=%s script=%s prio=%s', cat, pp, script, priority)
logging.debug('Cat->Attrib cat=%s pp=%s script=%s prio=%s', cat, pp, script, priority)
return cat, pp, script, priority
@@ -412,6 +412,7 @@ def sanitize_files_in_folder(folder):
new_path = os.path.join(root, sanitize_filename(file_))
if path != new_path:
try:
logging.debug('Filename-sanitizer will rename %s to %s', path, new_path)
os.rename(path, new_path)
path = new_path
except:
@@ -995,6 +996,22 @@ def create_dirs(dirpath):
return dirpath
@synchronized(DIR_LOCK)
def recursive_listdir(dir):
""" List all files in dirs and sub-dirs """
filelist = []
for root, dirs, files in os.walk(dir):
for file in files:
if '.AppleDouble' not in root and '.DS_Store' not in root:
try:
p = os.path.join(root, file)
filelist.append(p)
except UnicodeDecodeError:
# Just skip failing names
pass
return filelist
@synchronized(DIR_LOCK)
def move_to_path(path, new_path):
""" Move a file to a new path, optionally give unique filename
@@ -1515,7 +1532,9 @@ def probablyipv4(ip):
def probablyipv6(ip):
if ip.count(':') >= 2 and re.sub('[0123456789abcdefABCDEF:]', '', ip) == '':
# Returns True if the given input is probably an IPv6 address
# Square Brackets like '[2001::1]' are OK
if ip.count(':') >= 2 and re.sub('[0123456789abcdefABCDEF:\[\]]', '', ip) == '':
return True
else:
return False

View File

@@ -33,7 +33,7 @@ from sabnzbd.encoding import TRANS, unicoder, platform_encode, deunicode
import sabnzbd.utils.rarfile as rarfile
from sabnzbd.misc import format_time_string, find_on_path, make_script_path, int_conv, \
real_path, globber, globber_full, get_all_passwords, renamer, clip_path, \
has_win_device, calc_age, long_path, remove_file
has_win_device, calc_age, long_path, remove_file, recursive_listdir
from sabnzbd.sorting import SeriesSorter
import sabnzbd.cfg as cfg
from sabnzbd.constants import Status
@@ -65,14 +65,14 @@ else:
from subprocess import Popen
# Regex globals
RAR_RE = re.compile(r'\.(?P<ext>part\d*\.rar|rar|r\d\d|s\d\d|t\d\d|u\d\d|v\d\d|\d\d\d)$', re.I)
RAR_RE = re.compile(r'\.(?P<ext>part\d*\.rar|rar|r\d\d|s\d\d|t\d\d|u\d\d|v\d\d|\d\d\d?\d)$', re.I)
RAR_RE_V3 = re.compile(r'\.(?P<ext>part\d*)$', re.I)
LOADING_RE = re.compile(r'^Loading "(.+)"')
TARGET_RE = re.compile(r'^(?:File|Target): "(.+)" -')
EXTRACTFROM_RE = re.compile(r'^Extracting\sfrom\s(.+)')
EXTRACTED_RE = re.compile(r'^(Extracting|Creating|...)\s+(.*?)\s+OK\s*$')
SPLITFILE_RE = re.compile(r'\.(\d\d\d$)', re.I)
SPLITFILE_RE = re.compile(r'\.(\d\d\d?\d$)', re.I)
ZIP_RE = re.compile(r'\.(zip$)', re.I)
SEVENZIP_RE = re.compile(r'\.7z$', re.I)
SEVENMULTI_RE = re.compile(r'\.7z\.\d+$', re.I)
@@ -246,7 +246,7 @@ def unpack_magic(nzo, workdir, workdir_complete, dele, one_folder, joinables, zi
rerun = False
force_rerun = False
newfiles = []
error = 0
error = None
new_joins = new_rars = new_zips = new_ts = None
if cfg.enable_filejoin():
@@ -257,8 +257,6 @@ def unpack_magic(nzo, workdir, workdir_complete, dele, one_folder, joinables, zi
if newf:
newfiles.extend(newf)
logging.info('Filejoin finished on %s', workdir)
nzo.set_action_line()
rerun = not error
if cfg.enable_unrar():
new_rars = [rar for rar in xrars if rar not in rars]
@@ -268,32 +266,27 @@ def unpack_magic(nzo, workdir, workdir_complete, dele, one_folder, joinables, zi
if newf:
newfiles.extend(newf)
logging.info('Unrar finished on %s', workdir)
nzo.set_action_line()
rerun = not error
if cfg.enable_7zip():
new_sevens = [seven for seven in xsevens if seven not in sevens]
if new_sevens:
logging.info('7za starting on %s', workdir)
if unseven(nzo, workdir, workdir_complete, dele, one_folder, new_sevens):
error = True
error, newf = unseven(nzo, workdir, workdir_complete, dele, one_folder, new_sevens)
if newf:
newfiles.extend(newf)
logging.info('7za finished on %s', workdir)
nzo.set_action_line()
rerun = not error
if cfg.enable_unzip():
new_zips = [zip for zip in xzips if zip not in zips]
if new_zips:
logging.info('Unzip starting on %s', workdir)
if SEVEN_COMMAND:
if unseven(nzo, workdir, workdir_complete, dele, one_folder, new_zips):
error = True
error, newf = unseven(nzo, workdir, workdir_complete, dele, one_folder, new_zips)
else:
if unzip(nzo, workdir, workdir_complete, dele, one_folder, new_zips):
error = True
error, newf = unzip(nzo, workdir, workdir_complete, dele, one_folder, new_zips)
if newf:
newfiles.extend(newf)
logging.info('Unzip finished on %s', workdir)
nzo.set_action_line()
rerun = not error
if cfg.enable_tsjoin():
new_ts = [_ts for _ts in xts if _ts not in ts]
@@ -303,8 +296,12 @@ def unpack_magic(nzo, workdir, workdir_complete, dele, one_folder, joinables, zi
if newf:
newfiles.extend(newf)
logging.info('TS Joining finished on %s', workdir)
nzo.set_action_line()
rerun = not error
# Refresh history and set output
nzo.set_action_line()
# Only re-run if something was unpacked and it was success
rerun = error in (False, 0)
# During a Retry we might miss files that failed during recursive unpack
if nzo.reuse and depth == 1 and any(build_filelists(workdir, workdir_complete)):
@@ -853,6 +850,9 @@ def unzip(nzo, workdir, workdir_complete, delete, one_folder, zips):
unzip_failed = False
tms = time.time()
# For file-bookkeeping
orig_dir_content = recursive_listdir(workdir_complete)
for _zip in zips:
logging.info("Starting extract on zipfile: %s ", _zip)
nzo.set_action_line(T('Unpacking'), '%s' % unicoder(os.path.basename(_zip)))
@@ -870,6 +870,9 @@ def unzip(nzo, workdir, workdir_complete, delete, one_folder, zips):
msg = T('%s files in %s') % (str(i), format_time_string(time.time() - tms))
nzo.set_unpack_info('Unpack', msg)
# What's new?
new_files = list(set(orig_dir_content + recursive_listdir(workdir_complete)))
# Delete the old files if we have to
if delete and not unzip_failed:
i = 0
@@ -890,12 +893,12 @@ def unzip(nzo, workdir, workdir_complete, delete, one_folder, zips):
except OSError:
logging.warning(T('Deleting %s failed!'), brokenzip)
return unzip_failed
return unzip_failed, new_files
except:
msg = sys.exc_info()[1]
nzo.fail_msg = T('Unpacking failed, %s') % msg
logging.error(T('Error "%s" while running unzip() on %s'), msg, nzo.final_name)
return True
return True, []
def ZIP_Extract(zipfile, extraction_path, one_folder):
@@ -929,6 +932,7 @@ def unseven(nzo, workdir, workdir_complete, delete, one_folder, sevens):
"""
i = 0
unseven_failed = False
new_files = []
tms = time.time()
# Find multi-volume sets, because 7zip will not provide actual set members
@@ -955,18 +959,19 @@ def unseven(nzo, workdir, workdir_complete, delete, one_folder, sevens):
else:
extraction_path = os.path.split(seven)[0]
res, msg = seven_extract(nzo, seven, extensions, extraction_path, one_folder, delete)
res, new_files_set, msg = seven_extract(nzo, seven, extensions, extraction_path, one_folder, delete)
if res:
unseven_failed = True
nzo.set_unpack_info('Unpack', msg)
else:
i += 1
new_files.extend(new_files_set)
if not unseven_failed:
msg = T('%s files in %s') % (str(i), format_time_string(time.time() - tms))
nzo.set_unpack_info('Unpack', msg)
return unseven_failed
return unseven_failed, new_files
def seven_extract(nzo, sevenset, extensions, extraction_path, one_folder, delete):
@@ -982,7 +987,7 @@ def seven_extract(nzo, sevenset, extensions, extraction_path, one_folder, delete
msg = T('Trying 7zip with password "%s"') % unicoder(password)
nzo.fail_msg = msg
nzo.set_unpack_info('Unpack', msg)
fail, msg = seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete, password)
fail, new_files, msg = seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete, password)
if fail != 2:
break
@@ -991,7 +996,7 @@ def seven_extract(nzo, sevenset, extensions, extraction_path, one_folder, delete
msg = '%s (%s)' % (T('Unpacking failed, archive requires a password'), os.path.basename(sevenset))
nzo.fail_msg = msg
logging.error(msg)
return fail, msg
return fail, new_files, msg
def seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete, password):
@@ -1025,6 +1030,9 @@ def seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete
if not os.path.exists(name):
return 1, T('7ZIP set "%s" is incomplete, cannot unpack') % unicoder(sevenset)
# For file-bookkeeping
orig_dir_content = recursive_listdir(extraction_path)
command = [SEVEN_COMMAND, method, '-y', overwrite, parm, case, password,
'-o%s' % extraction_path, name]
@@ -1039,6 +1047,9 @@ def seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete
ret = p.wait()
# What's new?
new_files = list(set(orig_dir_content + recursive_listdir(extraction_path)))
if ret == 0 and delete:
if extensions:
for ext in extensions:
@@ -1054,7 +1065,7 @@ def seven_extract_core(sevenset, extensions, extraction_path, one_folder, delete
logging.warning(T('Deleting %s failed!'), sevenset)
# Always return an error message, even when return code is 0
return ret, T('Could not unpack %s') % unicoder(sevenset)
return ret, new_files, T('Could not unpack %s') % unicoder(sevenset)
##############################################################################
@@ -2079,26 +2090,10 @@ def build_filelists(workdir, workdir_complete=None, check_both=False, check_rar=
sevens, joinables, zips, rars, ts, filelist = ([], [], [], [], [], [])
if workdir_complete:
for root, dirs, files in os.walk(workdir_complete):
for _file in files:
if '.AppleDouble' not in root and '.DS_Store' not in root:
try:
p = os.path.join(root, _file)
filelist.append(p)
except UnicodeDecodeError:
# Just skip failing names
pass
filelist.extend(recursive_listdir(workdir_complete))
if workdir and (not filelist or check_both):
for root, dirs, files in os.walk(workdir):
for _file in files:
if '.AppleDouble' not in root and '.DS_Store' not in root:
try:
p = os.path.join(root, _file)
filelist.append(p)
except UnicodeDecodeError:
# Just skip failing names
pass
filelist.extend(recursive_listdir(workdir))
for file in filelist:
# Extra check for rar (takes CPU/disk)

View File

@@ -596,11 +596,6 @@ class NzbObject(TryList):
filename = platform_encode(filename)
nzbname = platform_encode(nzbname)
if pp is None:
r = u = d = None
else:
r, u, d = sabnzbd.pp_to_opts(pp)
self.filename = filename # Original filename
if nzbname and nzb:
work_name = nzbname # Use nzbname if set and only for non-future slot
@@ -629,6 +624,26 @@ class NzbObject(TryList):
self.work_name = create_work_name(work_name)
self.final_name = create_work_name(work_name)
# Determine category and find pp/script values based on input
# Later will be re-evaluated based on import steps
if pp is None:
r = u = d = None
else:
r, u, d = sabnzbd.pp_to_opts(pp)
self.set_priority(priority) # Parse priority of input
self.repair = r # True if we want to repair this set
self.unpack = u # True if we want to unpack this set
self.delete = d # True if we want to delete this set
self.script = script # External script for this set
self.cat = cat # User-set category
# Information fields
self.url = url or filename
self.groups = []
self.avg_date = datetime.datetime.fromtimestamp(0.0)
self.avg_stamp = 0.0 # Avg age in seconds (calculated from avg_age)
# Bookkeeping values
self.meta = {}
self.servercount = {} # Dict to keep bytes per server
self.created = False # dirprefixes + work_name created
@@ -638,19 +653,6 @@ class NzbObject(TryList):
self.bytes_tried = 0 # Which bytes did we try
self.bytes_missing = 0 # Bytes missing
self.bad_articles = 0 # How many bad (non-recoverable) articles
self.set_priority(priority) # Parse priority of input
self.repair = r # True if we want to repair this set
self.unpack = u # True if we want to unpack this set
self.delete = d # True if we want to delete this set
self.script = script # External script for this set
self.cat = cat # Indexer category
if url:
self.url = str(url) # Source URL
else:
self.url = filename
self.groups = []
self.avg_date = datetime.datetime.fromtimestamp(0.0)
self.avg_stamp = 0.0 # Avg age in seconds (calculated from avg_age)
self.partable = {} # Holds one parfile-name for each set
self.extrapars = {} # Holds the extra parfile names for all sets
@@ -663,7 +665,7 @@ class NzbObject(TryList):
self.finished_files = [] # List of all finished NZFs
# the current status of the nzo eg:
# The current status of the nzo eg:
# Queued, Downloading, Repairing, Unpacking, Failed, Complete
self.status = status
self.avg_bps_freq = 0
@@ -697,10 +699,7 @@ class NzbObject(TryList):
# Stores one line containing the last failure
self.fail_msg = ''
# Stores various info about the nzo to be
if nzo_info:
self.nzo_info = nzo_info
else:
self.nzo_info = {}
self.nzo_info = nzo_info or {}
# Temporary store for custom foldername - needs to be stored because of url fetching
self.custom_name = nzbname

View File

@@ -36,7 +36,7 @@ import logging
import sabnzbd
import sabnzbd.cfg
from sabnzbd.constants import VALID_ARCHIVES, MEBI, Status
from sabnzbd.constants import VALID_ARCHIVES, VALID_NZB_FILES, MEBI, Status
from sabnzbd.misc import get_filename, get_ext, diskspace, to_units
from sabnzbd.panic import launch_a_browser
import sabnzbd.notifier as notifier
@@ -754,7 +754,7 @@ class SABnzbdDelegate(NSObject):
if get_ext(name) in VALID_ARCHIVES:
# logging.info('[osx] archive')
dirscanner.ProcessArchiveFile(fn, name, keep=True)
elif get_ext(name) in ('.nzb', '.gz', '.bz2'):
elif get_ext(name) in VALID_NZB_FILES:
# logging.info('[osx] nzb')
dirscanner.ProcessSingleFile(fn, name, keep=True)
# logging.info('opening done')
@@ -764,10 +764,7 @@ class SABnzbdDelegate(NSObject):
self.setMenuTitle_("\n\n%s\n" % (T('Stopping...')))
self.status_item.setHighlightMode_(NO)
self.osx_icon = False
logging.info('[osx] application stopping daemon')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
try:
notifier.send_notification('SABnzbd', T('SABnzbd shutdown finished'), notifier.NOTIFICATION['other'])
except AttributeError:

View File

@@ -31,7 +31,7 @@ from sabnzbd.newsunpack import unpack_magic, par2_repair, external_processing, \
sfv_check, build_filelists, rar_sort
from threading import Thread
from sabnzbd.misc import real_path, get_unique_path, create_dirs, move_to_path, \
make_script_path, long_path, clip_path, \
make_script_path, long_path, clip_path, recursive_listdir, \
on_cleanup_list, renamer, remove_dir, remove_all, globber, globber_full, \
set_permissions, cleanup_empty_directories, fix_unix_encoding, \
sanitize_and_trim_path, sanitize_files_in_folder, remove_file
@@ -385,10 +385,12 @@ def process_job(nzo):
nzo.status = Status.EXTRACTING
logging.info("Running unpack_magic on %s", filename)
unpack_error, newfiles = unpack_magic(nzo, workdir, tmp_workdir_complete, flag_delete, one_folder, (), (), (), (), ())
logging.info("Unpacked files %s", newfiles)
if sabnzbd.WIN32:
# Sanitize the resulting files
newfiles = sanitize_files_in_folder(tmp_workdir_complete)
logging.info("unpack_magic finished on %s", filename)
logging.info("Finished unpack_magic on %s", filename)
else:
nzo.set_unpack_info('Unpack', T('No post-processing because of failed verification'))
@@ -866,10 +868,7 @@ def nzb_redirect(wdir, nzbname, pp, script, cat, priority):
if so send to queue and remove if on CleanList
Returns list of processed NZB's
"""
files = []
for root, _dirs, names in os.walk(wdir):
for name in names:
files.append(os.path.join(root, name))
files = recursive_listdir(wdir)
for file_ in files:
if os.path.splitext(file_)[1].lower() != '.nzb':

View File

@@ -166,10 +166,7 @@ class SABTrayThread(SysTrayIconThread):
# menu handler - adapted from interface.py
def shutdown(self, icon):
self.hover_text = self.txt_shutdown
logging.info('Shutdown requested by tray')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
# adapted from interface.py
def pause(self):

View File

@@ -169,9 +169,7 @@ class StatusIcon(Thread):
def shutdown(self, icon):
self.hover_text = T('Shutdown')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
sabnzbd.shutdown_program()
def pause(self):
scheduler.plan_resume(0)

View File

@@ -30,11 +30,12 @@ from httplib import IncompleteRead
from threading import Thread
import sabnzbd
from sabnzbd.constants import DEF_TIMEOUT, MAX_URL_RETRIES, FUTURE_Q_FOLDER, Status
from sabnzbd.constants import DEF_TIMEOUT, FUTURE_Q_FOLDER, VALID_NZB_FILES, Status
from sabnzbd.encoding import unicoder
import sabnzbd.misc as misc
import sabnzbd.dirscanner as dirscanner
from sabnzbd.nzbqueue import NzbQueue
from sabnzbd.postproc import PostProcessor
import sabnzbd.cfg as cfg
import sabnzbd.emailer as emailer
import sabnzbd.notifier as notifier
@@ -64,8 +65,8 @@ class URLGrabber(Thread):
future_nzo.url_tries += 1
# Too many tries? Cancel
if future_nzo.url_tries > MAX_URL_RETRIES:
bad_fetch(future_nzo, url, T('Maximum retries'))
if future_nzo.url_tries > cfg.max_url_retries():
self.fail_to_history(future_nzo, url, T('Maximum retries'))
return
future_nzo.url_wait = time.time() + when
@@ -119,11 +120,11 @@ class URLGrabber(Thread):
nzo_info = {}
wait = 0
retry = True
fn = None
fetch_request = None
logging.info('Grabbing URL %s', url)
try:
fn = _build_request(url)
fetch_request = _build_request(url)
except Exception, e:
# Cannot list exceptions here, because of unpredictability over platforms
error0 = str(sys.exc_info()[0]).lower()
@@ -146,16 +147,17 @@ class URLGrabber(Thread):
# Catch if the server send retry (e.headers is case-INsensitive)
wait = misc.int_conv(e.headers['retry-after'])
new_url = dereferring(url, fn)
# Check if dereference is used
new_url = dereferring(url, fetch_request)
if new_url:
self.add(new_url, future_nzo)
continue
if fn:
for hdr in fn.headers:
if fetch_request:
for hdr in fetch_request.headers:
try:
item = hdr.lower()
value = fn.headers[hdr]
value = fetch_request.headers[hdr]
except:
continue
if item in ('content-encoding',) and value == 'gzip':
@@ -194,16 +196,16 @@ class URLGrabber(Thread):
# For sites that have a rate-limiting attribute
msg = ''
retry = True
fn = None
fetch_request = None
elif retry:
fn, msg, retry, wait, data = _analyse(fn, url, future_nzo)
fetch_request, msg, retry, wait, data = _analyse(fetch_request, url, future_nzo)
if not fn:
if not fetch_request:
if retry:
logging.info('Retry URL %s', url)
self.add(url, future_nzo, wait)
else:
bad_fetch(future_nzo, url, msg)
self.fail_to_history(future_nzo, url, msg)
continue
if not filename:
@@ -225,12 +227,12 @@ class URLGrabber(Thread):
filename += '.gz'
if not data:
try:
data = fn.read()
data = fetch_request.read()
except (IncompleteRead, IOError):
bad_fetch(future_nzo, url, T('Server could not complete request'))
fn.close()
self.fail_to_history(future_nzo, url, T('Server could not complete request'))
fetch_request.close()
continue
fn.close()
fetch_request.close()
if '<nzb' in data and misc.get_ext(filename) != '.nzb':
filename += '.nzb'
@@ -247,7 +249,7 @@ class URLGrabber(Thread):
del data
# Check if nzb file
if misc.get_ext(filename) in ('.nzb', '.gz', 'bz2'):
if misc.get_ext(filename) in VALID_NZB_FILES:
res = dirscanner.ProcessSingleFile(filename, path, pp=pp, script=script, cat=cat, priority=priority,
nzbname=nzbname, nzo_info=nzo_info, url=future_nzo.url, keep=False,
nzo_id=future_nzo.nzo_id)[0]
@@ -263,8 +265,9 @@ class URLGrabber(Thread):
logging.info('Unknown error fetching NZB, retry after 2 min %s', url)
when = 120
self.add(url, future_nzo, when)
# Check if a supported archive
else:
# Check if a supported archive
status, zf, exp_ext = dirscanner.is_archive(path)
if status == 0:
if misc.get_ext(filename) not in ('.rar', '.zip', '.7z'):
@@ -275,9 +278,10 @@ class URLGrabber(Thread):
dirscanner.ProcessArchiveFile(filename, path, pp, script, cat, priority=priority,
nzbname=nzbname, url=future_nzo.url, keep=False,
nzo_id=future_nzo.nzo_id)
else:
# Not a supported filetype, not an nzb (text/html ect)
try:
os.remove(fn)
os.remove(fetch_request)
except:
pass
logging.info('Unknown filetype when fetching NZB, retry after 30s %s', url)
@@ -286,6 +290,38 @@ class URLGrabber(Thread):
logging.error(T('URLGRABBER CRASHED'), exc_info=True)
logging.debug("URLGRABBER Traceback: ", exc_info=True)
def fail_to_history(self, nzo, url, msg='', content=False):
""" Create History entry for failed URL Fetch
msg: message to be logged
content: report in history that cause is a bad NZB file
"""
# Remove the "Trying to fetch" part
if url:
nzo.filename = url
nzo.final_name = url.strip()
if content:
# Bad content
msg = T('Unusable NZB file')
else:
# Failed fetch
msg = T('URL Fetching failed; %s') % unicoder(msg)
# Mark as failed
nzo.status = Status.FAILED
nzo.fail_msg = msg
notifier.send_notification(T('URL Fetching failed; %s') % '', '%s\n%s' % (msg, url), 'other', nzo.cat)
if cfg.email_endjob() > 0:
emailer.badfetch_mail(msg, url)
# Parse category to make sure script is set correctly after a grab
nzo.cat, _, nzo.script, _ = misc.cat_to_opts(nzo.cat, script=nzo.script)
# Add to history and run script if desired
NzbQueue.do.remove(nzo.nzo_id, add_to_history=False)
PostProcessor.do.process(nzo)
def _build_request(url):
# Detect basic auth
@@ -309,14 +345,14 @@ def _build_request(url):
return urllib2.urlopen(req)
def _analyse(fn, url, future_nzo):
def _analyse(fetch_request, url, future_nzo):
""" Analyze response of indexer
returns fn|None, error-message|None, retry, wait-seconds, data
returns fetch_request|None, error-message|None, retry, wait-seconds, data
"""
data = None
if not fn or fn.code != 200:
if fn:
msg = fn.msg
if not fetch_request or fetch_request.code != 200:
if fetch_request:
msg = fetch_request.msg
else:
msg = ''
@@ -326,22 +362,22 @@ def _analyse(fn, url, future_nzo):
return None, msg, True, when, data
# Check for an error response
if not fn or fn.msg != 'OK':
if not fetch_request or fetch_request.msg != 'OK':
# Increasing wait-time in steps for standard errors
when = DEF_TIMEOUT * (future_nzo.url_tries + 1)
logging.debug('Received nothing from indexer, retry after %s sec', when)
return None, fn.msg, True, when, data
return None, fetch_request.msg, True, when, data
return fn, fn.msg, False, 0, data
return fetch_request, fetch_request.msg, False, 0, data
def dereferring(url, fn):
def dereferring(url, fetch_request):
""" Find out if we're being diverted to another location.
If so, return new url else None
"""
if 'derefer.me' in url:
_RE_DEREFER = re.compile(r'content=".*url=([^"]+)">')
data = fn.read()
data = fetch_request.read()
for line in data.split('\n'):
if '<meta' in line:
m = _RE_DEREFER.search(data)
@@ -350,34 +386,3 @@ def dereferring(url, fn):
return None
def bad_fetch(nzo, url, msg='', content=False):
""" Create History entry for failed URL Fetch
msg : message to be logged
retry : make retry link in history
content : report in history that cause is a bad NZB file
"""
if msg:
msg = unicoder(msg)
else:
msg = ''
nzo.status = Status.FAILED
if url:
nzo.filename = url
nzo.final_name = url.strip()
if content:
# Bad content
msg = T('Unusable NZB file')
else:
# Failed fetch
msg = T('URL Fetching failed; %s') % msg
nzo.fail_msg = msg
notifier.send_notification(T('URL Fetching failed; %s') % '', '%s\n%s' % (msg, url), 'other', nzo.cat)
if cfg.email_endjob() > 0:
emailer.badfetch_mail(msg, url)
NzbQueue.do.remove(nzo.nzo_id, add_to_history=True)

View File

@@ -12,8 +12,9 @@ from cryptography import x509
from cryptography.x509.oid import NameOID
import datetime
import os
from sabnzbd.getipaddress import localipv4
import socket
from sabnzbd.getipaddress import localipv4
# Ported from cryptography/utils.py
def int_from_bytes(data, byteorder, signed=False):
@@ -60,15 +61,25 @@ def generate_local_cert(private_key, days_valid=3560, output_file='cert.cert', L
# x509.NameAttribute(NameOID.COMMON_NAME, CN),
])
# build SubjectAltName list since we are not using a common name
san_list = [
x509.DNSName(u"localhost"),
x509.DNSName(u"127.0.0.1"),
]
# append local v4 ip (functions already has try/catch logic)
mylocalipv4 = localipv4()
if mylocalipv4:
san_list.append(x509.DNSName(u"" + mylocalipv4))
# build Subject Alternate Names (aka SAN) list
# First the host names, add with x509.DNSName():
san_list = [x509.DNSName(u"localhost")]
san_list.append(x509.DNSName(unicode(socket.gethostname())))
# Then the host IP addresses, add with x509.IPAddress()
# Inside a try-except, just to be sure
try:
import ipaddress
san_list.append(x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1")))
san_list.append(x509.IPAddress(ipaddress.IPv6Address(u"::1")))
# append local v4 ip
mylocalipv4 = localipv4()
if mylocalipv4:
san_list.append(x509.IPAddress(ipaddress.IPv4Address(unicode(mylocalipv4))))
except:
pass
cert = x509.CertificateBuilder().subject_name(
subject

View File

@@ -26,7 +26,7 @@ from sabnzbd.encoding import unicoder
import sabnzbd.cfg as cfg
from sabnzbd.misc import get_ext, get_filename, get_from_url
import sabnzbd.newsunpack
from sabnzbd.constants import VALID_ARCHIVES
from sabnzbd.constants import VALID_ARCHIVES, VALID_NZB_FILES
from sabnzbd.dirscanner import ProcessArchiveFile, ProcessSingleFile
@@ -60,7 +60,7 @@ def add_local(f):
if fn:
if get_ext(fn) in VALID_ARCHIVES:
ProcessArchiveFile(fn, f, keep=True)
elif get_ext(fn) in ('.nzb', '.gz', '.bz2'):
elif get_ext(fn) in VALID_NZB_FILES:
ProcessSingleFile(fn, f, keep=True)
else:
logging.error("Filename not found: %s", f)

View File

@@ -4,5 +4,5 @@
# You MUST use double quotes (so " and not ')
__version__ = "2.4.0-develop"
__baseline__ = "unknown"
__version__ = "2.3.3"
__baseline__ = "1f04343a4d9453050d6c36087ee2e2fd6c5eee32"

View File

@@ -1,15 +1,15 @@
@echo off
rem Example of a post processing script for SABnzbd
echo.
echo Running in directory "%~d0%~p0"
echo.
echo The first parameter (result-dir) = %1
echo The second parameter (nzb-name) = %2
echo The third parameter (nice name) = %3
echo The fourth parameter (newzbin #) = %4
echo The fifth parameter (category) = %5
echo The sixth parameter (group) = %6
echo The seventh parameter (status) = %7
echo The eight parameter (failure_url)= %8
echo.
@echo off
rem Example of a post processing script for SABnzbd
echo.
echo Running in directory "%~d0%~p0"
echo.
echo The first parameter (result-dir) = %1
echo The second parameter (nzb-name) = %2
echo The third parameter (nice name) = %3
echo The fourth parameter (newzbin #) = %4
echo The fifth parameter (category) = %5
echo The sixth parameter (group) = %6
echo The seventh parameter (status) = %7
echo The eight parameter (failure_url)= %8
echo.