mirror of
https://github.com/sabnzbd/sabnzbd.git
synced 2026-01-05 22:20:21 -05:00
Compare commits
231 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4de2d626d | ||
|
|
71ee5969a8 | ||
|
|
1b1c772b55 | ||
|
|
458eb3a417 | ||
|
|
98b753f015 | ||
|
|
a3284e12d2 | ||
|
|
c85120bb4b | ||
|
|
903925e06b | ||
|
|
03196f25e4 | ||
|
|
e3f3f962b6 | ||
|
|
153f92e697 | ||
|
|
c1dcafe953 | ||
|
|
b53d97732b | ||
|
|
8f47cce9c8 | ||
|
|
3cf42a7f94 | ||
|
|
ae74370cfb | ||
|
|
2aaa283991 | ||
|
|
dca7a8ccdb | ||
|
|
2b3b5b765a | ||
|
|
3172d6e987 | ||
|
|
c237ddfef4 | ||
|
|
b543dcb5ac | ||
|
|
ccfbb07333 | ||
|
|
256ccbd6a1 | ||
|
|
d8d507f110 | ||
|
|
7b3309649f | ||
|
|
9a7a6652e8 | ||
|
|
db4891748f | ||
|
|
3dce2e8908 | ||
|
|
c91291c315 | ||
|
|
a2a5a1f8e4 | ||
|
|
7651f709ad | ||
|
|
a565077348 | ||
|
|
6cf99e7d3a | ||
|
|
f730a82005 | ||
|
|
5449607c1d | ||
|
|
c62415abfd | ||
|
|
dcbea3057c | ||
|
|
91642d16c8 | ||
|
|
2f2773149d | ||
|
|
adaba03f50 | ||
|
|
58a5e09540 | ||
|
|
20dc906095 | ||
|
|
e2f41d3761 | ||
|
|
ab1372c7fc | ||
|
|
e305678cf4 | ||
|
|
a82df9bf2e | ||
|
|
986604f27c | ||
|
|
59324c7453 | ||
|
|
91613a5b37 | ||
|
|
5ca05fd2c0 | ||
|
|
4d4045cff4 | ||
|
|
1f209a42d8 | ||
|
|
bffbb362db | ||
|
|
435eed8818 | ||
|
|
f86656543a | ||
|
|
9c510c6dd1 | ||
|
|
f81ab3d1c0 | ||
|
|
d1585c28a9 | ||
|
|
9c314532c0 | ||
|
|
853bda5d86 | ||
|
|
d05e31f7f0 | ||
|
|
383354871d | ||
|
|
2086a217e0 | ||
|
|
34f3574746 | ||
|
|
1dfe0b957e | ||
|
|
17d14bc3b4 | ||
|
|
885032e436 | ||
|
|
ceee95aaf7 | ||
|
|
bc6b3091eb | ||
|
|
4be1a13316 | ||
|
|
a77327ee7f | ||
|
|
aa706012af | ||
|
|
f5b6203194 | ||
|
|
1ced9a54e4 | ||
|
|
06c7089a77 | ||
|
|
ee1d864eea | ||
|
|
d703338935 | ||
|
|
e87b24c460 | ||
|
|
3404ef6516 | ||
|
|
181897e92b | ||
|
|
26a504e3e2 | ||
|
|
b72ed09011 | ||
|
|
bb99c0d58e | ||
|
|
4516027fdb | ||
|
|
e35f2ea3cd | ||
|
|
6b79fad626 | ||
|
|
ac311be430 | ||
|
|
4fb32bff5f | ||
|
|
5fda342a55 | ||
|
|
e23aab4710 | ||
|
|
3837d5dace | ||
|
|
f61e7cb1ed | ||
|
|
3de0c0e4ac | ||
|
|
63796d3feb | ||
|
|
6b07529300 | ||
|
|
e10676710c | ||
|
|
77f67c6666 | ||
|
|
bdbcdd61e1 | ||
|
|
4ab7ec754d | ||
|
|
20f98f48bc | ||
|
|
84e0502e50 | ||
|
|
2aa1b00dbb | ||
|
|
972078a514 | ||
|
|
be8382d25b | ||
|
|
8d46e88cd8 | ||
|
|
6b6b1b79ad | ||
|
|
e1fd40b34d | ||
|
|
bc1f8f97a8 | ||
|
|
b51705f458 | ||
|
|
aaed5f4797 | ||
|
|
a8eedef1d2 | ||
|
|
9407e21e1e | ||
|
|
ba6dcfd467 | ||
|
|
e2c1de5008 | ||
|
|
10b7403748 | ||
|
|
1ba924cc12 | ||
|
|
11eb034bd3 | ||
|
|
c3250e15cb | ||
|
|
8ff8a59b4c | ||
|
|
0c646d88b2 | ||
|
|
05670ea599 | ||
|
|
e25eb32885 | ||
|
|
250f75f084 | ||
|
|
cdd39e6777 | ||
|
|
281ed6766c | ||
|
|
cd78c89de1 | ||
|
|
c6c983e8f2 | ||
|
|
ef4d1ce54f | ||
|
|
b1177f4265 | ||
|
|
02d373e4a6 | ||
|
|
58c8608667 | ||
|
|
848110ac3e | ||
|
|
74d677cf09 | ||
|
|
f029c4eb4f | ||
|
|
838811f085 | ||
|
|
e212ec7ca3 | ||
|
|
6314a536af | ||
|
|
df33765ce0 | ||
|
|
2524333e79 | ||
|
|
cf81e815ee | ||
|
|
7bd7f1826c | ||
|
|
9ce7b528e3 | ||
|
|
db7b3cf0b5 | ||
|
|
201b30b6c4 | ||
|
|
36a6bcd1f5 | ||
|
|
20cfca5bb6 | ||
|
|
63fe4b15c8 | ||
|
|
aabc57a1f8 | ||
|
|
9a8eca0993 | ||
|
|
f8723d7e52 | ||
|
|
59bb5528ed | ||
|
|
247c10692a | ||
|
|
63bed3c127 | ||
|
|
ca96743bad | ||
|
|
525fb4de61 | ||
|
|
f294084dbc | ||
|
|
ca1327a9ae | ||
|
|
dcb1b0b3dc | ||
|
|
ec4b613498 | ||
|
|
c3f4eccfbc | ||
|
|
1aafe25a83 | ||
|
|
cc25ef0af0 | ||
|
|
5c221f4a14 | ||
|
|
03221fc645 | ||
|
|
febf81e597 | ||
|
|
447ec55822 | ||
|
|
eee1f49c4a | ||
|
|
140b903783 | ||
|
|
8361bc9f3a | ||
|
|
744290c228 | ||
|
|
20768df430 | ||
|
|
7ec7e8d432 | ||
|
|
7b657a85ba | ||
|
|
258699f1db | ||
|
|
0412f45323 | ||
|
|
997eb93cd9 | ||
|
|
b94192486b | ||
|
|
73bdd2c5bf | ||
|
|
56e9b54cd9 | ||
|
|
3308074f81 | ||
|
|
c2305034a1 | ||
|
|
d77b22be37 | ||
|
|
9717912ff7 | ||
|
|
cfa79c08b2 | ||
|
|
4f65f87ad6 | ||
|
|
aea0d21fd2 | ||
|
|
ba77b43364 | ||
|
|
7727eb58a8 | ||
|
|
dbd2e3f54b | ||
|
|
7ac6e07576 | ||
|
|
24ffd90fb4 | ||
|
|
011b680337 | ||
|
|
5328e07a93 | ||
|
|
2d07af7cc8 | ||
|
|
a40d2da2ab | ||
|
|
25ac101751 | ||
|
|
a666165a5e | ||
|
|
e24aedc6ac | ||
|
|
d10d69e44b | ||
|
|
af5c01ee3a | ||
|
|
bf350cddc8 | ||
|
|
9bc4d909b5 | ||
|
|
42236de5bd | ||
|
|
02e2fe2cc8 | ||
|
|
b75bcb90f4 | ||
|
|
56b88eb406 | ||
|
|
93741ea9ab | ||
|
|
f7509132fc | ||
|
|
2d0d62ec00 | ||
|
|
4e07a84102 | ||
|
|
32a048a879 | ||
|
|
caac28fcbc | ||
|
|
5b0bbf57c6 | ||
|
|
072af938c2 | ||
|
|
9e8202371e | ||
|
|
27dd253c5d | ||
|
|
8d651af2f8 | ||
|
|
6358312272 | ||
|
|
42c8367e13 | ||
|
|
c1e38b5e81 | ||
|
|
1b4ce24037 | ||
|
|
cf440750b6 | ||
|
|
30c480df36 | ||
|
|
9c3dbd39ef | ||
|
|
1af2f92828 | ||
|
|
45277bb00f | ||
|
|
10e21a3af9 | ||
|
|
19cbadd420 | ||
|
|
a28cbe52b9 | ||
|
|
37f1d64e46 |
@@ -1,5 +1,5 @@
|
||||
*******************************************
|
||||
*** This is SABnzbd 0.7.2 ***
|
||||
*** This is SABnzbd 0.7.10 ***
|
||||
*******************************************
|
||||
SABnzbd is an open-source cross-platform binary newsreader.
|
||||
It simplifies the process of downloading from Usenet dramatically,
|
||||
|
||||
170
CHANGELOG.txt
170
CHANGELOG.txt
@@ -1,3 +1,173 @@
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.10Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Disable obsolete newzbin bookmark readout
|
||||
- Show speed when downloading in Forced mode while paused
|
||||
- Plush History icons repair and unpack were swapped
|
||||
- Try to repair rar/par sets with obfuscated names
|
||||
- Reset "today" byte counters at midnight even when idle
|
||||
- Display next RSS scan moment in Cfg->RSS
|
||||
- An email about a failed should say that the download failed
|
||||
- Report errors coming from fully encrypted rar files
|
||||
- Accept NNTP error 400 without "too many connection" clues as a transient error.
|
||||
- Accept %fn (next to %fn.%ext) as end parameter in sorting strings.
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.9Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Fix fatal error in decoder when encountering a malformed article
|
||||
- Fix compatibility with free.xsusenet.com
|
||||
- Small fix in smpl-black CSS
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.8Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Fix problem with %fn substitution in Sorting
|
||||
- Add special "wait_for_dfolder", enables waiting for external temp download folder
|
||||
- Work-around for servers that do not support STAT command
|
||||
- Removed articles are now listed seperately in download report
|
||||
- Add "abort" option to encryption detection
|
||||
- Fix missing Retry link for "Out of retention" jobs.
|
||||
- Option to abort download when it is clear that not enough data is available
|
||||
- Support "nzbname" parameter in addfile/addlocalfile api calls for
|
||||
ZIP files with a single NZB
|
||||
- Support NZB-1.1 meta data "password" and "category"
|
||||
- Don't retry an empty but correct NZB from an indexer
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.7Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Windows/OSX: Update unrar to 4.20
|
||||
- Fix some issues with orphaned items
|
||||
- Generic sort didn't always rename media files in multi-part jobs properly
|
||||
- Optional web-ui watchdog
|
||||
- Always show RSS items in the same order as the original RSS feed
|
||||
- Remove unusable folders from folder selector (Plush skin)
|
||||
- Remove newzbin support
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.6Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Recursive scanning when re-queuing downloaded NZB files
|
||||
- Log "User-Agent" header of API calls
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.6Beta2 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- A damaged smallest par2 can block fetching of more par2 files
|
||||
- Fix evaluation of schedules at startup
|
||||
- Make check for running SABnzbd instance more robust
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.6Beta1 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Handle par2 sets that were renamed after creation
|
||||
- Prevent blocking assembly of completed files, ( this resulted in
|
||||
excessive CPU and memory usage)
|
||||
- Fix speed issues with some Usenet servers due to unreachable IPv6 addresses
|
||||
- Fix issues with SFV-base checks
|
||||
- Prevent crash on Unix-Pythons that don't have the os.getloadavg() function
|
||||
- Successfully pre-checked job lost its attributes when those were changed during check
|
||||
- Remove version check when looking for a running instance of SABnzbd
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.5Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Add missing %dn formula to Generic Sort
|
||||
- Improve RSS logging
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.5RC1 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Prevent stuck jobs at end of pre-check.
|
||||
- Fix issues with accented and special characters in names of downloaded files.
|
||||
- Adjust nzbmatrix category table.
|
||||
- Add 'prio_sort_list' special
|
||||
- Add special option 'empty_postproc'.
|
||||
- Prevent CherryPy crash when reading a cookie from another app which has a non-standard name.
|
||||
- Prevent crash when trying to open non-existing "complete" folder from Windows System-tray icon.
|
||||
- Fix problem with "Read" button when RSS feed name contains "&".
|
||||
- Prevent unusual SFV files from crashing post-processing.
|
||||
- OSX: Retina compatible menu-bar icons.
|
||||
- Don't show speed and ETA when download is paused during post-processing
|
||||
- Prevent soft-crash when api-function "addfile" is called without parameters.
|
||||
- Add news channel frame
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Pre-queue script no longer got the show/season/episode information.
|
||||
- Prevent crash on startup when a fully downloaded job is still in download queue.
|
||||
- New RSS feed should no longer be considered new after first, but empty readout.
|
||||
- Make "auth" call backward-compatible with 0.6.x releases.
|
||||
- Config->Notifications: email and growl server addresses should not be marked as "url" type.
|
||||
- OSX: fix top menu queue info so that it shows total queue size
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4RC2 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Pre-check failed to consider extra par2 files
|
||||
- Fixed unjustified warning that can occur with OSX Growl 2.0
|
||||
- Show memory usage on Linux systems
|
||||
- Fix incorrect end-of-month quota reset
|
||||
- Fix UI refresh issue when using Safari on iOS6
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4RC1 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Remove potential queue stalling when downloading extra par2 files
|
||||
- Make Windows version less eager to use par2-classic
|
||||
- Fixed DMG images
|
||||
- Add missing encoding directive to Plush and Classic skins
|
||||
- Prevent oversized data in API-call "history"
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4Beta3 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- All three OSX build in one DMG again
|
||||
- Minor bugfixes
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4Beta2 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Fix failure to fetch more par2-files for posts with badly formatted subject lines
|
||||
- After successful pre-check, preserve a job's position in the queue
|
||||
- Restore SABnzbd icon for Growl
|
||||
- Fix "check new releases" option in Config skin
|
||||
- Separate DMG files for OSX Leopard/SL, Lion and MLion
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.4Beta1 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- OSX Mountain Lion Notification Center support
|
||||
- OSX Mountain Lion improved "keep awake" support
|
||||
- OSX: separate builds: one for Mountain Lion and one for all others
|
||||
- OSX removed 64bit code
|
||||
- Scheduler: action can now run on multiple weekdays
|
||||
- Scheduler: add "remove failed jobs" action
|
||||
- Special option: rss_odd_titles (see Wiki)
|
||||
- Support for HTTPS chain files (needed when you buy your own certificate)
|
||||
- Prevent jobs from showing up in queue and history simultaneously
|
||||
- Add parameter 'pp_active' to history elements in qstatus API call
|
||||
- Fix some minor par2 handling bugs
|
||||
- Prevent potential crash when an actively downloading job is deleted from the queue
|
||||
- Special option: 'overwrite_files' (See Wiki)
|
||||
- Don't try an SFV check when a retried job was already successfully verified by par2
|
||||
- Enable compression of API call results
|
||||
- Log failed attempts to log in to the Web UI
|
||||
- A job with "forced" priority should keep that when fetching more par2 files
|
||||
- Updated translations
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.3Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Rename Special "random_server_ip" to "randomize_server_ip" so that we
|
||||
can force the default to "Off". "On" kills speed on some servers.
|
||||
- Ignore pseudo NZB files that start with a period in the name
|
||||
- SFV failure now listed in History instead of issuing warnings
|
||||
- Translation updates
|
||||
- "502" errors about payments/credits will now block a server
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.3Beta2 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Try to keep OSX Mountain Lion awake as long as downloading/postprocessing runs
|
||||
- Prevent queue deadlock in case of fatally damaged par2 files
|
||||
- Add RSS filter-enable checkboxes to Plush, Smpl and Classic skins
|
||||
- Fix problem with saving modified paramters of an already enabled server
|
||||
- Extend "check new release" option with test releases
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.3Beta1 by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Correct several errors in Sort function
|
||||
- Improve organization of Config->Servers
|
||||
- Support for nzbxxx.com
|
||||
- Make detection of samples less aggressive
|
||||
- Some minor corrections
|
||||
-------------------------------------------------------------------------------
|
||||
0.7.2Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
(c) Copyright 2007-2012 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
(c) Copyright 2007-2013 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
|
||||
The SABnzbd-team is:
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
SABnzbd 0.7.2
|
||||
SABnzbd 0.7.10
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
0) LICENSE
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
(c) Copyright 2007-2012 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
(c) Copyright 2007-2013 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
@@ -60,7 +60,8 @@ Unix/Linux/OSX
|
||||
OSX Leopard/SnowLeopard
|
||||
Python 2.6 http://www.activestate.com
|
||||
|
||||
OSX Lion Apple Python 2.7 (included in OSX)
|
||||
OSX Lion/MountainLion
|
||||
Apple Python 2.7 Included in OSX (default)
|
||||
|
||||
Windows
|
||||
Python-2.7.latest http://www.activestate.com
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(c) Copyright 2007-2012 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
(c) Copyright 2007-2013 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
||||
@@ -320,7 +320,7 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "URLUpdateInfo" 'http://sabnzbd.org/'
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Comments" 'The automated Usenet download tool'
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayIcon" '$INSTDIR\interfaces\Classic\templates\static\images\favicon.ico'
|
||||
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "EstimatedSize" 18400
|
||||
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "EstimatedSize" 25674
|
||||
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoRepair" -1
|
||||
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoModify" -1
|
||||
; write out uninstaller
|
||||
|
||||
6
PKG-INFO
6
PKG-INFO
@@ -1,8 +1,8 @@
|
||||
Metadata-Version: 1.0
|
||||
Name: SABnzbd
|
||||
Version: 0.7.2
|
||||
Summary: SABnzbd-0.7.2
|
||||
Home-page: http://sourceforge.net/projects/sabnzbdplus
|
||||
Version: 0.7.10
|
||||
Summary: SABnzbd-0.7.10
|
||||
Home-page: http://sabnzbd.org
|
||||
Author: The SABnzbd Team
|
||||
Author-email: team@sabnzbd.org
|
||||
License: GNU General Public License 2 (GPL2 or later)
|
||||
|
||||
71
README.mkd
Normal file
71
README.mkd
Normal file
@@ -0,0 +1,71 @@
|
||||
Release Notes - SABnzbd 0.7.10
|
||||
================================
|
||||
|
||||
## Features
|
||||
- Try to repair rar/par sets with obfuscated names
|
||||
- Display next RSS scan moment in Cfg->RSS
|
||||
|
||||
## Bug fixes
|
||||
- Disable obsolete newzbin bookmark readout
|
||||
- Show speed when downloading in Forced mode while paused
|
||||
- Plush History icons repair and unpack were swapped
|
||||
- Reset "today" byte counters at midnight even when idle
|
||||
- An email about a failed should say that the download failed
|
||||
- Report errors coming from fully encrypted rar files
|
||||
- Accept %fn (as well as %fn.%ext) as end parameter in sorting strings.
|
||||
|
||||
## What's new in 0.7.0
|
||||
|
||||
- Download quota management
|
||||
- Windows: simple system tray menu
|
||||
- Multi-platform Growl support
|
||||
- NotifyOSD support for Linux distros that have it
|
||||
- Option to set maximum number of retries for servers (prevents deadlock)
|
||||
- Pre-download check to estimate completeness (reliability is limited)
|
||||
- Prevent partial downloading of par2 files that are not needed yet
|
||||
- Config->Special for settings previously only available in the sabnzbd.ini file
|
||||
- For Usenet servers with multiple IP addresses, pick a random one per connection
|
||||
- Add pseudo-priority "Stop" that will send the job immediately to the post-processing queue
|
||||
- Allow jobs still waiting for post-processing to be deleted too
|
||||
- More persistent retries for unreliable indexers
|
||||
- Single Configuration skin for all others skins (there is an option for the old style)
|
||||
- Config->Special for settings that were previously only changeable in the sabnzbd.ini file
|
||||
- Add Spanish, Portuguese (Brazil) and Polish translations
|
||||
- Individual RSS filter toggle
|
||||
- Unified OSX DMG
|
||||
|
||||
|
||||
## About
|
||||
SABnzbd is an open-source cross-platform binary newsreader.
|
||||
It simplifies the process of downloading from Usenet dramatically,
|
||||
thanks to its web-based user interface and advanced
|
||||
built-in post-processing options that automatically verify, repair,
|
||||
extract and clean up posts downloaded from Usenet.
|
||||
|
||||
(c) Copyright 2007-2013 by "The SABnzbd-team" \<team@sabnzbd.org\>
|
||||
|
||||
|
||||
### IMPORTANT INFORMATION about release 0.7.x
|
||||
<http://wiki.sabnzbd.org/introducing-0-7-0>
|
||||
|
||||
### Known problems and solutions
|
||||
- Read the file "ISSUES.txt"
|
||||
|
||||
### Upgrading from 0.6.x
|
||||
- Stop SABnzbd
|
||||
- Install new version
|
||||
- Start SABnzbd
|
||||
|
||||
### Upgrading from 0.5.x
|
||||
- Stop SABnzbd
|
||||
- Install new version
|
||||
- Start SABnzbd.
|
||||
|
||||
The organization of the download queue is different from 0.5.x.
|
||||
0.7.x will finish downloading an existing queue, but you
|
||||
cannot go back to an older version without losing your queue.
|
||||
Also, your sabnzbd.ini file will be upgraded, making it
|
||||
incompatible with release 0.5.x
|
||||
|
||||
### Upgrading from 0.4.x
|
||||
Download your current queue before upgrading.
|
||||
133
README.rtf
133
README.rtf
@@ -1,133 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\paperw11900\paperh16840\vieww16360\viewh15680\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
|
||||
\f0\b\fs48 \cf0 SABnzbd 0.7.2\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b0\fs26 \cf0 \
|
||||
|
||||
\b Fixes in 0.7.2
|
||||
\b0 \
|
||||
- Improve support for nzbsrus.com\
|
||||
- Don't try to show NZB age when not known yet\
|
||||
- Prevent systems with unresolvable hostnames from always using 0.0.0.0\
|
||||
- Initial "quota left" was not set correctly when enabling quota\
|
||||
- Report incorrect RSS filter expressions (instead of aborting analysis)\
|
||||
- Improve detection of invalid articles (so that backup server will be tried)\
|
||||
- Windows installer: don't remove settings by default when uninstalling\
|
||||
- Fix sorting of rar files in job so that .rar preceeds .r00\
|
||||
- Fix for NZB-icon issue when 0.7.0 was previously installed\
|
||||
- Fix startup problem on Windows when IPv4 has precedence over IPv6\
|
||||
\
|
||||
|
||||
\b Fixes in 0.7.1
|
||||
\b0 \
|
||||
- Fixed problem were fetching par2 files after first verification could stall in the queue\
|
||||
- Fixed retry behaviour of NZB fetching from URL (with handling of nzbsrus.com error codes)\
|
||||
- Verification/repair would not be executed properly when one more RAR files missed their first article.\
|
||||
- Improved backup of sabnzbd.ini file, now uses backup when original is gone or corrupt\
|
||||
- Several translations extended/improved\
|
||||
- Plush skin: fix problems with pull-down menus in Mobile Safari\
|
||||
- On some Linux and OSX systems using localhost would still make SABnzbd give access to other computers\
|
||||
- Windows: the installer did not set an icon when associating NZB files with SABnzbd\
|
||||
- Fix problem that the Opera browser had with Config->Servers\
|
||||
- Retry a few times when accessing a mounted drive to create the final destination folder\
|
||||
- Minor fixes in Window Tray icon and OSX top menu\
|
||||
- Add no_ipv6 special for systems that keep having issues with [::1]\
|
||||
- Fix crash in QuickCheck when expected par2 file wasn't downloaded\
|
||||
- API calls "addurl" and "addid" (newzbin) can now be used interchangeably\
|
||||
- Fix endless par2-fetch loop after retrying failed job\
|
||||
- Don't send "bad fetch" email when emailing is off\
|
||||
- Add some support for nzbrus.com's non-VIP limiting\
|
||||
- Fix signing of OSX DMG\
|
||||
\
|
||||
|
||||
\b What's new in 0.7.0
|
||||
\b0 \
|
||||
- Download quota management\
|
||||
- Windows: simple system tray menu\
|
||||
- Multi-platform Growl support\
|
||||
- NotifyOSD support for Linux distros that have it\
|
||||
- Option to set maximum number of retries for servers (prevents deadlock)\
|
||||
- Pre-download check to estimate completeness (reliability is limited)\
|
||||
- Prevent partial downloading of par2 files that are not needed yet\
|
||||
- Config->Special for settings previously only available in the sabnzbd.ini file\
|
||||
- For Usenet servers with multiple IP addresses, pick a random one per connection\
|
||||
- Add pseudo-priority "Stop" that will send the job immediately to the post-processing queue\
|
||||
- Allow jobs still waiting for post-processing to be deleted too\
|
||||
- More persistent retries for unreliable indexers\
|
||||
- Single Configuration skin for all others skins (there is an option for the old style)\
|
||||
- Config->Special for settings that were previously only changeable in the sabnzbd.ini file\
|
||||
- Add Spanish, Portuguese (Brazil) and Polish translations\
|
||||
- Individual RSS filter toggle\
|
||||
- Unified OSX DMG\
|
||||
\
|
||||
|
||||
\b About
|
||||
\b0 \
|
||||
SABnzbd is an open-source cross-platform binary newsreader.\
|
||||
It simplifies the process of downloading from Usenet dramatically,\
|
||||
thanks to its web-based user interface and advanced\
|
||||
built-in post-processing options that automatically verify, repair,\
|
||||
extract and clean up posts downloaded from Usenet.\
|
||||
SABnzbd also has a fully customizable user interface,\
|
||||
and offers a complete API for third-party applications to hook into.\
|
||||
\
|
||||
(c) Copyright 2007-2012 by "The SABnzbd-team" <team@sabnzbd.org>\
|
||||
\
|
||||
There is an extensive Wiki on the use of SABnzbd.\
|
||||
{\field{\*\fldinst{HYPERLINK "http://wiki.sabnzbd.org/"}}{\fldrslt http://wiki.sabnzbd.org/}}\
|
||||
\
|
||||
|
||||
\b IMPORTANT INFORMATION
|
||||
\b0 about release 0.7.1:\
|
||||
{\field{\*\fldinst{HYPERLINK "http://wiki.sabnzbd.org/introducing-0-7-0"}}{\fldrslt http://wiki.sabnzbd.org/introducing-0-7-0}}\
|
||||
\
|
||||
|
||||
\b Known problems and solutions\
|
||||
|
||||
\b0 Read the file "ISSUES.txt"
|
||||
\b \
|
||||
|
||||
\b0 \
|
||||
\
|
||||
|
||||
\b\fs40 Upgrading from 0.6.x
|
||||
\b0\fs26 \
|
||||
Stop SABnzbd.\
|
||||
Install new version\
|
||||
Start SABnzbd.\
|
||||
\
|
||||
|
||||
\b\fs40 Upgrading from 0.5.x
|
||||
\b0\fs26 \
|
||||
Stop SABnzbd.\
|
||||
Uninstall current version, keeping the data.\
|
||||
Install new version\
|
||||
Start SABnzbd.\
|
||||
\
|
||||
The organization of the download queue is different from 0.5.x.\
|
||||
0.6.x will finish downloading an existing queue, but you\
|
||||
cannot go back to an older version without losing your queue.\
|
||||
Also, your sabnzbd.ini file will be upgraded, making it\
|
||||
incompatible with release 0.5.x\
|
||||
\
|
||||
|
||||
\b\fs40 \
|
||||
Upgrading from 0.4.x
|
||||
\b0\fs26 \
|
||||
\
|
||||
|
||||
\b PLEASE DOWNLOAD YOUR CURRENT QUEUE BEFORE UPGRADING
|
||||
\b0 \
|
||||
\
|
||||
When upgrading from a 0.4.x release such as 0.4.12 your old settings will be kept.\
|
||||
You will however be given a fresh queue and history. If you have items in your queue\
|
||||
from the older version of SABnzbd, you can either re-import the nzb files if you kept\
|
||||
an nzb backup folder, or temporarily go back to 0.4.x until your queue is complete.\
|
||||
The history is now stored in a better format meaning future upgrades should be backwards\
|
||||
compatible.\
|
||||
}
|
||||
67
README.txt
67
README.txt
@@ -1,67 +0,0 @@
|
||||
Release Notes - SABnzbd 0.7.2
|
||||
===============================
|
||||
|
||||
## Fixes in 0.7.2
|
||||
- Improve support for nzbsrus.com
|
||||
- Don't try to show NZB age when not known yet
|
||||
- Prevent systems with unresolvable hostnames from always using 0.0.0.0
|
||||
- Initial "quota left" was not set correctly when enabling quota
|
||||
- Report incorrect RSS filter expressions (instead of aborting analysis)
|
||||
- Improve detection of invalid articles (so that backup server will be tried)
|
||||
- Windows installer: don't remove settings by default when uninstalling
|
||||
- Fix sorting of rar files in job so that .rar preceeds .r00
|
||||
- Fix for NZB-icon issue when 0.7.0 was previously installed
|
||||
- Fix startup problem on Windows when IPv4 has precedence over IPv6
|
||||
|
||||
## Fixes in 0.7.1
|
||||
- Fixed problem were fetching par2 files after first verification could stall in the queue
|
||||
- Fixed retry behaviour of NZB fetching from URL (with handling of nzbsrus.com error codes)
|
||||
- Verification/repair would not be executed properly when one more RAR files
|
||||
missed their first article.
|
||||
- Improved backup of sabnzbd.ini file, now uses backup when original is gone or corrupt
|
||||
- Several translations extended/improved
|
||||
- Plush skin: fix problems with pull-down menus in Mobile Safari
|
||||
- On some Linux and OSX systems using localhost would still make SABnzbd
|
||||
give access to other computers
|
||||
- Windows: the installer did not set an icon when associating NZB files with SABnzbd
|
||||
- Fix problem that the Opera browser had with Config->Servers
|
||||
- Retry a few times when accessing a mounted drive to create the
|
||||
final destination folder
|
||||
- Minor fixes in Window Tray icon and OSX top menu
|
||||
- Add no_ipv6 special for systems that keep having issues with [::1]
|
||||
- Fix crash in QuickCheck when expected par2 file wasn't downloaded
|
||||
- API calls "addurl" and "addid" (newzbin) can now be used interchangeably
|
||||
- Fix endless par2-fetch loop after retrying failed job
|
||||
- Don't send "bad fetch" email when emailing is off
|
||||
- Add some support for nzbrus.com's non-VIP limiting
|
||||
- Fix signing of OSX DMG
|
||||
|
||||
## What's new in 0.7.0
|
||||
|
||||
- Download quota management
|
||||
- Windows: simple system tray menu
|
||||
- Multi-platform Growl support
|
||||
- NotifyOSD support for Linux distros that have it
|
||||
- Option to set maximum number of retries for servers (prevents deadlock)
|
||||
- Pre-download check to estimate completeness (reliability is limited)
|
||||
- Prevent partial downloading of par2 files that are not needed yet
|
||||
- Config->Special for settings previously only available in the sabnzbd.ini file
|
||||
- For Usenet servers with multiple IP addresses, pick a random one per connection
|
||||
- Add pseudo-priority "Stop" that will send the job immediately to the post-processing queue
|
||||
- Allow jobs still waiting for post-processing to be deleted too
|
||||
- More persistent retries for unreliable indexers
|
||||
- Single Configuration skin for all others skins (there is an option for the old style)
|
||||
- Config->Special for settings that were previously only changeable in the sabnzbd.ini file
|
||||
- Add Spanish, Portuguese (Brazil) and Polish translations
|
||||
- Individual RSS filter toggle
|
||||
- Unified OSX DMG
|
||||
|
||||
|
||||
## About
|
||||
SABnzbd is an open-source cross-platform binary newsreader.
|
||||
It simplifies the process of downloading from Usenet dramatically,
|
||||
thanks to its web-based user interface and advanced
|
||||
built-in post-processing options that automatically verify, repair,
|
||||
extract and clean up posts downloaded from Usenet.
|
||||
|
||||
(c) Copyright 2007-2012 by "The SABnzbd-team" <team@sabnzbd.org>
|
||||
64
SABnzbd.py
64
SABnzbd.py
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python -OO
|
||||
# Copyright 2008-2012 The SABnzbd-Team <team@sabnzbd.org>
|
||||
# Copyright 2008-2013 The SABnzbd-Team <team@sabnzbd.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@@ -28,6 +28,7 @@ import signal
|
||||
import socket
|
||||
import platform
|
||||
import time
|
||||
import re
|
||||
|
||||
try:
|
||||
import Cheetah
|
||||
@@ -253,13 +254,13 @@ def print_help():
|
||||
print " --log-all Log all article handling (for developers)"
|
||||
print " --console Force console logging for OSX app"
|
||||
print " --new Run a new instance of SABnzbd"
|
||||
print " --no_ipv6 Do listen on IPv6 address [::1]"
|
||||
print " --no_ipv6 Do not listen on IPv6 address [::1]"
|
||||
|
||||
def print_version():
|
||||
print """
|
||||
%s-%s
|
||||
|
||||
Copyright (C) 2008-2012, The SABnzbd-Team <team@sabnzbd.org>
|
||||
Copyright (C) 2008-2013, The SABnzbd-Team <team@sabnzbd.org>
|
||||
SABnzbd comes with ABSOLUTELY NO WARRANTY.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions. It is licensed under the
|
||||
@@ -671,7 +672,7 @@ def get_webhost(cherryhost, cherryport, https_port):
|
||||
return cherryhost, cherryport, browserhost, https_port
|
||||
|
||||
|
||||
def attach_server(host, port, cert=None, key=None):
|
||||
def attach_server(host, port, cert=None, key=None, chain=None):
|
||||
""" Define and attach server, optionally HTTPS
|
||||
"""
|
||||
if not (sabnzbd.cfg.no_ipv6() and '::1' in host):
|
||||
@@ -680,20 +681,18 @@ def attach_server(host, port, cert=None, key=None):
|
||||
if cert and key:
|
||||
http_server.ssl_certificate = cert
|
||||
http_server.ssl_private_key = key
|
||||
http_server.ssl_certificate_chain = chain
|
||||
adapter = _cpserver.ServerAdapter(cherrypy.engine, http_server, http_server.bind_addr)
|
||||
adapter.subscribe()
|
||||
|
||||
|
||||
def is_sabnzbd_running(url):
|
||||
def is_sabnzbd_running(url, timeout=None):
|
||||
""" Return True when there's already a SABnzbd instance running.
|
||||
"""
|
||||
try:
|
||||
url = '%s&mode=version' % (url)
|
||||
ver = sabnzbd.newsunpack.get_from_url(url)
|
||||
if ver and ver.strip(' \n\r\t') == sabnzbd.__version__:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
ver = sabnzbd.newsunpack.get_from_url(url, timeout=timeout)
|
||||
return bool(ver and re.search(r'\d+\.\d+\.', ver))
|
||||
except:
|
||||
return False
|
||||
|
||||
@@ -713,7 +712,7 @@ def find_free_port(host, currentport):
|
||||
|
||||
|
||||
def check_for_sabnzbd(url, upload_nzbs, allow_browser=True):
|
||||
""" Check for a running instance of sabnzbd(same version) on this port
|
||||
""" Check for a running instance of sabnzbd on this port
|
||||
allow_browser==True|None will launch the browser, False will not.
|
||||
"""
|
||||
if allow_browser is None:
|
||||
@@ -1211,8 +1210,6 @@ def main():
|
||||
sabnzbd.cfg.log_backups())
|
||||
|
||||
format = '%(asctime)s::%(levelname)s::[%(module)s:%(lineno)d] %(message)s'
|
||||
if sabnzbd.WIN32:
|
||||
format += '\r'
|
||||
rollover_log.setFormatter(logging.Formatter(format))
|
||||
rollover_log.addFilter(FilterCP3())
|
||||
sabnzbd.LOGHANDLER = rollover_log
|
||||
@@ -1352,6 +1349,10 @@ def main():
|
||||
|
||||
https_cert = sabnzbd.cfg.https_cert.get_path()
|
||||
https_key = sabnzbd.cfg.https_key.get_path()
|
||||
https_chain = sabnzbd.cfg.https_chain.get_path()
|
||||
if not (sabnzbd.cfg.https_chain() and os.path.exists(https_chain)):
|
||||
https_chain = None
|
||||
|
||||
if enable_https:
|
||||
# If either the HTTPS certificate or key do not exist, make some self-signed ones.
|
||||
if not (https_cert and os.path.exists(https_cert)) or not (https_key and os.path.exists(https_key)):
|
||||
@@ -1381,14 +1382,15 @@ def main():
|
||||
# Extra HTTP port for secondary localhost
|
||||
attach_server(hosts[1], cherryport)
|
||||
# Extra HTTPS port for secondary localhost
|
||||
attach_server(hosts[1], https_port, https_cert, https_key)
|
||||
attach_server(hosts[1], https_port, https_cert, https_key, https_chain)
|
||||
cherryport = https_port
|
||||
elif multilocal:
|
||||
# Extra HTTPS port for secondary localhost
|
||||
attach_server(hosts[1], cherryport, https_cert, https_key)
|
||||
|
||||
cherrypy.config.update({'server.ssl_certificate' : https_cert,
|
||||
'server.ssl_private_key' : https_key })
|
||||
'server.ssl_private_key' : https_key,
|
||||
'server.ssl_certificate_chain' : https_chain})
|
||||
elif multilocal:
|
||||
# Extra HTTP port for secondary localhost
|
||||
attach_server(hosts[1], cherryport)
|
||||
@@ -1406,6 +1408,17 @@ def main():
|
||||
else:
|
||||
sessions = None
|
||||
|
||||
mime_gzip = ('text/html',
|
||||
'text/plain',
|
||||
'text/css',
|
||||
'text/xml',
|
||||
'text/javascript',
|
||||
'application/javascript',
|
||||
'text/x-javascript',
|
||||
'application/x-javascript',
|
||||
'text/x-json',
|
||||
'application/json'
|
||||
)
|
||||
cherrypy.config.update({'server.environment': 'production',
|
||||
'server.socket_host': cherryhost,
|
||||
'server.socket_port': cherryport,
|
||||
@@ -1415,7 +1428,7 @@ def main():
|
||||
'engine.reexec_retry' : 100,
|
||||
'tools.encode.on' : True,
|
||||
'tools.gzip.on' : True,
|
||||
'tools.gzip.mime_types' : ['text/html', 'text/plain', 'text/javascript', 'text/css', 'application/x-javascript'],
|
||||
'tools.gzip.mime_types' : mime_gzip,
|
||||
'tools.sessions.on' : bool(sessions),
|
||||
'tools.sessions.storage_type' : 'file',
|
||||
'tools.sessions.storage_path' : sessions,
|
||||
@@ -1506,8 +1519,8 @@ def main():
|
||||
if sabnzbd.FOUNDATION:
|
||||
import sabnzbd.osxmenu
|
||||
sabnzbd.osxmenu.notify("SAB_Launched", None)
|
||||
growler.send_notification('SABnzbd %s' % (sabnzbd.__version__),
|
||||
"http://%s:%s/sabnzbd" % (browserhost, cherryport), 'startup')
|
||||
growler.send_notification('SABnzbd%s' % growler.hostname(),
|
||||
T('SABnzbd %s started') % sabnzbd.__version__, 'startup')
|
||||
# Now's the time to check for a new version
|
||||
check_latest_version()
|
||||
autorestarted = False
|
||||
@@ -1550,7 +1563,7 @@ def main():
|
||||
add_local(f)
|
||||
|
||||
# Have to keep this running, otherwise logging will terminate
|
||||
timer = 0
|
||||
timer = timer5 = 0
|
||||
while not sabnzbd.SABSTOP:
|
||||
if sabnzbd.WIN_SERVICE:
|
||||
rc = win32event.WaitForMultipleObjects((sabnzbd.WIN_SERVICE.hWaitStop,
|
||||
@@ -1576,7 +1589,7 @@ def main():
|
||||
### 30 sec polling tasks
|
||||
if timer > 9:
|
||||
timer = 0
|
||||
# Keep Windows awake (if needed)
|
||||
# Keep OS awake (if needed)
|
||||
sabnzbd.keep_awake()
|
||||
# Restart scheduler (if needed)
|
||||
scheduler.restart()
|
||||
@@ -1590,6 +1603,15 @@ def main():
|
||||
if sabnzbd.WIN_SERVICE and mail:
|
||||
mail.send('active')
|
||||
|
||||
if timer5 > 9:
|
||||
### 5 minute polling tasks
|
||||
timer5 = 0
|
||||
if sabnzbd.cfg.web_watchdog() and not is_sabnzbd_running('%s/api?tickleme=1' % sabnzbd.BROWSER_URL, 120):
|
||||
autorestarted = True
|
||||
cherrypy.engine.execv = True
|
||||
else:
|
||||
timer5 += 1
|
||||
|
||||
else:
|
||||
timer += 1
|
||||
|
||||
@@ -1815,4 +1837,4 @@ if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
else:
|
||||
main()
|
||||
main()
|
||||
|
||||
@@ -658,7 +658,10 @@ class Request(object):
|
||||
# Handle cookies differently because on Konqueror, multiple
|
||||
# cookies come on different lines with the same key
|
||||
if name == 'Cookie':
|
||||
self.cookie.load(value)
|
||||
try:
|
||||
self.cookie.load(value)
|
||||
except:
|
||||
pass
|
||||
|
||||
if not dict.__contains__(headers, 'Host'):
|
||||
# All Internet-based HTTP/1.1 servers MUST respond with a 400
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import cherrypy
|
||||
from cherrypy.lib import httpauth
|
||||
|
||||
@@ -9,10 +10,10 @@ def check_auth(users, encrypt=None, realm=None):
|
||||
ah = httpauth.parseAuthorization(cherrypy.request.headers['authorization'])
|
||||
if ah is None:
|
||||
raise cherrypy.HTTPError(400, 'Bad Request')
|
||||
|
||||
|
||||
if not encrypt:
|
||||
encrypt = httpauth.DIGEST_AUTH_ENCODERS[httpauth.MD5]
|
||||
|
||||
|
||||
if callable(users):
|
||||
try:
|
||||
# backward compatibility
|
||||
@@ -20,7 +21,7 @@ def check_auth(users, encrypt=None, realm=None):
|
||||
|
||||
if not isinstance(users, dict):
|
||||
raise ValueError, "Authentication users must be a dictionary"
|
||||
|
||||
|
||||
# fetch the user password
|
||||
password = users.get(ah["username"], None)
|
||||
except TypeError:
|
||||
@@ -29,23 +30,26 @@ def check_auth(users, encrypt=None, realm=None):
|
||||
else:
|
||||
if not isinstance(users, dict):
|
||||
raise ValueError, "Authentication users must be a dictionary"
|
||||
|
||||
|
||||
# fetch the user password
|
||||
password = users.get(ah["username"], None)
|
||||
|
||||
|
||||
# validate the authorization by re-computing it here
|
||||
# and compare it with what the user-agent provided
|
||||
if httpauth.checkResponse(ah, password, method=cherrypy.request.method,
|
||||
encrypt=encrypt, realm=realm):
|
||||
cherrypy.request.login = ah["username"]
|
||||
return True
|
||||
|
||||
|
||||
if ah.get('username') or ah.get('password'):
|
||||
logging.info('Attempt to login with wrong credentials from %s',
|
||||
cherrypy.request.headers['Remote-Addr'])
|
||||
cherrypy.request.login = False
|
||||
return False
|
||||
|
||||
def basic_auth(realm, users, encrypt=None):
|
||||
"""If auth fails, raise 401 with a basic authentication header.
|
||||
|
||||
|
||||
realm: a string containing the authentication realm.
|
||||
users: a dict of the form: {username: password} or a callable returning a dict.
|
||||
encrypt: callable used to encrypt the password returned from the user-agent.
|
||||
@@ -53,23 +57,23 @@ def basic_auth(realm, users, encrypt=None):
|
||||
"""
|
||||
if check_auth(users, encrypt):
|
||||
return
|
||||
|
||||
|
||||
# inform the user-agent this path is protected
|
||||
cherrypy.response.headers['www-authenticate'] = httpauth.basicAuth(realm)
|
||||
|
||||
raise cherrypy.HTTPError(401, "You are not authorized to access that resource")
|
||||
|
||||
raise cherrypy.HTTPError(401, "You are not authorized to access that resource")
|
||||
|
||||
def digest_auth(realm, users):
|
||||
"""If auth fails, raise 401 with a digest authentication header.
|
||||
|
||||
|
||||
realm: a string containing the authentication realm.
|
||||
users: a dict of the form: {username: password} or a callable returning a dict.
|
||||
"""
|
||||
if check_auth(users, realm=realm):
|
||||
return
|
||||
|
||||
|
||||
# inform the user-agent this path is protected
|
||||
cherrypy.response.headers['www-authenticate'] = httpauth.digestAuth(realm)
|
||||
|
||||
raise cherrypy.HTTPError(401, "You are not authorized to access that resource")
|
||||
|
||||
|
||||
raise cherrypy.HTTPError(401, "You are not authorized to access that resource")
|
||||
|
||||
|
||||
594
gntp/__init__.py
594
gntp/__init__.py
@@ -1,332 +1,402 @@
|
||||
import re
|
||||
import hashlib
|
||||
import time
|
||||
import platform
|
||||
import StringIO
|
||||
|
||||
__version__ = '0.8'
|
||||
|
||||
#GNTP/<version> <messagetype> <encryptionAlgorithmID>[:<ivValue>][ <keyHashAlgorithmID>:<keyHash>.<salt>]
|
||||
GNTP_INFO_LINE = re.compile(
|
||||
'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)' +
|
||||
' (?P<encryptionAlgorithmID>[A-Z0-9]+(:(?P<ivValue>[A-F0-9]+))?) ?' +
|
||||
'((?P<keyHashAlgorithmID>[A-Z0-9]+):(?P<keyHash>[A-F0-9]+).(?P<salt>[A-F0-9]+))?\r\n',
|
||||
re.IGNORECASE
|
||||
)
|
||||
|
||||
GNTP_INFO_LINE_SHORT = re.compile(
|
||||
'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)',
|
||||
re.IGNORECASE
|
||||
)
|
||||
|
||||
GNTP_HEADER = re.compile('([\w-]+):(.+)')
|
||||
|
||||
GNTP_EOL = '\r\n'
|
||||
|
||||
__version__ = '0.4'
|
||||
|
||||
class BaseError(Exception):
|
||||
pass
|
||||
def gntp_error(self):
|
||||
error = GNTPError(self.errorcode, self.errordesc)
|
||||
return error.encode()
|
||||
|
||||
|
||||
class ParseError(BaseError):
|
||||
def gntp_error(self):
|
||||
error = GNTPError(errorcode=500,errordesc='Error parsing the message')
|
||||
return error.encode()
|
||||
errorcode = 500
|
||||
errordesc = 'Error parsing the message'
|
||||
|
||||
|
||||
class AuthError(BaseError):
|
||||
def gntp_error(self):
|
||||
error = GNTPError(errorcode=400,errordesc='Error with authorization')
|
||||
return error.encode()
|
||||
errorcode = 400
|
||||
errordesc = 'Error with authorization'
|
||||
|
||||
|
||||
class UnsupportedError(BaseError):
|
||||
def gntp_error(self):
|
||||
error = GNTPError(errorcode=500,errordesc='Currently unsupported by gntp.py')
|
||||
return error.encode()
|
||||
errorcode = 500
|
||||
errordesc = 'Currently unsupported by gntp.py'
|
||||
|
||||
|
||||
class _GNTPBuffer(StringIO.StringIO):
|
||||
"""GNTP Buffer class"""
|
||||
def writefmt(self, message="", *args):
|
||||
"""Shortcut function for writing GNTP Headers"""
|
||||
self.write((message % args).encode('utf8', 'replace'))
|
||||
self.write(GNTP_EOL)
|
||||
|
||||
|
||||
class _GNTPBase(object):
|
||||
info = {
|
||||
'version':'1.0',
|
||||
'messagetype':None,
|
||||
'encryptionAlgorithmID':None
|
||||
}
|
||||
_requiredHeaders = []
|
||||
headers = {}
|
||||
resources = {}
|
||||
def add_origin_info(self):
|
||||
self.add_header('Origin-Machine-Name',platform.node())
|
||||
self.add_header('Origin-Software-Name','gntp.py')
|
||||
self.add_header('Origin-Software-Version',__version__)
|
||||
self.add_header('Origin-Platform-Name',platform.system())
|
||||
self.add_header('Origin-Platform-Version',platform.platform())
|
||||
"""Base initilization
|
||||
|
||||
:param string messagetype: GNTP Message type
|
||||
:param string version: GNTP Protocol version
|
||||
:param string encription: Encryption protocol
|
||||
"""
|
||||
def __init__(self, messagetype=None, version='1.0', encryption=None):
|
||||
self.info = {
|
||||
'version': version,
|
||||
'messagetype': messagetype,
|
||||
'encryptionAlgorithmID': encryption
|
||||
}
|
||||
self.headers = {}
|
||||
self.resources = {}
|
||||
|
||||
def __str__(self):
|
||||
return self.encode()
|
||||
def _parse_info(self,data):
|
||||
'''
|
||||
Parse the first line of a GNTP message to get security and other info values
|
||||
@param data: GNTP Message
|
||||
@return: GNTP Message information in a dictionary
|
||||
'''
|
||||
#GNTP/<version> <messagetype> <encryptionAlgorithmID>[:<ivValue>][ <keyHashAlgorithmID>:<keyHash>.<salt>]
|
||||
match = re.match('GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)'+
|
||||
' (?P<encryptionAlgorithmID>[A-Z0-9]+(:(?P<ivValue>[A-F0-9]+))?) ?'+
|
||||
'((?P<keyHashAlgorithmID>[A-Z0-9]+):(?P<keyHash>[A-F0-9]+).(?P<salt>[A-F0-9]+))?\r\n', data,re.IGNORECASE)
|
||||
|
||||
|
||||
def _parse_info(self, data):
|
||||
"""Parse the first line of a GNTP message to get security and other info values
|
||||
|
||||
:param string data: GNTP Message
|
||||
:return dict: Parsed GNTP Info line
|
||||
"""
|
||||
|
||||
match = GNTP_INFO_LINE.match(data)
|
||||
|
||||
if not match:
|
||||
raise ParseError('ERROR_PARSING_INFO_LINE')
|
||||
|
||||
|
||||
info = match.groupdict()
|
||||
if info['encryptionAlgorithmID'] == 'NONE':
|
||||
info['encryptionAlgorithmID'] = None
|
||||
|
||||
|
||||
return info
|
||||
def set_password(self,password,encryptAlgo='MD5'):
|
||||
'''
|
||||
Set a password for a GNTP Message
|
||||
@param password: Null to clear password
|
||||
@param encryptAlgo: Supports MD5,SHA1,SHA256,SHA512
|
||||
@todo: Support other hash functions
|
||||
'''
|
||||
|
||||
def set_password(self, password, encryptAlgo='MD5'):
|
||||
"""Set a password for a GNTP Message
|
||||
|
||||
:param string password: Null to clear password
|
||||
:param string encryptAlgo: Supports MD5, SHA1, SHA256, SHA512
|
||||
"""
|
||||
hash = {
|
||||
'MD5': hashlib.md5,
|
||||
'SHA1': hashlib.sha1,
|
||||
'SHA256': hashlib.sha256,
|
||||
'SHA512': hashlib.sha512,
|
||||
}
|
||||
|
||||
|
||||
self.password = password
|
||||
self.encryptAlgo = encryptAlgo.upper()
|
||||
if not password:
|
||||
self.info['encryptionAlgorithmID'] = None
|
||||
self.info['keyHashAlgorithm'] = None;
|
||||
self.info['keyHashAlgorithm'] = None
|
||||
return
|
||||
if not self.encryptAlgo in hash.keys():
|
||||
raise UnsupportedError('INVALID HASH "%s"'%self.encryptAlgo)
|
||||
|
||||
raise UnsupportedError('INVALID HASH "%s"' % self.encryptAlgo)
|
||||
|
||||
hashfunction = hash.get(self.encryptAlgo)
|
||||
|
||||
|
||||
password = password.encode('utf8')
|
||||
seed = time.ctime()
|
||||
salt = hashfunction(seed).hexdigest()
|
||||
saltHash = hashfunction(seed).digest()
|
||||
keyBasis = password+saltHash
|
||||
keyBasis = password + saltHash
|
||||
key = hashfunction(keyBasis).digest()
|
||||
keyHash = hashfunction(key).hexdigest()
|
||||
|
||||
|
||||
self.info['keyHashAlgorithmID'] = self.encryptAlgo
|
||||
self.info['keyHash'] = keyHash.upper()
|
||||
self.info['salt'] = salt.upper()
|
||||
def _decode_hex(self,value):
|
||||
'''
|
||||
Helper function to decode hex string to `proper` hex string
|
||||
@param value: Value to decode
|
||||
@return: Hex string
|
||||
'''
|
||||
|
||||
def _decode_hex(self, value):
|
||||
"""Helper function to decode hex string to `proper` hex string
|
||||
|
||||
:param string value: Human readable hex string
|
||||
:return string: Hex string
|
||||
"""
|
||||
result = ''
|
||||
for i in range(0,len(value),2):
|
||||
tmp = int(value[i:i+2],16)
|
||||
for i in range(0, len(value), 2):
|
||||
tmp = int(value[i:i + 2], 16)
|
||||
result += chr(tmp)
|
||||
return result
|
||||
def _decode_binary(self,rawIdentifier,identifier):
|
||||
|
||||
def _decode_binary(self, rawIdentifier, identifier):
|
||||
rawIdentifier += '\r\n\r\n'
|
||||
dataLength = int(identifier['Length'])
|
||||
pointerStart = self.raw.find(rawIdentifier)+len(rawIdentifier)
|
||||
pointerStart = self.raw.find(rawIdentifier) + len(rawIdentifier)
|
||||
pointerEnd = pointerStart + dataLength
|
||||
data = self.raw[pointerStart:pointerEnd]
|
||||
if not len(data) == dataLength:
|
||||
raise ParseError('INVALID_DATA_LENGTH Expected: %s Recieved %s'%(dataLength,len(data)))
|
||||
raise ParseError('INVALID_DATA_LENGTH Expected: %s Recieved %s' % (dataLength, len(data)))
|
||||
return data
|
||||
def _validate_password(self,password):
|
||||
'''
|
||||
Validate GNTP Message against stored password
|
||||
'''
|
||||
|
||||
def _validate_password(self, password):
|
||||
"""Validate GNTP Message against stored password"""
|
||||
self.password = password
|
||||
if password == None: raise Exception()
|
||||
keyHash = self.info.get('keyHash',None)
|
||||
if password == None:
|
||||
raise AuthError('Missing password')
|
||||
keyHash = self.info.get('keyHash', None)
|
||||
if keyHash is None and self.password is None:
|
||||
return True
|
||||
if keyHash is None:
|
||||
raise AuthError('Invalid keyHash')
|
||||
if self.password is None:
|
||||
raise AuthError('Missing password')
|
||||
|
||||
|
||||
password = self.password.encode('utf8')
|
||||
saltHash = self._decode_hex(self.info['salt'])
|
||||
|
||||
keyBasis = password+saltHash
|
||||
|
||||
keyBasis = password + saltHash
|
||||
key = hashlib.md5(keyBasis).digest()
|
||||
keyHash = hashlib.md5(key).hexdigest()
|
||||
|
||||
|
||||
if not keyHash.upper() == self.info['keyHash'].upper():
|
||||
raise AuthError('Invalid Hash')
|
||||
return True
|
||||
|
||||
def validate(self):
|
||||
'''
|
||||
Verify required headers
|
||||
'''
|
||||
"""Verify required headers"""
|
||||
for header in self._requiredHeaders:
|
||||
if not self.headers.get(header,False):
|
||||
raise ParseError('Missing Notification Header: '+header)
|
||||
|
||||
if not self.headers.get(header, False):
|
||||
raise ParseError('Missing Notification Header: ' + header)
|
||||
|
||||
def _format_info(self):
|
||||
'''
|
||||
Generate info line for GNTP Message
|
||||
@return: Info line string
|
||||
'''
|
||||
info = u'GNTP/%s %s'%(
|
||||
"""Generate info line for GNTP Message
|
||||
|
||||
:return string:
|
||||
"""
|
||||
info = u'GNTP/%s %s' % (
|
||||
self.info.get('version'),
|
||||
self.info.get('messagetype'),
|
||||
)
|
||||
if self.info.get('encryptionAlgorithmID',None):
|
||||
info += ' %s:%s'%(
|
||||
if self.info.get('encryptionAlgorithmID', None):
|
||||
info += ' %s:%s' % (
|
||||
self.info.get('encryptionAlgorithmID'),
|
||||
self.info.get('ivValue'),
|
||||
)
|
||||
else:
|
||||
info+=' NONE'
|
||||
|
||||
if self.info.get('keyHashAlgorithmID',None):
|
||||
info += ' %s:%s.%s'%(
|
||||
info += ' NONE'
|
||||
|
||||
if self.info.get('keyHashAlgorithmID', None):
|
||||
info += ' %s:%s.%s' % (
|
||||
self.info.get('keyHashAlgorithmID'),
|
||||
self.info.get('keyHash'),
|
||||
self.info.get('salt')
|
||||
)
|
||||
|
||||
return info
|
||||
def _parse_dict(self,data):
|
||||
'''
|
||||
Helper function to parse blocks of GNTP headers into a dictionary
|
||||
@param data:
|
||||
@return: Dictionary of headers
|
||||
'''
|
||||
)
|
||||
|
||||
return info
|
||||
|
||||
def _parse_dict(self, data):
|
||||
"""Helper function to parse blocks of GNTP headers into a dictionary
|
||||
|
||||
:param string data:
|
||||
:return dict:
|
||||
"""
|
||||
dict = {}
|
||||
for line in data.split('\r\n'):
|
||||
match = re.match('([\w-]+):(.+)', line)
|
||||
if not match: continue
|
||||
|
||||
key = match.group(1).strip()
|
||||
val = match.group(2).strip()
|
||||
match = GNTP_HEADER.match(line)
|
||||
if not match:
|
||||
continue
|
||||
|
||||
key = unicode(match.group(1).strip(), 'utf8', 'replace')
|
||||
val = unicode(match.group(2).strip(), 'utf8', 'replace')
|
||||
dict[key] = val
|
||||
return dict
|
||||
def add_header(self,key,value):
|
||||
|
||||
def add_header(self, key, value):
|
||||
if isinstance(value, unicode):
|
||||
self.headers[key] = value
|
||||
else:
|
||||
self.headers[key] = unicode('%s'%value,'utf8','replace')
|
||||
def decode(self,data,password=None):
|
||||
'''
|
||||
Decode GNTP Message
|
||||
@param data:
|
||||
'''
|
||||
self.headers[key] = unicode('%s' % value, 'utf8', 'replace')
|
||||
|
||||
def add_resource(self, data):
|
||||
"""Add binary resource
|
||||
|
||||
:param string data: Binary Data
|
||||
"""
|
||||
identifier = hashlib.md5(data).hexdigest()
|
||||
self.resources[identifier] = data
|
||||
return 'x-growl-resource://%s' % identifier
|
||||
|
||||
def decode(self, data, password=None):
|
||||
"""Decode GNTP Message
|
||||
|
||||
:param string data:
|
||||
"""
|
||||
self.password = password
|
||||
self.raw = data
|
||||
parts = self.raw.split('\r\n\r\n')
|
||||
self.info = self._parse_info(data)
|
||||
self.headers = self._parse_dict(parts[0])
|
||||
|
||||
def encode(self):
|
||||
'''
|
||||
Encode a GNTP Message
|
||||
@return: GNTP Message ready to be sent
|
||||
'''
|
||||
self.validate()
|
||||
EOL = u'\r\n'
|
||||
|
||||
message = self._format_info() + EOL
|
||||
"""Encode a generic GNTP Message
|
||||
|
||||
:return string: GNTP Message ready to be sent
|
||||
"""
|
||||
|
||||
buffer = _GNTPBuffer()
|
||||
|
||||
buffer.writefmt(self._format_info())
|
||||
|
||||
#Headers
|
||||
for k,v in self.headers.iteritems():
|
||||
message += u'%s: %s%s'%(k,v,EOL)
|
||||
|
||||
message += EOL
|
||||
return message
|
||||
for k, v in self.headers.iteritems():
|
||||
buffer.writefmt('%s: %s', k, v)
|
||||
buffer.writefmt()
|
||||
|
||||
#Resources
|
||||
for resource, data in self.resources.iteritems():
|
||||
buffer.writefmt('Identifier: %s', resource)
|
||||
buffer.writefmt('Length: %d', len(data))
|
||||
buffer.writefmt()
|
||||
buffer.write(data)
|
||||
buffer.writefmt()
|
||||
buffer.writefmt()
|
||||
|
||||
return buffer.getvalue()
|
||||
|
||||
|
||||
class GNTPRegister(_GNTPBase):
|
||||
"""Represents a GNTP Registration Command"""
|
||||
notifications = []
|
||||
"""Represents a GNTP Registration Command
|
||||
|
||||
:param string data: (Optional) See decode()
|
||||
:param string password: (Optional) Password to use while encoding/decoding messages
|
||||
"""
|
||||
_requiredHeaders = [
|
||||
'Application-Name',
|
||||
'Notifications-Count'
|
||||
]
|
||||
_requiredNotificationHeaders = ['Notification-Name']
|
||||
def __init__(self,data=None,password=None):
|
||||
'''
|
||||
@param data: (Optional) See decode()
|
||||
@param password: (Optional) Password to use while encoding/decoding messages
|
||||
'''
|
||||
self.info['messagetype'] = 'REGISTER'
|
||||
|
||||
|
||||
def __init__(self, data=None, password=None):
|
||||
_GNTPBase.__init__(self, 'REGISTER')
|
||||
self.notifications = []
|
||||
|
||||
if data:
|
||||
self.decode(data,password)
|
||||
self.decode(data, password)
|
||||
else:
|
||||
self.set_password(password)
|
||||
self.add_header('Application-Name', 'pygntp')
|
||||
self.add_header('Notifications-Count', 0)
|
||||
self.add_origin_info()
|
||||
|
||||
def validate(self):
|
||||
'''
|
||||
Validate required headers and validate notification headers
|
||||
'''
|
||||
'''Validate required headers and validate notification headers'''
|
||||
for header in self._requiredHeaders:
|
||||
if not self.headers.get(header,False):
|
||||
raise ParseError('Missing Registration Header: '+header)
|
||||
if not self.headers.get(header, False):
|
||||
raise ParseError('Missing Registration Header: ' + header)
|
||||
for notice in self.notifications:
|
||||
for header in self._requiredNotificationHeaders:
|
||||
if not notice.get(header,False):
|
||||
raise ParseError('Missing Notification Header: '+header)
|
||||
def decode(self,data,password):
|
||||
'''
|
||||
Decode existing GNTP Registration message
|
||||
@param data: Message to decode.
|
||||
'''
|
||||
if not notice.get(header, False):
|
||||
raise ParseError('Missing Notification Header: ' + header)
|
||||
|
||||
def decode(self, data, password):
|
||||
"""Decode existing GNTP Registration message
|
||||
|
||||
:param string data: Message to decode
|
||||
"""
|
||||
self.raw = data
|
||||
parts = self.raw.split('\r\n\r\n')
|
||||
self.info = self._parse_info(data)
|
||||
self._validate_password(password)
|
||||
self.headers = self._parse_dict(parts[0])
|
||||
|
||||
for i,part in enumerate(parts):
|
||||
if i==0: continue #Skip Header
|
||||
if part.strip()=='': continue
|
||||
|
||||
for i, part in enumerate(parts):
|
||||
if i == 0:
|
||||
continue # Skip Header
|
||||
if part.strip() == '':
|
||||
continue
|
||||
notice = self._parse_dict(part)
|
||||
if notice.get('Notification-Name',False):
|
||||
if notice.get('Notification-Name', False):
|
||||
self.notifications.append(notice)
|
||||
elif notice.get('Identifier',False):
|
||||
notice['Data'] = self._decode_binary(part,notice)
|
||||
elif notice.get('Identifier', False):
|
||||
notice['Data'] = self._decode_binary(part, notice)
|
||||
#open('register.png','wblol').write(notice['Data'])
|
||||
self.resources[ notice.get('Identifier') ] = notice
|
||||
|
||||
def add_notification(self,name,enabled=True):
|
||||
'''
|
||||
Add new Notification to Registration message
|
||||
@param name: Notification Name
|
||||
@param enabled: Default Notification to Enabled
|
||||
'''
|
||||
self.resources[notice.get('Identifier')] = notice
|
||||
|
||||
def add_notification(self, name, enabled=True):
|
||||
"""Add new Notification to Registration message
|
||||
|
||||
:param string name: Notification Name
|
||||
:param boolean enabled: Enable this notification by default
|
||||
"""
|
||||
notice = {}
|
||||
notice['Notification-Name'] = u'%s'%name
|
||||
notice['Notification-Enabled'] = u'%s'%enabled
|
||||
|
||||
notice['Notification-Name'] = u'%s' % name
|
||||
notice['Notification-Enabled'] = u'%s' % enabled
|
||||
|
||||
self.notifications.append(notice)
|
||||
self.add_header('Notifications-Count', len(self.notifications))
|
||||
|
||||
def encode(self):
|
||||
'''
|
||||
Encode a GNTP Registration Message
|
||||
@return: GNTP Registration Message ready to be sent
|
||||
'''
|
||||
self.validate()
|
||||
EOL = u'\r\n'
|
||||
|
||||
message = self._format_info() + EOL
|
||||
"""Encode a GNTP Registration Message
|
||||
|
||||
:return string: Encoded GNTP Registration message
|
||||
"""
|
||||
|
||||
buffer = _GNTPBuffer()
|
||||
|
||||
buffer.writefmt(self._format_info())
|
||||
|
||||
#Headers
|
||||
for k,v in self.headers.iteritems():
|
||||
message += u'%s: %s%s'%(k,v,EOL)
|
||||
|
||||
for k, v in self.headers.iteritems():
|
||||
buffer.writefmt('%s: %s', k, v)
|
||||
buffer.writefmt()
|
||||
|
||||
#Notifications
|
||||
if len(self.notifications)>0:
|
||||
if len(self.notifications) > 0:
|
||||
for notice in self.notifications:
|
||||
message += EOL
|
||||
for k,v in notice.iteritems():
|
||||
message += u'%s: %s%s'%(k,v,EOL)
|
||||
|
||||
message += EOL
|
||||
return message
|
||||
for k, v in notice.iteritems():
|
||||
buffer.writefmt('%s: %s', k, v)
|
||||
buffer.writefmt()
|
||||
|
||||
#Resources
|
||||
for resource, data in self.resources.iteritems():
|
||||
buffer.writefmt('Identifier: %s', resource)
|
||||
buffer.writefmt('Length: %d', len(data))
|
||||
buffer.writefmt()
|
||||
buffer.write(data)
|
||||
buffer.writefmt()
|
||||
buffer.writefmt()
|
||||
|
||||
return buffer.getvalue()
|
||||
|
||||
|
||||
class GNTPNotice(_GNTPBase):
|
||||
"""Represents a GNTP Notification Command"""
|
||||
"""Represents a GNTP Notification Command
|
||||
|
||||
:param string data: (Optional) See decode()
|
||||
:param string app: (Optional) Set Application-Name
|
||||
:param string name: (Optional) Set Notification-Name
|
||||
:param string title: (Optional) Set Notification Title
|
||||
:param string password: (Optional) Password to use while encoding/decoding messages
|
||||
"""
|
||||
_requiredHeaders = [
|
||||
'Application-Name',
|
||||
'Notification-Name',
|
||||
'Notification-Title'
|
||||
]
|
||||
def __init__(self,data=None,app=None,name=None,title=None,password=None):
|
||||
'''
|
||||
|
||||
@param data: (Optional) See decode()
|
||||
@param app: (Optional) Set Application-Name
|
||||
@param name: (Optional) Set Notification-Name
|
||||
@param title: (Optional) Set Notification Title
|
||||
@param password: (Optional) Password to use while encoding/decoding messages
|
||||
'''
|
||||
self.info['messagetype'] = 'NOTIFY'
|
||||
|
||||
|
||||
def __init__(self, data=None, app=None, name=None, title=None, password=None):
|
||||
_GNTPBase.__init__(self, 'NOTIFY')
|
||||
|
||||
if data:
|
||||
self.decode(data,password)
|
||||
self.decode(data, password)
|
||||
else:
|
||||
self.set_password(password)
|
||||
if app:
|
||||
@@ -335,105 +405,103 @@ class GNTPNotice(_GNTPBase):
|
||||
self.add_header('Notification-Name', name)
|
||||
if title:
|
||||
self.add_header('Notification-Title', title)
|
||||
self.add_origin_info()
|
||||
def decode(self,data,password):
|
||||
'''
|
||||
Decode existing GNTP Notification message
|
||||
@param data: Message to decode.
|
||||
'''
|
||||
|
||||
def decode(self, data, password):
|
||||
"""Decode existing GNTP Notification message
|
||||
|
||||
:param string data: Message to decode.
|
||||
"""
|
||||
self.raw = data
|
||||
parts = self.raw.split('\r\n\r\n')
|
||||
self.info = self._parse_info(data)
|
||||
self._validate_password(password)
|
||||
self.headers = self._parse_dict(parts[0])
|
||||
|
||||
for i,part in enumerate(parts):
|
||||
if i==0: continue #Skip Header
|
||||
if part.strip()=='': continue
|
||||
|
||||
for i, part in enumerate(parts):
|
||||
if i == 0:
|
||||
continue # Skip Header
|
||||
if part.strip() == '':
|
||||
continue
|
||||
notice = self._parse_dict(part)
|
||||
if notice.get('Identifier',False):
|
||||
notice['Data'] = self._decode_binary(part,notice)
|
||||
if notice.get('Identifier', False):
|
||||
notice['Data'] = self._decode_binary(part, notice)
|
||||
#open('notice.png','wblol').write(notice['Data'])
|
||||
self.resources[ notice.get('Identifier') ] = notice
|
||||
def encode(self):
|
||||
'''
|
||||
Encode a GNTP Notification Message
|
||||
@return: GNTP Notification Message ready to be sent
|
||||
'''
|
||||
self.validate()
|
||||
EOL = u'\r\n'
|
||||
|
||||
message = self._format_info() + EOL
|
||||
#Headers
|
||||
for k,v in self.headers.iteritems():
|
||||
message += u'%s: %s%s'%(k,v,EOL)
|
||||
|
||||
message += EOL
|
||||
return message
|
||||
self.resources[notice.get('Identifier')] = notice
|
||||
|
||||
|
||||
class GNTPSubscribe(_GNTPBase):
|
||||
"""Represents a GNTP Subscribe Command"""
|
||||
def __init__(self,data=None,password=None):
|
||||
self.info['messagetype'] = 'SUBSCRIBE'
|
||||
self._requiredHeaders = [
|
||||
'Subscriber-ID',
|
||||
'Subscriber-Name',
|
||||
]
|
||||
"""Represents a GNTP Subscribe Command
|
||||
|
||||
:param string data: (Optional) See decode()
|
||||
:param string password: (Optional) Password to use while encoding/decoding messages
|
||||
"""
|
||||
_requiredHeaders = [
|
||||
'Subscriber-ID',
|
||||
'Subscriber-Name',
|
||||
]
|
||||
|
||||
def __init__(self, data=None, password=None):
|
||||
_GNTPBase.__init__(self, 'SUBSCRIBE')
|
||||
if data:
|
||||
self.decode(data,password)
|
||||
self.decode(data, password)
|
||||
else:
|
||||
self.set_password(password)
|
||||
self.add_origin_info()
|
||||
|
||||
|
||||
class GNTPOK(_GNTPBase):
|
||||
"""Represents a GNTP OK Response"""
|
||||
"""Represents a GNTP OK Response
|
||||
|
||||
:param string data: (Optional) See _GNTPResponse.decode()
|
||||
:param string action: (Optional) Set type of action the OK Response is for
|
||||
"""
|
||||
_requiredHeaders = ['Response-Action']
|
||||
def __init__(self,data=None,action=None):
|
||||
'''
|
||||
@param data: (Optional) See _GNTPResponse.decode()
|
||||
@param action: (Optional) Set type of action the OK Response is for
|
||||
'''
|
||||
self.info['messagetype'] = '-OK'
|
||||
|
||||
def __init__(self, data=None, action=None):
|
||||
_GNTPBase.__init__(self, '-OK')
|
||||
if data:
|
||||
self.decode(data)
|
||||
if action:
|
||||
self.add_header('Response-Action', action)
|
||||
self.add_origin_info()
|
||||
|
||||
|
||||
class GNTPError(_GNTPBase):
|
||||
_requiredHeaders = ['Error-Code','Error-Description']
|
||||
def __init__(self,data=None,errorcode=None,errordesc=None):
|
||||
'''
|
||||
@param data: (Optional) See _GNTPResponse.decode()
|
||||
@param errorcode: (Optional) Error code
|
||||
@param errordesc: (Optional) Error Description
|
||||
'''
|
||||
self.info['messagetype'] = '-ERROR'
|
||||
"""Represents a GNTP Error response
|
||||
|
||||
:param string data: (Optional) See _GNTPResponse.decode()
|
||||
:param string errorcode: (Optional) Error code
|
||||
:param string errordesc: (Optional) Error Description
|
||||
"""
|
||||
_requiredHeaders = ['Error-Code', 'Error-Description']
|
||||
|
||||
def __init__(self, data=None, errorcode=None, errordesc=None):
|
||||
_GNTPBase.__init__(self, '-ERROR')
|
||||
if data:
|
||||
self.decode(data)
|
||||
if errorcode:
|
||||
self.add_header('Error-Code', errorcode)
|
||||
self.add_header('Error-Description', errordesc)
|
||||
self.add_origin_info()
|
||||
def error(self):
|
||||
return self.headers['Error-Code'],self.headers['Error-Description']
|
||||
|
||||
def parse_gntp(data,password=None):
|
||||
'''
|
||||
Attempt to parse a message as a GNTP message
|
||||
@param data: Message to be parsed
|
||||
@param password: Optional password to be used to verify the message
|
||||
'''
|
||||
match = re.match('GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)',data,re.IGNORECASE)
|
||||
def error(self):
|
||||
return (self.headers.get('Error-Code', None),
|
||||
self.headers.get('Error-Description', None))
|
||||
|
||||
|
||||
def parse_gntp(data, password=None):
|
||||
"""Attempt to parse a message as a GNTP message
|
||||
|
||||
:param string data: Message to be parsed
|
||||
:param string password: Optional password to be used to verify the message
|
||||
"""
|
||||
match = GNTP_INFO_LINE_SHORT.match(data)
|
||||
if not match:
|
||||
raise ParseError('INVALID_GNTP_INFO')
|
||||
info = match.groupdict()
|
||||
if info['messagetype'] == 'REGISTER':
|
||||
return GNTPRegister(data,password=password)
|
||||
return GNTPRegister(data, password=password)
|
||||
elif info['messagetype'] == 'NOTIFY':
|
||||
return GNTPNotice(data,password=password)
|
||||
return GNTPNotice(data, password=password)
|
||||
elif info['messagetype'] == 'SUBSCRIBE':
|
||||
return GNTPSubscribe(data,password=password)
|
||||
return GNTPSubscribe(data, password=password)
|
||||
elif info['messagetype'] == '-OK':
|
||||
return GNTPOK(data)
|
||||
elif info['messagetype'] == '-ERROR':
|
||||
|
||||
217
gntp/notifier.py
217
gntp/notifier.py
@@ -12,10 +12,55 @@ using GNTP
|
||||
import gntp
|
||||
import socket
|
||||
import logging
|
||||
import platform
|
||||
|
||||
__all__ = [
|
||||
'mini',
|
||||
'GrowlNotifier',
|
||||
]
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def mini(description, applicationName='PythonMini', noteType="Message",
|
||||
title="Mini Message", applicationIcon=None, hostname='localhost',
|
||||
password=None, port=23053, sticky=False, priority=None,
|
||||
callback=None, notificationIcon=None, identifier=None):
|
||||
"""Single notification function
|
||||
|
||||
Simple notification function in one line. Has only one required parameter
|
||||
and attempts to use reasonable defaults for everything else
|
||||
:param string description: Notification message
|
||||
|
||||
.. warning::
|
||||
For now, only URL callbacks are supported. In the future, the
|
||||
callback argument will also support a function
|
||||
"""
|
||||
growl = GrowlNotifier(
|
||||
applicationName=applicationName,
|
||||
notifications=[noteType],
|
||||
defaultNotifications=[noteType],
|
||||
applicationIcon=applicationIcon,
|
||||
hostname=hostname,
|
||||
password=password,
|
||||
port=port,
|
||||
)
|
||||
result = growl.register()
|
||||
if result is not True:
|
||||
return result
|
||||
|
||||
return growl.notify(
|
||||
noteType=noteType,
|
||||
title=title,
|
||||
description=description,
|
||||
icon=notificationIcon,
|
||||
sticky=sticky,
|
||||
priority=priority,
|
||||
callback=callback,
|
||||
identifier=identifier,
|
||||
)
|
||||
|
||||
|
||||
class GrowlNotifier(object):
|
||||
"""Helper class to simplfy sending Growl messages
|
||||
|
||||
@@ -27,55 +72,35 @@ class GrowlNotifier(object):
|
||||
:param string hostname: Remote host
|
||||
:param integer port: Remote port
|
||||
"""
|
||||
applicationName = 'Python GNTP'
|
||||
notifications = []
|
||||
defaultNotifications = []
|
||||
applicationIcon = None
|
||||
|
||||
passwordHash = 'MD5'
|
||||
socketTimeout = 3
|
||||
|
||||
#GNTP Specific
|
||||
password = None
|
||||
hostname = 'localhost'
|
||||
port = 23053
|
||||
def __init__(self, applicationName='Python GNTP', notifications=[],
|
||||
defaultNotifications=None, applicationIcon=None, hostname='localhost',
|
||||
password=None, port=23053):
|
||||
|
||||
def __init__(self, applicationName=None, notifications=None, defaultNotifications=None, applicationIcon=None, hostname=None, password=None, port=None):
|
||||
if applicationName:
|
||||
self.applicationName = applicationName
|
||||
assert self.applicationName, 'An application name is required.'
|
||||
|
||||
if notifications:
|
||||
self.notifications = list(notifications)
|
||||
assert self.notifications, 'A sequence of one or more notification names is required.'
|
||||
|
||||
if defaultNotifications is not None:
|
||||
self.applicationName = applicationName
|
||||
self.notifications = list(notifications)
|
||||
if defaultNotifications:
|
||||
self.defaultNotifications = list(defaultNotifications)
|
||||
elif not self.defaultNotifications:
|
||||
self.defaultNotifications = list(self.notifications)
|
||||
else:
|
||||
self.defaultNotifications = self.notifications
|
||||
self.applicationIcon = applicationIcon
|
||||
|
||||
if applicationIcon is not None:
|
||||
self.applicationIcon = self._checkIcon(applicationIcon)
|
||||
elif self.applicationIcon is not None:
|
||||
self.applicationIcon = self._checkIcon(self.applicationIcon)
|
||||
|
||||
#GNTP Specific
|
||||
if password:
|
||||
self.password = password
|
||||
|
||||
if hostname:
|
||||
self.hostname = hostname
|
||||
assert self.hostname, 'Requires valid hostname'
|
||||
|
||||
if port:
|
||||
self.port = int(port)
|
||||
assert isinstance(self.port, int), 'Requires valid port'
|
||||
self.password = password
|
||||
self.hostname = hostname
|
||||
self.port = int(port)
|
||||
|
||||
def _checkIcon(self, data):
|
||||
'''
|
||||
Check the icon to see if it's valid
|
||||
@param data:
|
||||
@todo Consider checking for a valid URL
|
||||
|
||||
If it's a simple URL icon, then we return True. If it's a data icon
|
||||
then we return False
|
||||
'''
|
||||
return data
|
||||
logger.debug('Checking icon')
|
||||
return data.startswith('http')
|
||||
|
||||
def register(self):
|
||||
"""Send GNTP Registration
|
||||
@@ -84,23 +109,26 @@ class GrowlNotifier(object):
|
||||
Before sending notifications to Growl, you need to have
|
||||
sent a registration message at least once
|
||||
"""
|
||||
logger.info('Sending registration to %s:%s', self.hostname, self.port)
|
||||
logger.debug('Sending registration to %s:%s', self.hostname, self.port)
|
||||
register = gntp.GNTPRegister()
|
||||
register.add_header('Application-Name', self.applicationName)
|
||||
for notification in self.notifications:
|
||||
enabled = notification in self.defaultNotifications
|
||||
register.add_notification(notification, enabled)
|
||||
if self.applicationIcon:
|
||||
register.add_header('Application-Icon', self.applicationIcon)
|
||||
if self._checkIcon(self.applicationIcon):
|
||||
register.add_header('Application-Icon', self.applicationIcon)
|
||||
else:
|
||||
id = register.add_resource(self.applicationIcon)
|
||||
register.add_header('Application-Icon', id)
|
||||
if self.password:
|
||||
register.set_password(self.password, self.passwordHash)
|
||||
response = self._send('register', register.encode())
|
||||
if isinstance(response, gntp.GNTPOK):
|
||||
return True
|
||||
logger.error('Invalid response %s', response.error())
|
||||
return response.error()
|
||||
self.add_origin_info(register)
|
||||
self.register_hook(register)
|
||||
return self._send('register', register)
|
||||
|
||||
def notify(self, noteType, title, description, icon=None, sticky=False, priority=None):
|
||||
def notify(self, noteType, title, description, icon=None, sticky=False,
|
||||
priority=None, callback=None, identifier=None):
|
||||
"""Send a GNTP notifications
|
||||
|
||||
.. warning::
|
||||
@@ -112,8 +140,13 @@ class GrowlNotifier(object):
|
||||
:param string icon: Icon URL path
|
||||
:param boolean sticky: Sticky notification
|
||||
:param integer priority: Message priority level from -2 to 2
|
||||
:param string callback: URL callback
|
||||
|
||||
.. warning::
|
||||
For now, only URL callbacks are supported. In the future, the
|
||||
callback argument will also support a function
|
||||
"""
|
||||
logger.info('Sending notification [%s] to %s:%s', noteType, self.hostname, self.port)
|
||||
logger.debug('Sending notification [%s] to %s:%s', noteType, self.hostname, self.port)
|
||||
assert noteType in self.notifications
|
||||
notice = gntp.GNTPNotice()
|
||||
notice.add_header('Application-Name', self.applicationName)
|
||||
@@ -126,14 +159,23 @@ class GrowlNotifier(object):
|
||||
if priority:
|
||||
notice.add_header('Notification-Priority', priority)
|
||||
if icon:
|
||||
notice.add_header('Notification-Icon', self._checkIcon(icon))
|
||||
if self._checkIcon(icon):
|
||||
notice.add_header('Notification-Icon', icon)
|
||||
else:
|
||||
id = notice.add_resource(icon)
|
||||
notice.add_header('Notification-Icon', id)
|
||||
|
||||
if description:
|
||||
notice.add_header('Notification-Text', description)
|
||||
response = self._send('notify', notice.encode())
|
||||
if isinstance(response, gntp.GNTPOK):
|
||||
return True
|
||||
logger.error('Invalid response %s', response.error())
|
||||
return response.error()
|
||||
if callback:
|
||||
notice.add_header('Notification-Callback-Target', callback)
|
||||
if identifier:
|
||||
notice.add_header('Notification-Coalescing-ID', identifier)
|
||||
|
||||
self.add_origin_info(notice)
|
||||
self.notify_hook(notice)
|
||||
|
||||
return self._send('notify', notice)
|
||||
|
||||
def subscribe(self, id, name, port):
|
||||
"""Send a Subscribe request to a remote machine"""
|
||||
@@ -143,30 +185,63 @@ class GrowlNotifier(object):
|
||||
sub.add_header('Subscriber-Port', port)
|
||||
if self.password:
|
||||
sub.set_password(self.password, self.passwordHash)
|
||||
response = self._send('subscribe', sub.encode())
|
||||
if isinstance(response, gntp.GNTPOK):
|
||||
return True
|
||||
logger.error('Invalid response %s', response.error())
|
||||
return response.error()
|
||||
|
||||
def _send(self, type, data):
|
||||
self.add_origin_info(sub)
|
||||
self.subscribe_hook(sub)
|
||||
|
||||
return self._send('subscribe', sub)
|
||||
|
||||
def add_origin_info(self, packet):
|
||||
"""Add optional Origin headers to message"""
|
||||
packet.add_header('Origin-Machine-Name', platform.node())
|
||||
packet.add_header('Origin-Software-Name', 'gntp.py')
|
||||
packet.add_header('Origin-Software-Version', gntp.__version__)
|
||||
packet.add_header('Origin-Platform-Name', platform.system())
|
||||
packet.add_header('Origin-Platform-Version', platform.platform())
|
||||
|
||||
def register_hook(self, packet):
|
||||
pass
|
||||
|
||||
def notify_hook(self, packet):
|
||||
pass
|
||||
|
||||
def subscribe_hook(self, packet):
|
||||
pass
|
||||
|
||||
def _send(self, messagetype, packet):
|
||||
"""Send the GNTP Packet"""
|
||||
#logger.debug('To : %s:%s <%s>\n%s', self.hostname, self.port, type, data)
|
||||
#Less verbose please
|
||||
logger.debug('To : %s:%s <%s>', self.hostname, self.port, type)
|
||||
|
||||
packet.validate()
|
||||
data = packet.encode()
|
||||
|
||||
#logger.debug('To : %s:%s <%s>\n%s', self.hostname, self.port, packet.__class__, data)
|
||||
#Less verbose
|
||||
logger.debug('To : %s:%s <%s>', self.hostname, self.port, packet.__class__)
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.settimeout(self.socketTimeout)
|
||||
s.connect((self.hostname, self.port))
|
||||
s.send(data.encode('utf8', 'replace'))
|
||||
try:
|
||||
s.settimeout(10)
|
||||
except:
|
||||
pass
|
||||
response = gntp.parse_gntp(s.recv(1024))
|
||||
s.send(data)
|
||||
recv_data = s.recv(1024)
|
||||
while not recv_data.endswith("\r\n\r\n"):
|
||||
recv_data += s.recv(1024)
|
||||
response = gntp.parse_gntp(recv_data)
|
||||
s.close()
|
||||
|
||||
#logger.debug('From : %s:%s <%s>\n%s', self.hostname, self.port, response.__class__, response)
|
||||
#Less verbose please
|
||||
#Less verbose
|
||||
logger.debug('From : %s:%s <%s>', self.hostname, self.port, response.__class__)
|
||||
|
||||
return response
|
||||
if type(response) == gntp.GNTPOK:
|
||||
return True
|
||||
if response.error()[0] == '404' and 'disabled' in response.error()[1]:
|
||||
# Ignore message saying that user has disabled this class
|
||||
return True
|
||||
logger.error('Invalid response: %s', response.error())
|
||||
return response.error()
|
||||
|
||||
if __name__ == '__main__':
|
||||
# If we're running this module directly we're likely running it as a test
|
||||
# so extra debugging is useful
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
mini('Testing mini notification')
|
||||
|
||||
@@ -6,59 +6,6 @@
|
||||
<!--#set global $submenu="newzbin"#-->
|
||||
<!--#include $webdir + "/inc_cmenu.tmpl"#-->
|
||||
|
||||
<h2>Newzbin</h2>
|
||||
$T('explain-newzbin')<br/><br/>
|
||||
<form action="saveNewzbin" method="post" autocomplete="off">
|
||||
<div class="EntryBlock">
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('accountInfo')</legend>
|
||||
<strong>$T('opt-username_newzbin'):</strong><br>
|
||||
$T('explain-username_newzbin')<br>
|
||||
<input type="text" name="username_newzbin" value="$username_newzbin">
|
||||
<br>
|
||||
<br>
|
||||
<strong>$T('opt-password_newzbin'):</strong><br>
|
||||
$T('explain-password_newzbin')<br>
|
||||
<input type="password" name="password_newzbin" value="$password_newzbin">
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="EntryBlock">
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('newzbinBookmarks')</legend>
|
||||
<label><input type="checkbox" name="newzbin_bookmarks" value="1" <!--#if $newzbin_bookmarks > 0 then "checked=1" else ""#--> <strong>$T('opt-newzbin_bookmarks'):</strong></label><br>
|
||||
$T('explain-newzbin_bookmarks')<br>
|
||||
<a href="getBookmarks?session=$session">$T('link-getBookmarks')</a>
|
||||
<br>
|
||||
<!--#if $bookmarks_list#-->
|
||||
<a href="hideBookmarks?session=$session">$T('link-HideBM')</a>
|
||||
<!--#else#-->
|
||||
<a href="showBookmarks?session=$session">$T('link-ShowBM')</a>
|
||||
<!--#end if#-->
|
||||
<br/>
|
||||
<br/>
|
||||
<label><input type="checkbox" name="newzbin_unbookmark" value="1" <!--#if $newzbin_unbookmark > 0 then "checked=1" else ""#--> /> <strong>$T('opt-newzbin_unbookmark'):</strong></label><br>
|
||||
$T('explain-newzbin_unbookmark')<br>
|
||||
<br/>
|
||||
<strong>$T('opt-bookmark_rate'):</strong><br>
|
||||
$T('explain-bookmark_rate')<br>
|
||||
<input type="text" name="bookmark_rate" value="$bookmark_rate">
|
||||
</fieldset>
|
||||
</div>
|
||||
<!--#if $bookmarks_list#-->
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('processedBM')</legend>
|
||||
<!--#for $msgid in $bookmarks_list#-->
|
||||
<a href="https://$newzbin_url/browse/post/$msgid/" target="_blank">$msgid</a>
|
||||
<!--#end for#-->
|
||||
</fieldset>
|
||||
<!--#end if#-->
|
||||
<input type="hidden" name="session" value="$session">
|
||||
<p><input type="submit" value="$T('button-saveChanges')"></p>
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>NzbMatrix</h2>
|
||||
$T('explain-nzbmatrix')<br/><br/>
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>$T('rss-order')</th>
|
||||
<th>$T('rss-type')</th>
|
||||
<th>$T('rss-filter')</th>
|
||||
@@ -86,6 +87,7 @@
|
||||
<form action="upd_rss_filter" method="get">
|
||||
<tr class="odd">
|
||||
<td></td>
|
||||
<td><input type="checkbox" name="enabled" value="1" checked="checked" /></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<select name="filter_type">
|
||||
@@ -152,6 +154,10 @@
|
||||
</td>
|
||||
|
||||
<form action="upd_rss_filter" method="get">
|
||||
<td>
|
||||
<input type="checkbox" name="enabled" value="1" <!--#if $filter[6] == '1' then 'checked="checked"' else ""#--> />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="text" size="3" name="new_index" value=$fnum>
|
||||
</td>
|
||||
|
||||
@@ -31,16 +31,14 @@ $T('hour'):<br>
|
||||
<!--#end for#-->
|
||||
</select>
|
||||
<br>$T('sch-frequency'): <br>
|
||||
<select name="dayofweek">
|
||||
<option value="*" selected>$T('daily')
|
||||
<option value="1">$T('monday')
|
||||
<option value="2">$T('tuesday')
|
||||
<option value="3">$T('wednesday')
|
||||
<option value="4">$T('thursday')
|
||||
<option value="5">$T('friday')
|
||||
<option value="6">$T('saturday')
|
||||
<option value="7">$T('sunday')
|
||||
</select>
|
||||
<input type="checkbox" name="daysofweek" value="1">$T('monday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="2">$T('tuesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="3">$T('wednesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="4">$T('thursday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="5">$T('friday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="6">$T('saturday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="7">$T('sunday')<br/>
|
||||
|
||||
<br>$T('sch-action'):<br>
|
||||
<select name="action">
|
||||
<!--#for $action in $actions#-->
|
||||
|
||||
@@ -47,11 +47,13 @@
|
||||
<a href="$cpath/notify/">$T('cmenu-notif')</a> |
|
||||
<!--#end if#-->
|
||||
|
||||
<!--#if 0#-->
|
||||
<!--#if $submenu=="indexers"#-->
|
||||
<a class="current" href="./">$T('cmenu-newzbin')</a> |
|
||||
<!--#else#-->
|
||||
<a href="$cpath/indexers/">$T('cmenu-newzbin')</a> |
|
||||
<!--#end if#-->
|
||||
<!--#end if#-->
|
||||
|
||||
<!--#if $submenu=="categories"#-->
|
||||
<a class="current" href="./">$T('cmenu-cat')</a> |
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>$mbleft MB $T('queued') - SABnzbd $version</title>
|
||||
<link rel="stylesheet" type="text/css" href="$statpath/static/stylesheets/default.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="$statpath/static/stylesheets/defaultcolors.css"/>
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
<div class="EntryBlock">
|
||||
<form action="addID" method="get">
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('add')
|
||||
<!--#if $varExists('newzbinDetails')#--> $T('reportId') / <!--#end if#-->URL</legend>
|
||||
<legend>$T('add') URL</legend>
|
||||
<input type="text" name="id">
|
||||
<!--#if $cat_list#-->
|
||||
<select name="cat" >
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
|
||||
\$(document).ready(function () {
|
||||
|
||||
\$('.col2 H3').click(function () { \$(this).parent().next().toggle() });
|
||||
#if $pane != "Servers"#
|
||||
\$('.col2 H3').click(function () { \$(this).parent().next().toggle() });
|
||||
#end if#
|
||||
|
||||
\$('.sabnzbd_restart').click(function () {
|
||||
\$('.sabnzbd_restart').each(function () {
|
||||
@@ -97,7 +99,7 @@
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -126,9 +128,11 @@
|
||||
<a href="${root}config/notify/">
|
||||
<div #if $pane == "Email" then 'class="active"' else ""#>$T('cmenu-notif')</div>
|
||||
</a>
|
||||
<!--#if 0#-->
|
||||
<a href="${root}config/indexers/">
|
||||
<div #if $pane == "Index Sites" then 'class="active"' else ""#>$T('cmenu-newzbin')</div>
|
||||
</a>
|
||||
<!--#end if#-->
|
||||
<a href="${root}config/categories/">
|
||||
<div #if $pane == "Categories" then 'class="active"' else ""#>$T('cmenu-cat')</div>
|
||||
</a>
|
||||
|
||||
@@ -21,9 +21,14 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="padding alt">
|
||||
<h5 class="copyright">Copyright © 2008-2012 The SABnzbd Team <<span style="color: #0000ff;">team@sabnzbd.org</span>></h5>
|
||||
<h5 class="copyright">Copyright © 2008-2013 The SABnzbd Team <<span style="color: #0000ff;">team@sabnzbd.org</span>></h5>
|
||||
<p class="copyright"><small>$T('yourRights')</small></p>
|
||||
</div>
|
||||
<!--#if $news_items#-->
|
||||
<div class="padding">
|
||||
<iframe frameborder=0 width=100% src="http://sabnzbdplus.sourceforge.net/version/news.html"></iframe>
|
||||
</div>
|
||||
<!--#end if#-->
|
||||
</div>
|
||||
|
||||
<!--#include $webdir + "/_inc_footer_uc.tmpl"#-->
|
||||
|
||||
@@ -127,6 +127,11 @@
|
||||
<input type="text" name="https_key" id="https_key" value="$https_key" size="50" />
|
||||
<span class="desc">$T('explain-https_key')</span>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="https_chain">$T('opt-https_chain')</label>
|
||||
<input type="text" name="https_chain" id="https_chain" value="$https_chain" size="50" />
|
||||
<span class="desc">$T('explain-https_chain')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<input type="submit" value="$T('button-saveChanges')" class="saveButton" />
|
||||
<input type="button" value="$T('button-restart') SABnzbd" class="sabnzbd_restart" />
|
||||
@@ -152,7 +157,7 @@
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="cleanup_list">$T('opt-cleanup_list')</label>
|
||||
<input type="text" name="cleanup_list" id="cleanup_list" value="$cleanup_list" size="50" placeholder=".nfo, .sfv" />
|
||||
<input type="text" name="cleanup_list" id="cleanup_list" value="$cleanup_list" size="50"/>
|
||||
<span class="desc">$T('explain-cleanup_list')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
|
||||
@@ -33,84 +33,6 @@
|
||||
</fieldset>
|
||||
</div><!-- /col1 -->
|
||||
</div><!-- /section -->
|
||||
<div class="section">
|
||||
<div class="col2">
|
||||
<h3>Newzbin $T('accountInfo')</h3>
|
||||
<p>$T('explain-newzbin')</p>
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="username_newzbin">$T('opt-username_newzbin')</label>
|
||||
<input type="text" name="username_newzbin" id="username_newzbin" value="$username_newzbin" size="30" />
|
||||
<span class="desc">$T('explain-username_newzbin')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="password_newzbin">$T('opt-password_newzbin')</label>
|
||||
<input type="password" name="password_newzbin" id="password_newzbin" value="$password_newzbin" size="30" />
|
||||
<span class="desc">$T('explain-password_newzbin')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<input type="submit" value="$T('button-saveChanges')" class="saveButton" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /col1 -->
|
||||
</div><!-- /section -->
|
||||
<div class="section">
|
||||
<div class="col2">
|
||||
<h3>Newzbin $T('newzbinBookmarks')</h3>
|
||||
<p>
|
||||
<input type="button" id="getBookmarks" value="$T('link-getBookmarks')" />
|
||||
<span id="getBookmarks-result" class="icon"> </span>
|
||||
<br/><br/>
|
||||
<!--#if $bookmarks_list#-->
|
||||
<input type="button" id="hideBookmarks" value="$T('link-HideBM')" />
|
||||
<!--#else#-->
|
||||
<input type="button" id="showBookmarks" value="$T('link-ShowBM')" />
|
||||
<!--#end if#-->
|
||||
</p>
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="newzbin_bookmarks">$T('opt-newzbin_bookmarks')</label>
|
||||
<input type="checkbox" name="newzbin_bookmarks" id="newzbin_bookmarks" value="1" <!--#if int($newzbin_bookmarks) > 0 then 'checked="checked"' else ""#--> />
|
||||
<span class="desc">$T('explain-newzbin_bookmarks')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="newzbin_unbookmark">$T('opt-newzbin_unbookmark')</label>
|
||||
<input type="checkbox" name="newzbin_unbookmark" id="newzbin_unbookmark" value="1" <!--#if int($newzbin_unbookmark) > 0 then 'checked="checked"' else ""#--> />
|
||||
<span class="desc">$T('explain-newzbin_unbookmark')</span>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="bookmark_rate">$T('opt-bookmark_rate')</label>
|
||||
<input type="number" name="bookmark_rate" id="bookmark_rate" value="$bookmark_rate" size="8" min="15" max="1440" />
|
||||
<span class="desc">$T('explain-bookmark_rate')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<input type="submit" value="$T('button-saveChanges')" class="saveButton" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /col1 -->
|
||||
</div><!-- /section -->
|
||||
<!--#if $bookmarks_list#-->
|
||||
<div class="section">
|
||||
<div class="col2">
|
||||
<h3>Newzbin Bookmarks</h3>
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<fieldset>
|
||||
<!--#set $odd = False#-->
|
||||
<!--#for $msgid in $bookmarks_list#-->
|
||||
<!--#set $odd = not $odd#-->
|
||||
<div class="field-pair <!--#if $odd then "alt" else ""#-->">
|
||||
<a href="https://$newzbin_url/browse/post/$msgid/" target="_blank">$msgid</a><br/>
|
||||
</div>
|
||||
<!--#end for#-->
|
||||
</fieldset>
|
||||
</div><!-- /col1 -->
|
||||
</div><!-- /section -->
|
||||
<!--#end if#-->
|
||||
<div class="padding alt">
|
||||
<input type="submit" value="$T('button-saveChanges')" class="saveButton" />
|
||||
<input type="button" value="$T('button-restart') SABnzbd" class="sabnzbd_restart" />
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="email_server">$T('opt-email_server')</label>
|
||||
<input type="url" name="email_server" id="email_server" value="$email_server" size="40" />
|
||||
<input type="text" name="email_server" id="email_server" value="$email_server" size="40" />
|
||||
<span class="desc">$T('explain-email_server')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
@@ -85,19 +85,33 @@
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="notify_classes">$T('opt-notify_classes')</label>
|
||||
<select name="notify_classes" multiple="multiple" class="multiple_cats">
|
||||
<!--#for $item in $notify_list#-->
|
||||
<option value="$item" <!--#if $item in $notify_classes then 'selected="selected"' else ""#--> >$T($notify_texts[$item])</option>
|
||||
<!--#end for#-->
|
||||
</select>
|
||||
<span class="desc">$T('explain-notify_classes')</span>
|
||||
</div>
|
||||
<div class="field-pair <!--#if not $have_ncenter then "disabled" else "" #-->">
|
||||
<label class="config" for="ncenter_enable">$T('opt-ncenter_enable')</label>
|
||||
<input type="checkbox" name="ncenter_enable" id="ncenter_enable" value="1" <!--#if int($ncenter_enable) > 0 then 'checked="checked"' else ""#--> <!--#if not $have_ncenter then 'readonly="readonly" disabled="disabled"' else "" #--> />
|
||||
<span class="desc">$T('explain-ncenter_enable')</span>
|
||||
</div>
|
||||
<div class="field-pair alt <!--#if not $have_ntfosd then "disabled" else "" #-->">
|
||||
<label class="config" for="ntfosd_enable">$T('opt-ntfosd_enable')</label>
|
||||
<input type="checkbox" name="ntfosd_enable" id="ntfosd_enable" value="1" <!--#if int($ntfosd_enable) > 0 then 'checked="checked"' else ""#--> <!--#if not $have_ntfosd then 'readonly="readonly" disabled="disabled"' else "" #--> />
|
||||
<span class="desc">$T('explain-ntfosd_enable')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<div class="field-pair" >
|
||||
<label class="config" for="growl_enable">$T('opt-growl_enable')</label>
|
||||
<input type="checkbox" name="growl_enable" id="growl_enable" value="1" <!--#if int($growl_enable) > 0 then 'checked="checked"' else ""#--> />
|
||||
<span class="desc">$T('explain-growl_enable')</span>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="growl_server">$T('opt-growl_server')</label>
|
||||
<input type="url" name="growl_server" id="growl_server" value="$growl_server" size="40" />
|
||||
<input type="text" name="growl_server" id="growl_server" value="$growl_server" size="40" />
|
||||
<span class="desc">$T('explain-growl_server')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
@@ -163,7 +177,7 @@
|
||||
success: function (data) {
|
||||
if (data.status == true) {
|
||||
\$('#testnotice-result').addClass("success").html('$T('smpl-notesent')');
|
||||
} else {
|
||||
} else {
|
||||
\$('#testnotice-result').addClass("failure").html(data.error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<label class="config narrow" for="rss_rate">$T('opt-rss_rate')</label>
|
||||
<input type="number" name="rss_rate" id="rss_rate" value="$rss_rate" size="8" min="15" max="1440" />
|
||||
<input type="submit" value="$T('button-save')" />
|
||||
<span class "config narrow"> $T('Next scan at:') $rss_next</span>
|
||||
<span class="desc narrow">$T('explain-rss_rate')</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -498,6 +499,10 @@
|
||||
</div><!-- /colmask -->
|
||||
|
||||
<script>
|
||||
function urlencode(str) {
|
||||
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
|
||||
}
|
||||
|
||||
\$(document).ready(function(){
|
||||
\$('.editFeed').click(function(){
|
||||
var oldURI = \$(this).prev().val();
|
||||
@@ -537,7 +542,7 @@
|
||||
url: "test_rss_feed",
|
||||
data: {feed: whichFeed, session: "$session" }
|
||||
}).done(function( msg ) {
|
||||
location = '?feed=' + whichFeed;
|
||||
location = '?feed=' + urlencode(whichFeed);
|
||||
// location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -34,17 +34,16 @@ else:
|
||||
</select>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="dayofweek">$T('sch-frequency')</label>
|
||||
<select name="dayofweek" id="dayofweek">
|
||||
<option value="*" selected="selected">$T('daily')</option>
|
||||
<option value="1">$T('monday')</option>
|
||||
<option value="2">$T('tuesday')</option>
|
||||
<option value="3">$T('wednesday')</option>
|
||||
<option value="4">$T('thursday')</option>
|
||||
<option value="5">$T('friday')</option>
|
||||
<option value="6">$T('saturday')</option>
|
||||
<option value="7">$T('sunday')</option>
|
||||
</select>
|
||||
<label class="config" for="daysofweek">$T('sch-frequency')</label>
|
||||
<div class="checkbox-days">
|
||||
<p><input type="checkbox" name="daysofweek" value="1"><label>$T('monday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="2"><label>$T('tuesday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="3"><label>$T('wednesday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="4"><label>$T('thursday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="5"><label>$T('friday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="6"><label>$T('saturday')</label></p>
|
||||
<p><input type="checkbox" name="daysofweek" value="7"><label>$T('sunday')</label></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="action">$T('sch-action')</label>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="password">$T('srv-password')</label>
|
||||
<input type="text" name="password" id="password" size="30" />
|
||||
<input type="password" name="password" id="password" size="30" />
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="connections">$T('srv-connections')</label>
|
||||
@@ -86,18 +86,16 @@
|
||||
<div class="section">
|
||||
<div class="col2">
|
||||
<h3>$servers[$server]['name']</h3>
|
||||
<!--#if 'amounts' in $servers[$server]#-->
|
||||
<p>
|
||||
<b>$T('srv-bandwidth'):</b><br/>
|
||||
$T('total'): $servers[$server]['amounts'][0]<br/>
|
||||
$T('today'): $servers[$server]['amounts'][3]<br/>
|
||||
$T('thisWeek'): $servers[$server]['amounts'][2]<br/>
|
||||
$T('thisMonth'): $servers[$server]['amounts'][1]
|
||||
<table><tr>
|
||||
<td><input type="checkbox" class="toggleServerCheckbox" name="q_enable" value="1" <!--#if int($servers[$server]['enable']) != 0 then 'checked="checked"' else ""#--> rel="$server" /></td>
|
||||
<td> $T('enabled')</td>
|
||||
</tr></table>
|
||||
</p>
|
||||
<input type="button" value="$T('button-clrServer')" class="clrServer" />
|
||||
<!--#end if#-->
|
||||
<input type="button" value="$T('showDetails')" class="showserver" />
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<div class="col1" style="display:none;">
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="enable$cur">$T('srv-enable')</label>
|
||||
@@ -154,6 +152,15 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /col1 -->
|
||||
<div class="col2" style="display:block;">
|
||||
<!--#if 'amounts' in $servers[$server]#-->
|
||||
<b>$T('srv-bandwidth'):</b><br/>
|
||||
$T('total'): $(servers[$server]['amounts'][0])B<br/>
|
||||
$T('today'): $(servers[$server]['amounts'][3])B<br/>
|
||||
$T('thisWeek'): $(servers[$server]['amounts'][2])B<br/>
|
||||
$T('thisMonth'): $(servers[$server]['amounts'][1])B
|
||||
<!--#end if#-->
|
||||
</div>
|
||||
</div><!-- /section -->
|
||||
</form>
|
||||
<!--#end for#-->
|
||||
@@ -162,6 +169,15 @@
|
||||
|
||||
<script>
|
||||
\$(document).ready(function(){
|
||||
\$('.showserver').click(function () {
|
||||
\$(this).parent().next().toggle();
|
||||
\$(this).parent().next().next().toggle();
|
||||
if (\$(this).attr("value") == "$T('showDetails')") {
|
||||
\$(this).attr("value", "$T('hideDetails')");
|
||||
} else {
|
||||
\$(this).attr("value", "$T('showDetails')");
|
||||
}
|
||||
});
|
||||
\$('#addServerButton').click(function(){
|
||||
\$('#addServer').hide();
|
||||
\$('#addServerContent').show();
|
||||
@@ -188,6 +204,16 @@
|
||||
\$(this).parents('form:first').attr('action','clrServer').submit();
|
||||
return false;
|
||||
});
|
||||
\$('.toggleServerCheckbox').click(function(){
|
||||
var whichServer = \$(this).attr("rel");
|
||||
\$.ajax({
|
||||
type: "POST",
|
||||
url: "toggleServer",
|
||||
data: {server: whichServer, session: "$session" }
|
||||
}).done(function() {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -265,6 +265,11 @@
|
||||
<td>$T('sort-File')</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right"><b>$T('orgDirname'):</b></td>
|
||||
<td>%dn</td>
|
||||
<td>$T("sort-Folder")</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td class="align-right"><b>$T('lowercase'):</b></td>
|
||||
<td>{$T('TEXT')}</td>
|
||||
<td>$T('text')</td>
|
||||
@@ -432,7 +437,7 @@
|
||||
return function(callback, ms){
|
||||
clearTimeout (timer);
|
||||
timer = setTimeout(callback, ms);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
function tvSet(val) {
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
<fieldset>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="check_new_rel">$T('opt-check_new_rel')</label>
|
||||
<input type="checkbox" name="check_new_rel" id="check_new_rel" value="1" <!--#if int($check_new_rel) > 0 then 'checked="checked"' else ""#--> />
|
||||
<select name="check_new_rel" id="check_new_rel">
|
||||
<option value="0" <!--#if $check_new_rel == 0 then 'selected="selected" class="selected"' else ""#--> >$T('off')</option>
|
||||
<option value="1" <!--#if $check_new_rel == 1 then 'selected="selected" class="selected"' else ""#--> >$T('on')</option>
|
||||
<option value="2" <!--#if $check_new_rel == 2 then 'selected="selected" class="selected"' else ""#--> >$T('also-test')</option>
|
||||
</select>
|
||||
<span class="desc">$T('explain-check_new_rel')</span>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
@@ -79,6 +83,11 @@
|
||||
</div><!-- /col2 -->
|
||||
<div class="col1">
|
||||
<fieldset>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="fail_hopeless">$T('opt-fail_hopeless')</label>
|
||||
<input type="checkbox" name="fail_hopeless" id="fail_hopeless" value="1" <!--#if int($fail_hopeless) > 0 then 'checked="checked"' else ""#--> />
|
||||
<span class="desc">$T('explain-fail_hopeless')</span>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="config" for="pre_check">$T('opt-pre_check')</label>
|
||||
<input type="checkbox" name="pre_check" id="pre_check" value="1" <!--#if int($pre_check) > 0 then 'checked="checked"' else ""#--> />
|
||||
@@ -100,7 +109,11 @@
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="config" for="pause_on_pwrar">$T('opt-pause_on_pwrar')</label>
|
||||
<input type="checkbox" name="pause_on_pwrar" id="pause_on_pwrar" value="1" <!--#if int($pause_on_pwrar) > 0 then 'checked="checked"' else ""#--> />
|
||||
<select name="pause_on_pwrar" id="pause_on_pwrar">
|
||||
<option value="0" <!--#if int($pause_on_pwrar) == 0 then 'selected="selected" class="selected"' else ""#--> >$T('nodupes-off')</option>
|
||||
<option value="1" <!--#if int($pause_on_pwrar) == 1 then 'selected="selected" class="selected"' else ""#--> >$T('nodupes-pause')</option>
|
||||
<option value="2" <!--#if int($pause_on_pwrar) == 2 then 'selected="selected" class="selected"' else ""#--> >$T('abort')</option>
|
||||
</select>
|
||||
<span class="desc">$T('explain-pause_on_pwrar')</span>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>SABnzbd $version - $T('queued'): $mbleft $T('MB')</title>
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="${path}rss?mode=history"/>
|
||||
|
||||
@@ -126,8 +126,10 @@
|
||||
<div class="config_sprite_container sprite_config_nav_scheduling">$T('Plush-cmenu-scheduling')</div></a></li>
|
||||
<li><a class="#if $pane=="Email"#nav_active#end if#" id="config_nav_email" href="${path}config/notify/">
|
||||
<div class="config_sprite_container sprite_config_nav_email">$T('cmenu-notif')</div></a></li>
|
||||
<!--#if 0#-->
|
||||
<li><a class="#if $pane=="Index Sites"#nav_active#end if#" id="config_nav_index_sites" href="${path}config/indexers/">
|
||||
<div class="config_sprite_container sprite_config_nav_indexsites">$T('cmenu-newzbin')</div></a></li>
|
||||
<!--#end if#-->
|
||||
<li><a class="#if $pane=="Categories"#nav_active#end if#" id="config_nav_categories" href="${path}config/categories/">
|
||||
<div class="config_sprite_container sprite_config_nav_categories">$T('cmenu-cat')</div></a></li>
|
||||
<li><a class="#if $pane=="Sorting"#nav_active#end if#" id="config_nav_sorting" href="${path}config/sorting/">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</table>
|
||||
<div class="sabnzbd_logo main_sprite_container sprite_sabnzbdplus_logo"></div>
|
||||
<p><strong>SABnzbd $T('version'):</strong> $version</p>
|
||||
<p><small>Copyright (C) 2008-2012, The SABnzbd Team <<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>></small></p>
|
||||
<p><small>Copyright (C) 2008-2012, The SABnzbd Team <team@sabnzbd.org></small></p>
|
||||
<p><small>$T('yourRights')</small></p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -43,90 +43,6 @@
|
||||
</fieldset>
|
||||
</div><!-- /component-group1 -->
|
||||
|
||||
<div id="core-component-group2" class="component-group clearfix">
|
||||
<div class="component-group-desc">
|
||||
<h3>Newzbin $T('accountInfo')</h3>
|
||||
<p>$T('explain-newzbin')</p>
|
||||
</div>
|
||||
<fieldset class="component-group-list">
|
||||
<div class="field-pair">
|
||||
<label class="nocheck clearfix" for="username_newzbin">
|
||||
<span class="component-title">$T('opt-username_newzbin')</span>
|
||||
<input type="text" name="username_newzbin" id="username_newzbin" value="$username_newzbin"/>
|
||||
</label>
|
||||
<label class="nocheck clearfix">
|
||||
<span class="component-title"> </span>
|
||||
<span class="component-desc">$T('explain-username_newzbin')</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="nocheck clearfix" for="password_newzbin">
|
||||
<span class="component-title">$T('opt-password_newzbin')</span>
|
||||
<input type="password" name="password_newzbin" id="password_newzbin" value="$password_newzbin"/>
|
||||
</label>
|
||||
<label class="nocheck clearfix">
|
||||
<span class="component-title"> </span>
|
||||
<span class="component-desc">$T('explain-password_newzbin')</span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /component-group2 -->
|
||||
|
||||
<div id="core-component-group3" class="component-group clearfix">
|
||||
<div class="component-group-desc">
|
||||
<h3>Newzbin $T('newzbinBookmarks')</h3>
|
||||
<p>
|
||||
<input type="button" class="juiButton" id="getBookmarks" value="$T('link-getBookmarks')" />
|
||||
<br/><br/>
|
||||
<!--#if $bookmarks_list#-->
|
||||
<input type="button" class="juiButton" id="hideBookmarks" value="$T('link-HideBM')" />
|
||||
<!--#else#-->
|
||||
<input type="button" class="juiButton" id="showBookmarks" value="$T('link-ShowBM')" />
|
||||
<!--#end if#-->
|
||||
</p>
|
||||
</div>
|
||||
<fieldset class="component-group-list">
|
||||
<div class="field-pair">
|
||||
<input type="checkbox" name="newzbin_bookmarks" id="newzbin_bookmarks" value="1" <!--#if $newzbin_bookmarks > 0 then "checked=1" else ""#--> />
|
||||
<label class="clearfix" for="newzbin_bookmarks">
|
||||
<span class="component-title">$T('opt-newzbin_bookmarks')</span>
|
||||
<span class="component-desc">$T('explain-newzbin_bookmarks')</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<input type="checkbox" name="newzbin_unbookmark" id="newzbin_unbookmark" value="1" <!--#if $newzbin_unbookmark > 0 then "checked=1" else ""#--> />
|
||||
<label class="clearfix" for="newzbin_unbookmark">
|
||||
<span class="component-title">$T('opt-newzbin_unbookmark')</span>
|
||||
<span class="component-desc">$T('explain-newzbin_unbookmark')</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label class="nocheck clearfix" for="bookmark_rate">
|
||||
<span class="component-title">$T('opt-bookmark_rate')</span>
|
||||
<input type="text" name="bookmark_rate" id="bookmark_rate" size="6" value="$bookmark_rate"/>
|
||||
</label>
|
||||
<label class="nocheck clearfix">
|
||||
<span class="component-title"> </span>
|
||||
<span class="component-desc">$T('explain-bookmark_rate')</span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /component-group3 -->
|
||||
|
||||
<!--#if $bookmarks_list#-->
|
||||
<div id="core-component-group4" class="component-group clearfix">
|
||||
<div class="component-group-desc">
|
||||
<h3>Newzbin $T('accountInfo')</h3>
|
||||
<p>$T('explain-newzbin')</p>
|
||||
</div>
|
||||
<fieldset class="component-group-list">
|
||||
<!--#for $msgid in $bookmarks_list#-->
|
||||
<a href="https://$newzbin_url/browse/post/$msgid/" target="_blank">$msgid</a><br/>
|
||||
<!--#end for#-->
|
||||
</fieldset>
|
||||
</div><!-- /component-group4 -->
|
||||
<!--#end if#-->
|
||||
|
||||
<div class="component-group-last clearfix">
|
||||
<div class="component-group-desc">
|
||||
<h3> </h3>
|
||||
|
||||
@@ -174,6 +174,7 @@ $T('explain-RSS')
|
||||
<table class="rssTable">
|
||||
<tr>
|
||||
<th>$T('Plush-rss-delete')</th>
|
||||
<th> </th>
|
||||
<th>$T('rss-order')</th>
|
||||
<th>$T('rss-type')</th>
|
||||
<th>$T('rss-filter')</th>
|
||||
@@ -187,6 +188,7 @@ $T('explain-RSS')
|
||||
<form action="upd_rss_filter" method="get">
|
||||
<tr class="odd">
|
||||
<td></td>
|
||||
<td><input type="checkbox" name="enabled" value="1" checked="checked" /></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<select name="filter_type">
|
||||
@@ -255,7 +257,10 @@ $T('explain-RSS')
|
||||
</td>
|
||||
|
||||
<form action="upd_rss_filter" method="get">
|
||||
<td>
|
||||
<td>
|
||||
<input type="checkbox" name="enabled" value="1" <!--#if $filter[6] == '1' then 'checked="checked"' else ""#--> />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="3" name="new_index" value=$fnum>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -36,18 +36,15 @@ else:
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair alt">
|
||||
<label class="nocheck clearfix" for="dayofweek">
|
||||
<label class="nocheck clearfix" for="daysofweek">
|
||||
<span class="component-title">$T('sch-frequency')</span>
|
||||
<select name="dayofweek" id="dayofweek">
|
||||
<option value="*" selected>$T('daily')</option>
|
||||
<option value="1">$T('monday')</option>
|
||||
<option value="2">$T('tuesday')</option>
|
||||
<option value="3">$T('wednesday')</option>
|
||||
<option value="4">$T('thursday')</option>
|
||||
<option value="5">$T('friday')</option>
|
||||
<option value="6">$T('saturday')</option>
|
||||
<option value="7">$T('sunday')</option>
|
||||
</select>
|
||||
<input type="checkbox" name="daysofweek" value="1">$T('monday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="2">$T('tuesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="3">$T('wednesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="4">$T('thursday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="5">$T('friday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="6">$T('saturday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="7">$T('sunday')<br/>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="field-pair alt">
|
||||
<label class="nocheck clearfix" for="password">
|
||||
<span class="component-title">$T('srv-password')</span>
|
||||
<input type="text" size="25" name="password"/>
|
||||
<input type="password" size="25" name="password"/>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
@@ -156,7 +156,7 @@
|
||||
<div class="field-pair alt">
|
||||
<label class="nocheck clearfix" for="password">
|
||||
<span class="component-title">$T('srv-password')</span>
|
||||
<input type="text" size="25" name="password" value="$servers[$server]['password']" />
|
||||
<input type="password" size="25" name="password" value="$servers[$server]['password']" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
<a class="sf-with-ul">$T('menu-queue')</a>
|
||||
<ul>
|
||||
<!--#if $have_quota#--><li><a id="reset_quota_now" class="pointer">$T('link-resetQuota')</a></li><!--#end if#-->
|
||||
<!--#if $varExists('newzbinDetails')#--><li><a id="get_bookmarks_now" class="pointer">$T('link-getBookmarks')</a></li><!--#end if#-->
|
||||
<!--#if $have_rss_defined#--><li><a id="get_rss_now" class="pointer">$T('button-rssNow')</a></li><!--#end if#-->
|
||||
<!--#if $have_watched_dir#--><li><a id="get_watched_now" class="pointer">$T('sch-scan_folder')</a></li><!--#end if#-->
|
||||
<li><a id="topmenu_toggle" class="pointer">$T('Plush-topMenu')</a></li>
|
||||
|
||||
@@ -40,6 +40,7 @@ jQuery(function($){
|
||||
$('#addID').click(function(){ // also works when hitting enter because of <form>
|
||||
if ($('#addID_input').val()!='URL') {
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {
|
||||
@@ -158,6 +159,7 @@ jQuery(function($){
|
||||
else
|
||||
$('#speed-wrapper .sprite_q_menu_pausefor').removeClass('sprite_q_menu_pausefor_on');
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'config', name:'set_speedlimit', value: str, apikey: $.plush.apikey}
|
||||
@@ -213,6 +215,7 @@ jQuery(function($){
|
||||
else
|
||||
$('.sprite_q_queue').removeClass('sprite_q_queue_on');
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'change_complete_action', value: $(this).val(), apikey: $.plush.apikey}
|
||||
@@ -234,6 +237,7 @@ jQuery(function($){
|
||||
value="all";
|
||||
}
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'delete', value:value, del_files:del_files, apikey: $.plush.apikey},
|
||||
@@ -258,6 +262,7 @@ jQuery(function($){
|
||||
case 'sortSizeDesc': sort='size'; dir='desc'; break;
|
||||
}
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'sort', sort: sort, dir: dir, apikey: $.plush.apikey},
|
||||
@@ -272,6 +277,7 @@ jQuery(function($){
|
||||
minutes = prompt($(event.target).attr('title'));
|
||||
$.plush.SetQueuePauseInfo(true,minutes+':00');
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'config', name:'set_pause', value: minutes, apikey: $.plush.apikey},
|
||||
@@ -282,6 +288,7 @@ jQuery(function($){
|
||||
// Get Bookmarks
|
||||
$('#get_bookmarks_now').click(function() {
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'newzbin', name:'get_bookmarks', apikey: $.plush.apikey},
|
||||
@@ -292,6 +299,7 @@ jQuery(function($){
|
||||
// Reset Quota
|
||||
$('#reset_quota_now').click(function() {
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'reset_quota', apikey: $.plush.apikey},
|
||||
@@ -302,6 +310,7 @@ jQuery(function($){
|
||||
// Get RSS
|
||||
$('#get_rss_now').click(function() {
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'rss_now', apikey: $.plush.apikey},
|
||||
@@ -312,6 +321,7 @@ jQuery(function($){
|
||||
// Get Watched folder
|
||||
$('#get_watched_now').click(function() {
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'watched_now', apikey: $.plush.apikey},
|
||||
@@ -475,6 +485,7 @@ jQuery(function($){
|
||||
$('#pause_resume').removeClass('sprite_q_pause_on').addClass('sprite_q_pause');
|
||||
$('#pause_int').html("");
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'resume', apikey: $.plush.apikey}
|
||||
@@ -483,6 +494,7 @@ jQuery(function($){
|
||||
$('#pause_resume').removeClass('sprite_q_pause').addClass('sprite_q_pause_on');
|
||||
$('#pause_int').html("");
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'pause', apikey: $.plush.apikey}
|
||||
@@ -526,6 +538,7 @@ jQuery(function($){
|
||||
if ($(this).hasClass('sprite_ql_grip_resume_on')) {
|
||||
$(this).toggleClass('sprite_ql_grip_resume_on').toggleClass('sprite_ql_grip_pause_on');
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'pause', value: pid, apikey: $.plush.apikey}
|
||||
@@ -533,6 +546,7 @@ jQuery(function($){
|
||||
} else {
|
||||
$(this).toggleClass('sprite_ql_grip_resume_on').toggleClass('sprite_ql_grip_pause_on');
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'resume', value: pid, apikey: $.plush.apikey}
|
||||
@@ -577,6 +591,7 @@ jQuery(function($){
|
||||
var nzbid = $(this).parent().parent().attr('id');
|
||||
var oldPos = $('#'+nzbid)[0].rowIndex + $.plush.queuecurpage * $.plush.queuePerPage;
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'priority', value: nzbid, value2: $(this).val(), apikey: $.plush.apikey},
|
||||
@@ -599,6 +614,7 @@ jQuery(function($){
|
||||
var val = $(this).parent().parent().attr('id');
|
||||
var cval = $(this).attr('class').split(" ")[0]; // ignore added "hovering" class
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode: cval, value: val, value2: $(this).val(), apikey: $.plush.apikey},
|
||||
@@ -687,6 +703,7 @@ $.plush.queueprevslots = $.plush.queuenoofslots; // for the next refresh
|
||||
if (table.tBodies[0].rows[i].id == row.id) {
|
||||
val2 = (i + $.plush.queuecurpage * $.plush.queuePerPage);
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'switch', value: row.id, value2: val2, apikey: $.plush.apikey},
|
||||
@@ -772,6 +789,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
|
||||
if ($('#multi_status').val())
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:$('#multi_status').val(), value: nzo_ids, apikey: $.plush.apikey}
|
||||
@@ -779,6 +797,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
|
||||
if ($('#multi_cat').val())
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode: 'change_cat', value: nzo_ids, value2: $('#multi_cat').val(), apikey: $.plush.apikey}
|
||||
@@ -786,6 +805,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
|
||||
if ($('#multi_priority').val())
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'queue', name:'priority', value: nzo_ids, value2: $('#multi_priority').val(), apikey: $.plush.apikey}
|
||||
@@ -793,6 +813,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
|
||||
if ($('#multi_pp').val())
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode: 'change_opts', value: nzo_ids, value2: $('#multi_pp').val(), apikey: $.plush.apikey}
|
||||
@@ -800,6 +821,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
|
||||
if ($('#multi_script').val())
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode: 'change_script', value: nzo_ids, value2: $('#multi_script').val(), apikey: $.plush.apikey}
|
||||
@@ -870,9 +892,10 @@ $("a","#multiops_inputs").click(function(e){
|
||||
value="failed";
|
||||
}
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:'history', name:'delete', value:value, del_files:del_files, apikey: $.plush.apikey},
|
||||
data: {mode:'history', name:'delete', value:value, del_files:del_files, search: $('#historySearchBox').val(), apikey: $.plush.apikey},
|
||||
success: function(){
|
||||
$.colorbox.close();
|
||||
$.plush.modalOpen=false;
|
||||
@@ -959,6 +982,7 @@ $("a","#multiops_inputs").click(function(e){
|
||||
$.plush.pendingHistoryRefresh = true;
|
||||
$.colorbox.close();
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "tapi",
|
||||
data: {mode:mode, name:'delete', value: delid, del_files: del_files, apikey: $.plush.apikey},
|
||||
@@ -1085,6 +1109,7 @@ $.plush.histprevslots = $.plush.histnoofslots; // for the next refresh
|
||||
|
||||
// Fetch updated content from queue.tmpl
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "queue/",
|
||||
data: {start: ( page * $.plush.queuePerPage ), limit: $.plush.queuePerPage},
|
||||
@@ -1140,6 +1165,7 @@ $.plush.histprevslots = $.plush.histnoofslots; // for the next refresh
|
||||
|
||||
|
||||
$.ajax({
|
||||
headers: {"Cache-Control": "no-cache"},
|
||||
type: "POST",
|
||||
url: "history/",
|
||||
data: data,
|
||||
@@ -1216,12 +1242,16 @@ $.plush.histprevslots = $.plush.histnoofslots; // for the next refresh
|
||||
SetQueueETAStats : function(speed,kbpersec,timeleft,eta) {
|
||||
|
||||
// ETA/speed stats at top of queue
|
||||
if (kbpersec < 1 && $.plush.paused)
|
||||
if (kbpersec < 100 && $.plush.paused) {
|
||||
$('#stats_eta').html('—');
|
||||
else
|
||||
$('#stats_speed').html('—');
|
||||
$('#time-left').attr('title','—'); // Tooltip on "time left"
|
||||
}
|
||||
else {
|
||||
$('#stats_eta').html(timeleft);
|
||||
$('#stats_speed').html(speed+"B/s");
|
||||
$('#time-left').attr('title',eta); // Tooltip on "time left"
|
||||
$('#stats_speed').html(speed+"B/s");
|
||||
$('#time-left').attr('title',eta); // Tooltip on "time left"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -401,12 +401,12 @@ body {
|
||||
.sprite_hv_download{ background-position: 0 -167px; }
|
||||
.sprite_hv_error{ background-position: 0 -193px; }
|
||||
.sprite_hv_filejoin{ background-position: 0 -219px; }
|
||||
.sprite_hv_repair{ background-position: 0 -245px; }
|
||||
.sprite_hv_unpack{ background-position: 0 -245px; }
|
||||
.sprite_hv_report{ background-position: 0 -271px; }
|
||||
.sprite_hv_script{ background-position: 0 -297px; }
|
||||
.sprite_hv_star{ background-position: 0 -323px; }
|
||||
.sprite_hv_stats{ background-position: 0 -349px; }
|
||||
.sprite_hv_unpack{ background-position: 0 -375px; }
|
||||
.sprite_hv_repair{ background-position: 0 -375px; }
|
||||
.sprite_progress_done{ background-position: 0 -401px; } /* queue.tmpl */
|
||||
.sprite_progressbar_bg{ background-position: 0 -430px; }
|
||||
.sprite_q_menu_pausefor{ background-position: 0 -459px; }
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<!--#for $warn in $warnings#-->
|
||||
<!--#set $odd = not $odd#-->
|
||||
<tr class="<!--#if $odd then "odd" else "even"#-->">
|
||||
<td>$warn.replace("\n","</td><td>")</td></tr>
|
||||
<td>$warn.replace("\n","</td><td>", 2)</td></tr>
|
||||
<!--#end for#-->
|
||||
</table>
|
||||
<!--#else#-->
|
||||
|
||||
@@ -1,69 +1,4 @@
|
||||
<a href="${helpuri}Configure+Indexers-0-7" id="help" target="_blank">$T('menu-help')</a><h3>Newzbin</h3>
|
||||
<form id="configNewzbin" class="cmxform" autocomplete="off">
|
||||
|
||||
$T('explain-newzbin')<br/>
|
||||
<br/>
|
||||
<div class="EntryBlock">
|
||||
|
||||
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('accountInfo')</legend>
|
||||
<hr />
|
||||
<label class="label">$T('opt-username_newzbin'):</label>
|
||||
<input type="text" name="username_newzbin" value="$username_newzbin">
|
||||
<span class="tips">$T('explain-username_newzbin')</span>
|
||||
<br class="clear" />
|
||||
|
||||
|
||||
<label class="label">$T('opt-password_newzbin'):</label>
|
||||
<input type="password" name="password_newzbin" value="$password_newzbin">
|
||||
<span class="tips">$T('explain-password_newzbin')</span>
|
||||
<br class="clear" />
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('newzbinBookmarks')</legend>
|
||||
<hr />
|
||||
|
||||
<label><span class="label">$T('newzbinBookmarks'):</span>
|
||||
<input class="radio" type="checkbox" name="newzbin_bookmarks" value="1" <!--#if $newzbin_bookmarks > 0 then "checked=1" else ""#--> />
|
||||
<span class="tips">$T('explain-newzbin_bookmarks')</span></label>
|
||||
<br class="clear" />
|
||||
|
||||
<label><span class="label">$T('opt-newzbin_unbookmark'):</span>
|
||||
<input class="radio" type="checkbox" name="newzbin_unbookmark" value="1" <!--#if $newzbin_unbookmark > 0 then "checked=1" else ""#--> />
|
||||
<span class="tips">$T('explain-newzbin_unbookmark')</span></label>
|
||||
<br class="clear" />
|
||||
|
||||
<label class="label">$T('opt-bookmark_rate'):</label>
|
||||
<input type="text" name="bookmark_rate" value="$bookmark_rate">
|
||||
<span class="tips">$T('explain-bookmark_rate')</span>
|
||||
<br class="clear" />
|
||||
</fieldset>
|
||||
|
||||
<a class="config" onClick="getBookmarks();">$T('link-getBookmarks')</a>
|
||||
<!--#if $bookmarks_list#-->
|
||||
<a class="config" onClick="lr('config/indexers/hideBookmarks');">$T('link-HideBM')</a>
|
||||
<!--#else#-->
|
||||
<a class="config" onClick="lr('config/indexers/showBookmarks');">$T('link-ShowBM')</a>
|
||||
<!--#end if#-->
|
||||
|
||||
<!--#if $bookmarks_list#-->
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('processedBM')</legend>
|
||||
<hr />
|
||||
<!--#for $msgid in $bookmarks_list#-->
|
||||
<a href="https://$newzbin_url/browse/post/$msgid/" target="_blank">$msgid</a>
|
||||
<!--#end for#-->
|
||||
<br class="clear" />
|
||||
</fieldset>
|
||||
<!--#end if#-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br/><hr/>
|
||||
<a href="${helpuri}Configure+Indexers-0-7" id="help" target="_blank">$T('menu-help')</a>
|
||||
<h3>NzbMatrix</h3><br/>
|
||||
|
||||
$T('explain-nzbmatrix')<br/>
|
||||
|
||||
@@ -79,6 +79,7 @@ MochiKit.DOM.addLoadEvent(location = "../../#config-rss");
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>$T('rss-order')</th>
|
||||
<th>$T('rss-type')</th>
|
||||
<th>$T('rss-filter')</th>
|
||||
@@ -92,6 +93,7 @@ MochiKit.DOM.addLoadEvent(location = "../../#config-rss");
|
||||
<tbody>
|
||||
<tr id="$feed+new_filter">
|
||||
<td></td>
|
||||
<td><input type="checkbox" name="enabled" value="1" checked="checked" /></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<select name="filter_type">
|
||||
@@ -157,7 +159,9 @@ MochiKit.DOM.addLoadEvent(location = "../../#config-rss");
|
||||
<td>
|
||||
<input type="submit" value="$T('rss-delFilter')" onclick="javascript:lr('config/rss/del_rss_filter','index=$fnum&feed=$feed')" />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="checkbox" name="enabled" value="1" <!--#if $filter[6] == '1' then 'checked="checked"' else ""#--> />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="3" name="new_index" value=$fnum>
|
||||
</td>
|
||||
|
||||
@@ -26,17 +26,14 @@ else:
|
||||
<!--#end for#-->
|
||||
</select>
|
||||
<br class="clear" />
|
||||
<label class="label">$T('sch-frequency'):</label>
|
||||
<select name="dayofweek">
|
||||
<option value="*" selected>$T('daily')
|
||||
<option value="1">$T('monday')
|
||||
<option value="2">$T('tuesday')
|
||||
<option value="3">$T('wednesday')
|
||||
<option value="4">$T('thursday')
|
||||
<option value="5">$T('friday')
|
||||
<option value="6">$T('saturday')
|
||||
<option value="7">$T('sunday')
|
||||
</select>
|
||||
<label class="label" for="daysofweek">$T('sch-frequency'):</label>
|
||||
<input type="checkbox" name="daysofweek" value="1">$T('monday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="2">$T('tuesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="3">$T('wednesday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="4">$T('thursday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="5">$T('friday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="6">$T('saturday')<br/>
|
||||
<input type="checkbox" name="daysofweek" value="7">$T('sunday')<br/>
|
||||
<br class="clear" />
|
||||
<label class="label">$T('sch-action'):</label>
|
||||
<select name="action">
|
||||
|
||||
@@ -808,7 +808,7 @@ function lrb(url, extra, refresh)
|
||||
{
|
||||
method:'POST',
|
||||
sendContent:values,
|
||||
headers: {"Content-Type":"application/x-www-form-urlencoded"}
|
||||
headers: {"Content-Type":"application/x-www-form-urlencoded", "Cache-Control": "no-cache"}
|
||||
|
||||
});
|
||||
d.addCallback(function(d)
|
||||
@@ -840,7 +840,7 @@ function lrb(url, extra, refresh)
|
||||
{
|
||||
method:'POST',
|
||||
sendContent:values,
|
||||
headers: {"Content-Type":"application/x-www-form-urlencoded"}
|
||||
headers: {"Content-Type":"application/x-www-form-urlencoded", "Cache-Control": "no-cache"}
|
||||
|
||||
});
|
||||
if (saveelement) {
|
||||
@@ -1133,7 +1133,9 @@ function loadingJSON(){
|
||||
<li><a class="config" href="$prefix/config/scheduling/" onclick="lr('config/scheduling/','', 0, 0);">$T('cmenu-scheduling')</a> </li>
|
||||
<li><a class="config" href="$prefix/config/rss/" onclick="lr('config/rss/','', 0, 0);">$T('cmenu-rss')</a> </li>
|
||||
<li><a class="config" href="$prefix/config/notify/" onclick="lr('config/notify/','', 0, 0);">$T('cmenu-notif')</a></li>
|
||||
<!--#if 0#-->
|
||||
<li><a class="config" href="$prefix/config/indexers/" onclick="lr('config/indexers/', '', 0, 0);">$T('cmenu-newzbin')</a></li>
|
||||
<!--#end if#-->
|
||||
<li><a class="config" href="$prefix/config/categories/" onclick="lr('config/categories/', '', 0, 0);">$T('cmenu-cat')</a></li>
|
||||
<li><a class="config" href="$prefix/config/sorting/" onclick="lr('config/sorting/', '', 0, 0);">$T('cmenu-sorting')</a></li>
|
||||
</ul>
|
||||
@@ -1152,9 +1154,6 @@ function loadingJSON(){
|
||||
<li><a class="config" onclick="javascript:timedPause()">$T("smpl-custom")</a></li>
|
||||
|
||||
</ul>
|
||||
<!--#if $varExists('newzbinDetails')#-->
|
||||
<li><a onclick="getBookmarks()">$T('smpl-getbookmarks')</a></li>
|
||||
<!--#end if#-->
|
||||
<!--#if $have_quota#-->
|
||||
<li><a onclick="resetQuota()">$T('link-resetQuota')</a></li>
|
||||
<!--#end if#-->
|
||||
@@ -1183,7 +1182,7 @@ function loadingJSON(){
|
||||
<div id="RightContainer" class="left-border">
|
||||
<div id="addNew" class="centerLinks" style="overflow: hidden; display: none;">
|
||||
<form action="addID" method="get">
|
||||
<input type="text" style="width:218px;" name="id" value="$T('enterURL')<!--#if $varExists('newzbinDetails') then $T('enterID') else '' #-->" onfocus="clearForm(this, 'Enter URL<!--#if $varExists('newzbinDetails') then " or Report ID" else "" #-->')" onblur="setForm(this, 'Enter URL<!--#if $varExists('newzbinDetails') then " or Report ID" else "" #-->')">
|
||||
<input type="text" style="width:218px;" name="id" value="$T('enterURL')" onfocus="clearForm(this, 'Enter URL<!--#if $varExists('newzbinDetails') then " or Report ID" else "" #-->')" onblur="setForm(this, 'Enter URL<!--#if $varExists('newzbinDetails') then " or Report ID" else "" #-->')">
|
||||
<!--#if $cat_list#-->
|
||||
<select name="cat" >
|
||||
<optgroup label="$T('category')">
|
||||
|
||||
@@ -24,15 +24,15 @@ border-top: 1px dotted #222;
|
||||
}
|
||||
|
||||
#progressBar {
|
||||
background-color: #fff;
|
||||
border: 1px solid #000;
|
||||
background-color: #fff;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
#progressBartop {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
#percentageBar {
|
||||
background-color: #4B4545;
|
||||
background-color: #4B4545;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ table{border-spacing:0;}
|
||||
|
||||
|
||||
|
||||
input, select {
|
||||
input, select, option {
|
||||
background-color:#232323;
|
||||
border-color:#3a3a3a;
|
||||
color:white;
|
||||
@@ -110,4 +110,4 @@ span.unselected {
|
||||
color: white;
|
||||
background-color:#333;
|
||||
border: 1px solid #555;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<!--#include $webdir + "/inc_top.tmpl"#-->
|
||||
<script type="text/javascript" src="static/javascript/jquery.js"></script>
|
||||
<script type="text/javascript" src="static/javascript/restart.js"></script>
|
||||
<br/><br/>
|
||||
<h4 id="restarting" class="align-center">$T('wizard-restarting')</h4>
|
||||
<h4 id="complete" class="align-center success hidden">$T('wizard-complete')</h4>
|
||||
<br />
|
||||
<br/>
|
||||
<div id="tips" class="hidden">
|
||||
$T('wizard-tip1') <span class="bold">$T('wizard-tip2')</span><br/>
|
||||
<!--#set $tip3 = $T('wizard-tip3') % ''#-->
|
||||
$tip3<br/><br/>
|
||||
<div class="quoteBlock">
|
||||
<!--#set $i = 0#-->
|
||||
<!--#for $url in $urls#-->
|
||||
<!--#set $i = $i+1#-->
|
||||
<a href="$url">$url</a><!--#if $i != len($urls)#--><br /><!--#end if#-->
|
||||
<!--#end for#-->
|
||||
</div><br/>
|
||||
$T('wizard-tip4')
|
||||
<br/><br/>
|
||||
$T('wizard-tip-wiki') <a href="$helpuri">wiki</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr /><br/>
|
||||
<div class="full-width">
|
||||
<table class="full-width">
|
||||
<tr class="align-center">
|
||||
<td><input type="hidden" name="session" id="apikey" value="$session"><input class="bigbutton disabled" type="button" onclick="document.location ='$access_url'" value="$T('wizard-goto')" disabled="disabled"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--#include $webdir + "/inc_bottom.tmpl"#-->
|
||||
@@ -31,7 +31,7 @@ $T('wizard-explain-server')
|
||||
<div id="connections-tip" class="tips">$T('wizard-server-con-explain') $T('wizard-server-con-eg')</div>
|
||||
<div id="connections-error" class="error-text hidden">$T('wizard-server-number')</div>
|
||||
<br class="clear" />
|
||||
<label><span class="label">$T('srv-ssl')</span>
|
||||
<label for="srv-ssl"><!--#if $have_ssl then $T('srv-ssl') else '<span class="disabled-text">'+$T('srv-ssl')+'</span> (pyopenssl (python-ssl) '+$T('opt-notInstalled')+')'#-->
|
||||
<input class="validate-text" class="radio" type="checkbox" name="ssl" value="1" <!--#if $have_ssl then '' else 'disabled'#--><!--#if $ssl == 1 then 'checked' else ''#-->></label>
|
||||
<div class="tips">$T('wizard-server-ssl-explain')</div>
|
||||
<br class="clear" />
|
||||
|
||||
@@ -1,39 +1,34 @@
|
||||
<!--#include $webdir + "/inc_top.tmpl"#-->
|
||||
|
||||
<form action="./four" method="post" autocomplete="off">
|
||||
<p>$T('wizard-index-explain')</p>
|
||||
<div id="serverDetails">
|
||||
<h3><a href="http://$newzbin_url" target="_blank">Newzbin2.es</a> ($T('wizard-optional'))</h3>
|
||||
<label class="label">$T('srv-username'):</label><input type="text" size="20" value="$newzbin_user" name="newzbin_user">
|
||||
<br class="clear" />
|
||||
<label class="label">$T('srv-password'):</label><input type="password" size="20" value="$newzbin_pass" name="newzbin_pass">
|
||||
<br class="clear" />
|
||||
<input type="checkbox" name="newzbin_bookmarks" id="newzbin_bookmarks" value="1" <!--#if $newzbin_bookmarks == 1 then 'checked="checked"' else ''#-->> <label for="newzbin_bookmarks">$T('wizard-index-bookmark')</label><br />
|
||||
|
||||
|
||||
<h3><a href="http://nzbmatrix.com" target="_blank">NZBMatrix.com</a> ($T('wizard-optional'))</h3>
|
||||
<label class="label">$T('srv-username'):</label><input type="text" size="20" value="$matrix_user" name="matrix_user">
|
||||
<br class="clear" />
|
||||
<label class="label">$T('opt-apikey'):</label><input type="text" size="20" value="$matrix_apikey" name="matrix_apikey">
|
||||
</div></div>
|
||||
|
||||
<script type="text/javascript" src="static/javascript/jquery.js"></script>
|
||||
<script type="text/javascript" src="static/javascript/restart.js"></script>
|
||||
<br/><br/>
|
||||
<h4 id="restarting" class="align-center">$T('wizard-restarting')</h4>
|
||||
<h4 id="complete" class="align-center success hidden">$T('wizard-complete')</h4>
|
||||
<br />
|
||||
<br/>
|
||||
<div id="tips" class="hidden">
|
||||
$T('wizard-tip1') <span class="bold">$T('wizard-tip2')</span><br/>
|
||||
<!--#set $tip3 = $T('wizard-tip3') % ''#-->
|
||||
$tip3<br/><br/>
|
||||
<div class="quoteBlock">
|
||||
<!--#set $i = 0#-->
|
||||
<!--#for $url in $urls#-->
|
||||
<!--#set $i = $i+1#-->
|
||||
<a href="$url">$url</a><!--#if $i != len($urls)#--><br /><!--#end if#-->
|
||||
<!--#end for#-->
|
||||
</div><br/>
|
||||
$T('wizard-tip4')
|
||||
<br/><br/>
|
||||
$T('wizard-tip-wiki') <a href="$helpuri">wiki</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr /><br/>
|
||||
<div class="full-width">
|
||||
<table class="full-width">
|
||||
<tr>
|
||||
<td><input class="bigbutton" type="button" onclick="document.location ='./two'" value="‹ $T('wizard-previous')" /></td>
|
||||
<td>
|
||||
<div class="align-center">
|
||||
<!--#for $step in xrange($steps)#-->
|
||||
<!--#set $step = $step + 1#-->
|
||||
<span class="<!--#if $step == $number then 'selected' else 'unselected'#-->">$step</span>
|
||||
<!--#end for#-->
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-right"><input class="bigbutton" type="submit" value="$T('wizard-next') »" /></td>
|
||||
<tr class="align-center">
|
||||
<td><input type="hidden" name="session" id="apikey" value="$session"><input class="bigbutton disabled" type="button" onclick="document.location ='$access_url'" value="$T('wizard-goto')" disabled="disabled"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!--#include $webdir + "/inc_bottom.tmpl"#-->
|
||||
<!--#include $webdir + "/inc_bottom.tmpl"#-->
|
||||
108
make_dmg.py
Normal file
108
make_dmg.py
Normal file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python -OO
|
||||
#
|
||||
# Copyright 2008-2012 The SABnzbd-Team <team@sabnzbd.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print 'Usage: %s <release>' % os.path.split(sys.argv[0])[1]
|
||||
exit(1)
|
||||
|
||||
# Setup file names
|
||||
release = sys.argv[1]
|
||||
prod = 'SABnzbd-' + release
|
||||
fileDmg = prod + '-osx.dmg'
|
||||
fileOSr = prod + '-osx-src.tar.gz'
|
||||
fileImg = prod + '.sparseimage'
|
||||
builds = ('sl', 'lion', 'ml')
|
||||
build_folders = (
|
||||
'OS X 10.5 and 10.6 (Leopards)',
|
||||
'OS X 10.7 (Lion)',
|
||||
'OS X 10.8 (Mountain Lion)'
|
||||
)
|
||||
|
||||
# Check presense of all builds
|
||||
sharepath = os.environ.get('SHARE')
|
||||
if not (sharepath and os.path.exists(sharepath)):
|
||||
print 'Build share not defined or not found'
|
||||
exit(1)
|
||||
|
||||
build_paths = []
|
||||
for build in builds:
|
||||
path = os.path.join(sharepath,'%s-%s.cpio' % (prod, build))
|
||||
if os.path.exists(path):
|
||||
build_paths.append(path)
|
||||
else:
|
||||
print 'Missing build %s' % path
|
||||
exit(1)
|
||||
|
||||
# Create sparseimage from template
|
||||
os.system("unzip -o osx/image/template.sparseimage.zip")
|
||||
os.rename('template.sparseimage', fileImg)
|
||||
|
||||
# mount sparseimage and modify volume label
|
||||
os.system("hdiutil mount %s | grep /Volumes/SABnzbd >mount.log" % fileImg)
|
||||
|
||||
# Rename the volume
|
||||
fp = open('mount.log', 'r')
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
os.remove('mount.log')
|
||||
m = re.search(r'/dev/(\w+)\s+', data)
|
||||
volume = 'SABnzbd-' + str(release)
|
||||
os.system('diskutil rename %s %s' % (m.group(1), volume))
|
||||
|
||||
authority = os.environ.get('SIGNING_AUTH')
|
||||
|
||||
# Unpack build into image and sign if possible
|
||||
for build in xrange(len(builds)):
|
||||
vol_path = '/Volumes/%s/%s/' % (volume, build_folders[build])
|
||||
os.system('ditto -x -z "%s" "%s"' % (build_paths[build], vol_path))
|
||||
if authority:
|
||||
app_name = '%s-%s' % (volume, builds[build])
|
||||
os.system('codesign -f -i "%s" -s "%s" "%s/SABnzbd.app"' % (app_name, authority, vol_path))
|
||||
|
||||
|
||||
# Put README.rtf in root
|
||||
from_path = '/Volumes/%s/%s/SABnzbd.app/Contents/Resources/Credits.rtf' % (volume, build_folders[0])
|
||||
to_path = '/Volumes/%s/README.rtf' % volume
|
||||
os.system('cp "%s" "%s"' % (from_path, to_path))
|
||||
|
||||
# Unmount sparseimage
|
||||
print 'Eject volume'
|
||||
os.system("hdiutil eject /Volumes/%s/>/dev/null" % volume)
|
||||
|
||||
print 'Wait 1 second'
|
||||
os.system("sleep 1")
|
||||
|
||||
# Convert sparseimage to read-only compressed dmg
|
||||
print 'Create DMG file'
|
||||
if os.path.exists(fileDmg):
|
||||
os.remove(fileDmg)
|
||||
os.system("hdiutil convert %s -format UDBZ -o %s>/dev/null" % (fileImg, fileDmg))
|
||||
|
||||
# Remove sparseimage
|
||||
os.system("rm %s>/dev/null" % fileImg)
|
||||
|
||||
print 'Make image internet-enabled'
|
||||
os.system("hdiutil internet-enable %s" % fileDmg)
|
||||
|
||||
print 'Copy GZ file'
|
||||
os.system('cp "%s" .' % os.path.join(sharepath, fileOSr))
|
||||
BIN
osx/image/sabnzbd.png
Normal file
BIN
osx/image/sabnzbd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 388 B |
BIN
osx/resources/sab_clicked.tiff
Normal file
BIN
osx/resources/sab_clicked.tiff
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 902 B |
BIN
osx/resources/sab_idle.tiff
Normal file
BIN
osx/resources/sab_idle.tiff
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
osx/resources/sab_pause.tiff
Normal file
BIN
osx/resources/sab_pause.tiff
Normal file
Binary file not shown.
BIN
osx/unrar/unrar
BIN
osx/unrar/unrar
Binary file not shown.
188
package.py
188
package.py
@@ -34,12 +34,13 @@ except ImportError:
|
||||
try:
|
||||
import py2app
|
||||
from setuptools import setup
|
||||
OSX_LION = [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 7, 0]
|
||||
OSX_SL = not OSX_LION and [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 6, 0]
|
||||
OSX_LEOPARD = not (OSX_LION or OSX_SL)
|
||||
OSX_ML = [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 8, 0]
|
||||
OSX_LION = not OSX_ML and [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 7, 0]
|
||||
OSX_SL = not OSX_LION and not OSX_ML
|
||||
class WindowsError (): pass
|
||||
except ImportError:
|
||||
py2app = None
|
||||
|
||||
OSX_ML = OSX_LION = OSX_SL = False
|
||||
|
||||
VERSION_FILE = 'sabnzbd/version.py'
|
||||
VERSION_FILEAPP = 'osx/resources/InfoPlist.strings'
|
||||
@@ -47,8 +48,8 @@ VERSION_FILEAPP = 'osx/resources/InfoPlist.strings'
|
||||
my_version = 'unknown'
|
||||
my_baseline = 'unknown'
|
||||
|
||||
def DeleteFiles(name):
|
||||
''' Delete one file or set of files from wild-card spec '''
|
||||
def delete_files(name):
|
||||
""" Delete one file or set of files from wild-card spec """
|
||||
for f in glob.glob(name):
|
||||
try:
|
||||
if os.path.exists(f):
|
||||
@@ -151,8 +152,7 @@ def PairList(src):
|
||||
lst.append((path, flist))
|
||||
else:
|
||||
path, name = os.path.split(item)
|
||||
items = []
|
||||
items.append(name)
|
||||
items = [name]
|
||||
lst.append((path, items))
|
||||
return lst
|
||||
|
||||
@@ -207,7 +207,7 @@ def Dos2Unix(name):
|
||||
def Unix2Dos(name):
|
||||
""" Read file, remove \r, replace \n by \r\n and write back """
|
||||
base, ext = os.path.splitext(name)
|
||||
if ext.lower() not in ('.py', '.txt', '.css', '.js', '.tmpl', '.sh', '.cmd'):
|
||||
if ext.lower() not in ('.py', '.txt', '.css', '.js', '.tmpl', '.sh', '.cmd', '.mkd'):
|
||||
return
|
||||
|
||||
print name
|
||||
@@ -230,9 +230,9 @@ def Unix2Dos(name):
|
||||
|
||||
|
||||
def rename_file(folder, old, new):
|
||||
oldpath = "%s/%s" % (folder, old)
|
||||
newpath = "%s/%s" % (folder, new)
|
||||
try:
|
||||
oldpath = "%s/%s" % (folder, old)
|
||||
newpath = "%s/%s" % (folder, new)
|
||||
if os.path.exists(newpath):
|
||||
os.remove(newpath)
|
||||
os.rename(oldpath, newpath)
|
||||
@@ -246,6 +246,11 @@ print sys.argv[0]
|
||||
Git = CheckPath('git')
|
||||
ZipCmd = CheckPath('zip')
|
||||
UnZipCmd = CheckPath('unzip')
|
||||
if os.name != 'nt':
|
||||
PanDoc = CheckPath('pandoc')
|
||||
else:
|
||||
PanDoc = None
|
||||
|
||||
if os.name == 'nt':
|
||||
msg = 'Requires the standard version of NSIS'
|
||||
NSIS = CheckPath('makensis')
|
||||
@@ -254,7 +259,7 @@ if os.name == 'nt':
|
||||
os.system('%s >%s' % (NSIS, log))
|
||||
if 'Unicode' not in open(log).read():
|
||||
msg = ''
|
||||
DeleteFiles(log)
|
||||
delete_files(log)
|
||||
if msg:
|
||||
print msg
|
||||
exit(1)
|
||||
@@ -293,11 +298,14 @@ Win32TempName = 'SABnzbd-windows.exe'
|
||||
fileIns = prod + '-win32-setup.exe'
|
||||
fileBin = prod + '-win32-bin.zip'
|
||||
fileSrc = prod + '-src.tar.gz'
|
||||
fileDmg = prod + '-osx.dmg'
|
||||
fileDmgLp = prod + '-osx-leopard.dmg'
|
||||
fileDmg_ml = prod + '-osx-mountainlion.dmg'
|
||||
fileDmg_lion = prod + '-osx-lion.dmg'
|
||||
fileDmg_sl = prod + '-osx-snowleopard.dmg'
|
||||
fileOSr = prod + '-osx-src.tar.gz'
|
||||
fileImg = prod + '.sparseimage'
|
||||
|
||||
if OSX_SL: postfix = 'sl'
|
||||
if OSX_LION: postfix = 'lion'
|
||||
if OSX_ML: postfix = 'ml'
|
||||
|
||||
PatchVersion(release)
|
||||
|
||||
@@ -305,7 +313,7 @@ PatchVersion(release)
|
||||
# List of data elements, directories end with a '/'
|
||||
data_files = [
|
||||
'ABOUT.txt',
|
||||
'README.txt',
|
||||
'README.mkd',
|
||||
'INSTALL.txt',
|
||||
'GPL2.txt',
|
||||
'GPL3.txt',
|
||||
@@ -351,34 +359,19 @@ if target == 'app':
|
||||
os.system(GitRevertVersion)
|
||||
exit(1)
|
||||
|
||||
if not PanDoc:
|
||||
print "Sorry, requires pandoc in the $PATH"
|
||||
os.system(GitRevertVersion)
|
||||
exit(1)
|
||||
|
||||
# Check which Python flavour
|
||||
apple_py = 'ActiveState' not in sys.copyright
|
||||
|
||||
if OSX_LION:
|
||||
# Check if Leopard build is present
|
||||
leopard_build = '/project/leopard/%s' % str(my_version)
|
||||
if not os.path.isdir(leopard_build):
|
||||
print 'Leopard build not found at %s' % leopard_build
|
||||
exit(1)
|
||||
|
||||
# Create sparseimage from template
|
||||
os.system("unzip -o osx/image/template.sparseimage.zip")
|
||||
os.rename('template.sparseimage', fileImg)
|
||||
|
||||
# mount sparseimage and modify volume label
|
||||
os.system("hdiutil mount %s | grep /Volumes/SABnzbd >mount.log" % (fileImg))
|
||||
|
||||
# Rename the volume
|
||||
fp = open('mount.log', 'r')
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
os.remove('mount.log')
|
||||
m = re.search(r'/dev/(\w+)\s+', data)
|
||||
volume = 'SABnzbd-' + str(my_version)
|
||||
os.system('disktool -n %s %s' % (m.group(1), volume))
|
||||
|
||||
options['description'] = 'SABnzbd ' + str(my_version)
|
||||
|
||||
# Remove previous build result
|
||||
os.system('rm -rf dist/ build/')
|
||||
|
||||
# Create MO files
|
||||
os.system('python ./tools/make_mo.py')
|
||||
|
||||
@@ -389,7 +382,7 @@ if target == 'app':
|
||||
DATA_FILES = ['interfaces', 'locale', 'email', ('', glob.glob("osx/resources/*"))]
|
||||
|
||||
NZBFILE = dict(
|
||||
CFBundleTypeExtensions = [ "nzb","zip","rar" ],
|
||||
CFBundleTypeExtensions = [ "nzb" ],
|
||||
CFBundleTypeIconFile = 'nzbfile.icns',
|
||||
CFBundleTypeMIMETypes = [ "text/nzb" ],
|
||||
CFBundleTypeName = 'NZB File',
|
||||
@@ -418,70 +411,64 @@ if target == 'app':
|
||||
setup_requires=['py2app'],
|
||||
)
|
||||
|
||||
# copy unrar & par2 binary to avoid striping
|
||||
# Remove 64bit code
|
||||
if not OSX_SL:
|
||||
os.system("mv dist/SABnzbd.app dist/SABnzbd.app.temp")
|
||||
os.system("ditto --arch i386 --arch ppc dist/SABnzbd.app.temp dist/SABnzbd.app/")
|
||||
os.system("rm -rf dist/SABnzbd.app.temp")
|
||||
|
||||
# copy unrar & par2 binary
|
||||
os.system("mkdir dist/SABnzbd.app/Contents/Resources/osx>/dev/null")
|
||||
os.system("mkdir dist/SABnzbd.app/Contents/Resources/osx/par2>/dev/null")
|
||||
os.system("cp -pR osx/par2/ dist/SABnzbd.app/Contents/Resources/osx/par2>/dev/null")
|
||||
os.system("mkdir dist/SABnzbd.app/Contents/Resources/osx/unrar>/dev/null")
|
||||
os.system("cp -pR osx/unrar/license.txt dist/SABnzbd.app/Contents/Resources/osx/unrar/ >/dev/null")
|
||||
if OSX_LION:
|
||||
os.system("cp -pR osx/unrar/unrar dist/SABnzbd.app/Contents/Resources/osx/unrar/ >/dev/null")
|
||||
else:
|
||||
if OSX_SL:
|
||||
os.system("cp -pR osx/unrar/unrar-leopard dist/SABnzbd.app/Contents/Resources/osx/unrar/unrar >/dev/null")
|
||||
else:
|
||||
os.system("cp -pR osx/unrar/unrar dist/SABnzbd.app/Contents/Resources/osx/unrar/ >/dev/null")
|
||||
os.system("cp icons/sabnzbd.ico dist/SABnzbd.app/Contents/Resources >/dev/null")
|
||||
os.system("cp README.rtf dist/SABnzbd.app/Contents/Resources/Credits.rtf >/dev/null")
|
||||
os.system("pandoc -f markdown -t rtf -s -o dist/SABnzbd.app/Contents/Resources/Credits.rtf README.mkd >/dev/null")
|
||||
os.system("find dist/SABnzbd.app -name .git | xargs rm -rf")
|
||||
|
||||
# Remove source files to prevent re-compilation, which would invalidate signing
|
||||
py_ver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
|
||||
os.system("find dist/SABnzbd.app/Contents/Resources/lib/python%s/Cheetah -name '*.py' | xargs rm" % py_ver)
|
||||
os.system("find dist/SABnzbd.app/Contents/Resources/lib/python%s/xml -name '*.py' | xargs rm" % py_ver)
|
||||
os.remove('dist/SABnzbd.app/Contents/Resources/site.py')
|
||||
os.system('rm dist/SABnzbd.app/Contents/Resources/site.py')
|
||||
|
||||
# Add the SabNotifier app
|
||||
if OSX_ML and os.path.exists(os.path.join(os.environ['HOME'], 'sabnotifier/SABnzbd.app')):
|
||||
os.system("cp -pR $HOME/sabnotifier/SABnzbd.app dist/SABnzbd.app/Contents/Resources/")
|
||||
|
||||
# Add License files
|
||||
os.mkdir("dist/SABnzbd.app/Contents/Resources/licenses/")
|
||||
os.system("cp -p licenses/*.txt dist/SABnzbd.app/Contents/Resources/licenses/")
|
||||
os.system("cp -p *.txt dist/SABnzbd.app/Contents/Resources/licenses/")
|
||||
|
||||
os.system("sleep 5")
|
||||
|
||||
if OSX_LION:
|
||||
# Sign the App if possible
|
||||
authority = os.environ.get('SIGNING_AUTH')
|
||||
if authority:
|
||||
os.system('codesign -f -i "%s-lion" -s "%s" dist/SABnzbd.app' % (volume, authority))
|
||||
os.system('codesign -f -i "%s-leopard" -s "%s" %s/dist/SABnzbd.app' % (volume, authority, leopard_build))
|
||||
|
||||
# copy app to mounted sparseimage
|
||||
os.system('cp -r dist/SABnzbd.app "/Volumes/%s/OS X 10.6 and Above/" >/dev/null' % volume)
|
||||
|
||||
# Copy the Leopard build
|
||||
os.system('cp -r %s/dist/SABnzbd.app "/Volumes/%s/OS X 10.5 and Below/" >/dev/null' % (leopard_build, volume))
|
||||
|
||||
print 'Create src %s' % fileOSr
|
||||
os.system('tar -czf %s --exclude ".git*" --exclude "sab*.zip" --exclude "SAB*.tar.gz" --exclude "*.cmd" --exclude "*.pyc" '
|
||||
'--exclude "*.sparseimage*" --exclude "dist" --exclude "build" --exclude "*.nsi" --exclude "win" --exclude "*.dmg" '
|
||||
'./ >/dev/null' % (fileOSr) )
|
||||
|
||||
# Copy README.txt
|
||||
os.system("cp README.rtf /Volumes/%s/" % volume)
|
||||
|
||||
#Unmount sparseimage
|
||||
os.system("hdiutil eject /Volumes/%s/>/dev/null" % volume)
|
||||
|
||||
os.system("sleep 5")
|
||||
# Convert sparseimage to read only compressed dmg
|
||||
if os.path.exists(fileDmg):
|
||||
os.remove(fileDmg)
|
||||
os.system("hdiutil convert %s -format UDBZ -o %s>/dev/null" % (fileImg, fileDmg))
|
||||
# Remove sparseimage
|
||||
os.system("rm %s>/dev/null" % (fileImg))
|
||||
|
||||
# Make image internet-enabled
|
||||
os.system("hdiutil internet-enable %s" % fileDmg)
|
||||
# Archive result to share, if present
|
||||
dest_path = os.environ.get('SHARE')
|
||||
if dest_path and os.path.exists(dest_path):
|
||||
cpio_path = os.path.join(dest_path, prod) + '-' + postfix + '.cpio'
|
||||
print 'Create CPIO file %s' % cpio_path
|
||||
delete_files(cpio_path)
|
||||
os.system('ditto -c -z dist/ "%s"' % cpio_path)
|
||||
else:
|
||||
dest = '/Volumes/VMware Shared Folders/leopard/%s' % str(my_version)
|
||||
os.system('rm -rf "%s"' % dest)
|
||||
os.makedirs('%s/dist' % dest)
|
||||
os.system('cp -r dist/SABnzbd.app "%s/dist/" >/dev/null' % dest)
|
||||
print 'No SHARE variable set, build result not copied'
|
||||
|
||||
if OSX_ML:
|
||||
print 'Create src %s' % fileOSr
|
||||
delete_files(fileOSr)
|
||||
os.system('tar -czf "%s" --exclude ".git*" --exclude "sab*.zip" --exclude "SAB*.tar.gz" --exclude "*.cmd" --exclude "*.pyc" '
|
||||
'--exclude "*.sparseimage*" --exclude "dist" --exclude "build" --exclude "*.nsi" --exclude "win" --exclude "*.dmg" '
|
||||
'./ >/dev/null' % os.path.join(dest_path, fileOSr) )
|
||||
|
||||
os.system(GitRevertApp + VERSION_FILEAPP)
|
||||
os.system(GitRevertApp + VERSION_FILE)
|
||||
|
||||
|
||||
elif target in ('binary', 'installer'):
|
||||
if not py2exe:
|
||||
print "Sorry, only works on Windows!"
|
||||
@@ -521,12 +508,12 @@ elif target in ('binary', 'installer'):
|
||||
for tup in options['data_files']:
|
||||
for file in tup[1]:
|
||||
name, ext = os.path.splitext(file)
|
||||
if ext.lower() in ('.txt', '.cmd'):
|
||||
if ext.lower() in ('.txt', '.cmd', '.mkd'):
|
||||
Unix2Dos("dist/%s" % file)
|
||||
DeleteFiles('dist/Sample-PostProc.sh')
|
||||
DeleteFiles('dist/PKG-INFO')
|
||||
delete_files('dist/Sample-PostProc.sh')
|
||||
delete_files('dist/PKG-INFO')
|
||||
|
||||
DeleteFiles('*.ini')
|
||||
delete_files('*.ini')
|
||||
|
||||
############################
|
||||
# Generate the windowed-app
|
||||
@@ -563,14 +550,14 @@ elif target in ('binary', 'installer'):
|
||||
|
||||
############################
|
||||
# Remove unwanted system DLL files that Py2Exe copies when running on Win7
|
||||
DeleteFiles(r'dist\lib\API-MS-Win-*.dll')
|
||||
DeleteFiles(r'dist\lib\MSWSOCK.DLL')
|
||||
DeleteFiles(r'dist\lib\POWRPROF.DLL')
|
||||
DeleteFiles(r'dist\lib\KERNELBASE.dll')
|
||||
delete_files(r'dist\lib\API-MS-Win-*.dll')
|
||||
delete_files(r'dist\lib\MSWSOCK.DLL')
|
||||
delete_files(r'dist\lib\POWRPROF.DLL')
|
||||
delete_files(r'dist\lib\KERNELBASE.dll')
|
||||
|
||||
############################
|
||||
# Remove .git residue
|
||||
DeleteFiles(r'dist\interfaces\Config\.git')
|
||||
delete_files(r'dist\interfaces\Config\.git')
|
||||
|
||||
############################
|
||||
# Copy Curl if needed
|
||||
@@ -582,17 +569,21 @@ elif target in ('binary', 'installer'):
|
||||
# Fix icon issue with NZB association
|
||||
os.system(r'copy dist\icons\nzb.ico dist')
|
||||
|
||||
############################
|
||||
# Rename MKD file
|
||||
rename_file('dist', 'README.mkd', 'README.txt')
|
||||
|
||||
############################
|
||||
if target == 'installer':
|
||||
DeleteFiles(fileIns)
|
||||
delete_files(fileIns)
|
||||
os.system('makensis.exe /v3 /DSAB_PRODUCT=%s /DSAB_VERSION=%s /DSAB_FILE=%s NSIS_Installer.nsi.tmp' % \
|
||||
(prod, release, fileIns))
|
||||
DeleteFiles('NSIS_Installer.nsi.tmp')
|
||||
delete_files('NSIS_Installer.nsi.tmp')
|
||||
if not os.path.exists(fileIns):
|
||||
print 'Fatal error creating %s' % fileIns
|
||||
exit(1)
|
||||
|
||||
DeleteFiles(fileBin)
|
||||
delete_files(fileBin)
|
||||
os.rename('dist', prod)
|
||||
os.system('zip -9 -r -X %s %s' % (fileBin, prod))
|
||||
time.sleep(1.0)
|
||||
@@ -659,6 +650,10 @@ else:
|
||||
shutil.copy2(file, dest)
|
||||
Dos2Unix(fullname)
|
||||
|
||||
############################
|
||||
# Rename MKD file
|
||||
rename_file(root, 'README.mkd', 'README.txt')
|
||||
|
||||
os.chdir(root)
|
||||
os.chdir('..')
|
||||
|
||||
@@ -666,4 +661,3 @@ else:
|
||||
CreateTar('srcdist', fileSrc, prod)
|
||||
|
||||
os.system(GitRevertVersion)
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-04-28 12:01+0000\n"
|
||||
"PO-Revision-Date: 2012-03-14 04:51+0000\n"
|
||||
"Last-Translator: Rene <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-08-03 17:24+0000\n"
|
||||
"Last-Translator: shypike <Unknown>\n"
|
||||
"Language-Team: Danish <da@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: 2012-04-29 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 15149)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-04 05:38+0000\n"
|
||||
"X-Generator: Launchpad (build 15742)\n"
|
||||
|
||||
#: email/email.tmpl:1
|
||||
msgid ""
|
||||
@@ -65,42 +65,42 @@ msgid ""
|
||||
"<!--#end if#-->\n"
|
||||
msgstr ""
|
||||
"##\n"
|
||||
"## Default Email template for SABnzbd\n"
|
||||
"## This a Cheetah template\n"
|
||||
"## Documentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"## Standard Email skabelon til SABnzbd\n"
|
||||
"## Dette er en Cheetah skabelon\n"
|
||||
"## Dokumentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"##\n"
|
||||
"## Newlines and whitespace are significant!\n"
|
||||
"## Linjeskift og blanktegn er betydelig!\n"
|
||||
"##\n"
|
||||
"## These are the email headers\n"
|
||||
"## Disse er e-mail-headerne \n"
|
||||
"To: $to\n"
|
||||
"From: $from\n"
|
||||
"Date: $date\n"
|
||||
"Subject: SABnzbd has <!--#if $status then \"completed\" else \"failed\" #--> "
|
||||
"Subject: SABnzbd har <!--#if $status then \"hentet\" else \"fejlet\" #--> "
|
||||
"job $name\n"
|
||||
"X-priority: 5\n"
|
||||
"X-MS-priority: 5\n"
|
||||
"## After this comes the body, the empty line is required!\n"
|
||||
"## Efter dette kommer body, den tomme linje kræves!\n"
|
||||
"\n"
|
||||
"Hej,\n"
|
||||
"<!--#if $status #-->\n"
|
||||
"SABnzbd har downloaded \"$name\" <!--#if $msgid==\"\" then \"\" else "
|
||||
"\"(newzbin #\" + $msgid + \")\"#-->\n"
|
||||
"SABnzbd har hentet \"$name\" <!--#if $msgid==\"\" then \"\" else \"(newzbin "
|
||||
"#\" + $msgid + \")\"#-->\n"
|
||||
"<!--#else#-->\n"
|
||||
"SABnzbd har ikke downloaded \"$name\" <!--#if $msgid==\"\" then \"\" else "
|
||||
"SABnzbd kunne ikke hente \"$name\" <!--#if $msgid==\"\" then \"\" else "
|
||||
"\"(newzbin #\" + $msgid + \")\"#-->\n"
|
||||
"<!--#end if#-->\n"
|
||||
"Færdig kl. $end_time\n"
|
||||
"Downloaded $size\n"
|
||||
"Hentet $size\n"
|
||||
"\n"
|
||||
"Resultat af job:\n"
|
||||
"<!--#for $stage in $stages #-->\n"
|
||||
"Stage $stage <!--#slurp#-->\n"
|
||||
"Etape $stage <!--#slurp#-->\n"
|
||||
"<!--#for $result in $stages[$stage]#-->\n"
|
||||
" $result <!--#slurp#-->\n"
|
||||
"<!--#end for#-->\n"
|
||||
"<!--#end for#-->\n"
|
||||
"<!--#if $script!=\"\" #-->\n"
|
||||
"Output from user script \"$script\" (Exit code = $script_ret):\n"
|
||||
"Output fra bruger script \"$script\" (Exit code = $script_ret):\n"
|
||||
"$script_output\n"
|
||||
"<!--#end if#-->\n"
|
||||
"<!--#if $status #-->\n"
|
||||
@@ -138,20 +138,20 @@ msgid ""
|
||||
"Bye\n"
|
||||
msgstr ""
|
||||
"##\n"
|
||||
"## RSS Email template for SABnzbd\n"
|
||||
"## This a Cheetah template\n"
|
||||
"## Documentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"## RSS Email skabelon til SABnzbd\n"
|
||||
"## Dette er Cheetah skabelon\n"
|
||||
"## Dokumentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"##\n"
|
||||
"## Newlines and whitespace are significant!\n"
|
||||
"## Linjeskift og blanktegn er betydelig!\n"
|
||||
"##\n"
|
||||
"## These are the email headers\n"
|
||||
"## Dette er email headers\n"
|
||||
"To: $to\n"
|
||||
"From: $from\n"
|
||||
"Date: $date\n"
|
||||
"Subject: SABnzbd har tilføjet $antal jobs til køen\n"
|
||||
"X-priority: 5\n"
|
||||
"X-MS-priority: 5\n"
|
||||
"## After this comes the body, the empty line is required!\n"
|
||||
"## Efter dette kommer body, den tomme linje kræves!\n"
|
||||
"\n"
|
||||
"Hej,\n"
|
||||
"\n"
|
||||
@@ -189,24 +189,24 @@ msgid ""
|
||||
"Bye\n"
|
||||
msgstr ""
|
||||
"##\n"
|
||||
"## Bad URL Fetch Email template for SABnzbd\n"
|
||||
"## This a Cheetah template\n"
|
||||
"## Documentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"## Dårlig URL Fetch E-mail skabelon for SABnzbd\n"
|
||||
"## Dette er en Cheetah skabelon\n"
|
||||
"## Dokumentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"##\n"
|
||||
"## Newlines and whitespace are significant!\n"
|
||||
"## Linjeskift og blanktegn er betydelig!\n"
|
||||
"##\n"
|
||||
"## These are the email headers\n"
|
||||
"## Dette er email headers\n"
|
||||
"To: $to\n"
|
||||
"From: $from\n"
|
||||
"Date: $date\n"
|
||||
"Subject: SABnzbd failed to fetch an NZB\n"
|
||||
"Subject: SABnzbd kunne ikke hente en NZB\n"
|
||||
"X-priority: 5\n"
|
||||
"X-MS-priority: 5\n"
|
||||
"## After this comes the body, the empty line is required!\n"
|
||||
"## Efter dette kommer body, den tomme linje kræves!\n"
|
||||
"\n"
|
||||
"Hi,\n"
|
||||
"Hej,\n"
|
||||
"\n"
|
||||
"SABnzbd has failed to retrieve the NZB from $url.\n"
|
||||
"The error message was: $msg\n"
|
||||
"SABnzbd kunne ikke hente NZB fra $url.\n"
|
||||
"Fejl meddelelsen er: $msg\n"
|
||||
"\n"
|
||||
"Bye\n"
|
||||
"Farvel\n"
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-04-28 12:01+0000\n"
|
||||
"PO-Revision-Date: 2011-06-26 10:50+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2012-12-28 10:58+0000\n"
|
||||
"Last-Translator: Thomas Lucke (Lucky) <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: 2012-04-29 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 15149)\n"
|
||||
"X-Launchpad-Export-Date: 2012-12-29 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 16378)\n"
|
||||
|
||||
#: email/email.tmpl:1
|
||||
msgid ""
|
||||
@@ -189,3 +189,24 @@ msgid ""
|
||||
"\n"
|
||||
"Bye\n"
|
||||
msgstr ""
|
||||
"## Translation by Thomas Lucke (Lucky)\n"
|
||||
"##\n"
|
||||
"## Bad URL Fetch Email template for SABnzbd\n"
|
||||
"## This a Cheetah template\n"
|
||||
"## Documentation: http://sabnzbd.wikidot.com/email-templates\n"
|
||||
"##\n"
|
||||
"## Newlines and whitespace are significant!\n"
|
||||
"##\n"
|
||||
"## These are the email headers\n"
|
||||
"To: $to\n"
|
||||
"From: $from\n"
|
||||
"Date: $date\n"
|
||||
"Subject: SABnzbd konnte eine NZB-Datei nicht herunterladen\n"
|
||||
"X-priority: 5\n"
|
||||
"X-MS-priority: 5\n"
|
||||
"## After this comes the body, the empty line is required!\n"
|
||||
"\n"
|
||||
"Hallo,\n"
|
||||
"\n"
|
||||
"SABnzbd konnte die NZB-Datei von $url nicht herrunterladen.\n"
|
||||
"Die Fehlermeldung war: $msg\n"
|
||||
|
||||
2204
po/main/SABnzbd.pot
2204
po/main/SABnzbd.pot
File diff suppressed because it is too large
Load Diff
2074
po/main/da.po
2074
po/main/da.po
File diff suppressed because it is too large
Load Diff
2083
po/main/de.po
2083
po/main/de.po
File diff suppressed because it is too large
Load Diff
2091
po/main/es.po
2091
po/main/es.po
File diff suppressed because it is too large
Load Diff
2094
po/main/fr.po
2094
po/main/fr.po
File diff suppressed because it is too large
Load Diff
2075
po/main/nb.po
2075
po/main/nb.po
File diff suppressed because it is too large
Load Diff
2097
po/main/nl.po
2097
po/main/nl.po
File diff suppressed because it is too large
Load Diff
2083
po/main/pl.px
2083
po/main/pl.px
File diff suppressed because it is too large
Load Diff
2076
po/main/pt_BR.po
2076
po/main/pt_BR.po
File diff suppressed because it is too large
Load Diff
2078
po/main/ro.px
2078
po/main/ro.px
File diff suppressed because it is too large
Load Diff
2130
po/main/sv.po
2130
po/main/sv.po
File diff suppressed because it is too large
Load Diff
@@ -13,71 +13,71 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=ASCII\n"
|
||||
"Content-Transfer-Encoding: 7bit\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid " >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid "This system requires the Microsoft runtime library VC90 to be installed first. Do you want to do that now?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid "You cannot overwrite an existing installation. \\n\\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"PO-Revision-Date: 2012-05-03 03:22+0000\n"
|
||||
"Last-Translator: Rene <Unknown>\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-12-28 11:02+0000\n"
|
||||
"Last-Translator: Steffen Thomsen <urskov@gmail.com>\n"
|
||||
"Language-Team: Danish <da@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: 2012-05-04 05:14+0000\n"
|
||||
"X-Generator: Launchpad (build 15195)\n"
|
||||
"X-Launchpad-Export-Date: 2012-12-29 05:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16378)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Gå til SABnzbd Wiki"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Vis udgivelsesbemærkninger"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Støtte projektet, donere!"
|
||||
msgstr "Støt projektet, donér!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Luk 'SABnzbd.exe' først"
|
||||
msgstr "Luk venligst \"SABnzbd.exe\" først"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -42,61 +42,62 @@ msgstr ""
|
||||
"produktbemærkningerne eller gå til http://wiki.sabnzbd.org/introducing-0-7-0 "
|
||||
"!"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Dette vil afinstallere SABnzbd fra dit system"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Kør ved opstart"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Skrivebords ikon"
|
||||
msgstr "Skrivebordsikon"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "NZB filtilknytning"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Slet program"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Slet instillinger"
|
||||
msgstr "Slet indstillinger"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
msgstr ""
|
||||
"Dette system kræver, at Microsoft runtime biblioteket VC90, der skal "
|
||||
"installeres først. Ønsker du at gøre det nu?"
|
||||
"Dette system kræver, at Microsoft runtime biblioteket VC90 skal installeres "
|
||||
"først. Ønsker du at gøre det nu?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Downloading Microsoft runtime installer..."
|
||||
msgstr "Downloader Microsoft runtime installationsfil..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Download fejl, prøv igen?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Kan ikke installere uden runtime bibliotek, prøv igen?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
msgstr ""
|
||||
"Du kan ikke overskrive en eksisterende installation. Klik `OK` for at fjerne "
|
||||
"den tidligere version eller `Annuller` for at annullere denne opgradering."
|
||||
"Du kan ikke overskrive en eksisterende installation. \\n\\nKlik `OK` for at "
|
||||
"fjerne den tidligere version eller `Annuller` for at annullere denne "
|
||||
"opgradering."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Dine indstillinger og data vil blive opbevaret."
|
||||
msgstr "Dine indstillinger og data vil blive bevaret."
|
||||
|
||||
#~ msgid "Start SABnzbd (hidden)"
|
||||
#~ msgstr "Start SABnzbd"
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-04 14:06+0000\n"
|
||||
"Last-Translator: shypike <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: 2012-05-05 05:41+0000\n"
|
||||
"X-Generator: Launchpad (build 15195)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Gehen Sie auf die SABnzbd Wiki-Seite"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Versionshinweise anzeigen"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Bitte unterstützen Sie das Projekt durch eine Spende!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Schliessen Sie bitte zuerst \"SABnzbd.exe\"."
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -42,31 +42,31 @@ msgstr ""
|
||||
"Versionshinweise oder gehen Sie zu http://wiki.sabnzbd.org/introducing-0-7-0 "
|
||||
"!"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Dies entfernt SABnzbd von Ihrem System"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Beim Systemstart ausführen"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Desktop-Symbol"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "Mit NZB-Dateien verknüpfen"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Programm löschen"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Einstellungen löschen"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -74,22 +74,22 @@ msgstr ""
|
||||
"Dieses System erfordert die Installation der Laufzeitbibliothek VC90 von "
|
||||
"Microsoft. Möchten Sie die Installation jetzt durchführen?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr ""
|
||||
"Installationsprogramm für Microsoft-Laufzeitbibliothek wird "
|
||||
"heruntergeladen..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Download-Fehler. Erneut versuchen?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr ""
|
||||
"Installation ohne Laufzeitbibliothek nicht möglich. Erneut versuchen?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -98,7 +98,7 @@ msgstr ""
|
||||
"Sie 'OK', um die vorherige Version zu entfernen oder 'Abbrechen' um die "
|
||||
"Aktualisierung abzubrechen."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Ihre Einstellungen und Daten bleiben erhalten."
|
||||
|
||||
|
||||
@@ -7,63 +7,65 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"PO-Revision-Date: 2012-06-07 03:07+0000\n"
|
||||
"Last-Translator: Carlos Hernandez <imaginingdreamer@yahoo.com>\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-07-30 09:38+0000\n"
|
||||
"Last-Translator: Victor Herrero <victorhera@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@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: 2012-06-08 05:13+0000\n"
|
||||
"X-Generator: Launchpad (build 15376)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Ir al wiki de SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Mostrar notas de la versión"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "¡Apoye el proyecto, haga una donación!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Por favor cierre primero \"SABnzbd.exe\""
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
msgstr ""
|
||||
" >>>> ATENCION <<<<\\r\\n\\r\\nPor favor, compruebe las "
|
||||
"notas de version o visite http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Esto desinstalará SABnzbd de su sistema"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Ejecutar al inicio"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Icono del escritorio"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "Asociación de archivos NZB"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Eliminar programa"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Eliminar Ajustes"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -71,20 +73,20 @@ msgstr ""
|
||||
"Este sistema requiere la ejecución de la biblioteca Microsoft runtime VC90 "
|
||||
"que debe ser instalada. ¿Quieres hacerlo ahora?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Descargando el instalador de Microsoft runtime..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Error en la descarga, ¿probamos de nuevo?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr ""
|
||||
"No se puede instalar sin la biblioteca runtime, ¿Lo volvemos a intentar?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -92,7 +94,7 @@ msgstr ""
|
||||
"No es posible sobrescribir una instalación existente. \\n\\nPresione `OK' "
|
||||
"para quitar la versión anterior o 'Cancelar' para cancelar la actualización."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Tus ajustes y datos se mantendrán intactos."
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-02 15:56+0000\n"
|
||||
"Last-Translator: Fox Ace <Unknown>\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: 2012-05-03 05:55+0000\n"
|
||||
"X-Generator: Launchpad (build 15185)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Aller sur le Wiki de SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Afficher les notes de version"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Supportez le projet, faites un don !"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Quittez \"SABnzbd.exe\" avant l'installation, SVP"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -42,31 +42,31 @@ msgstr ""
|
||||
"vérifiez d'abord les notes de version ou consultez "
|
||||
"http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Ceci désinstallera SABnzbd de votre système"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Lancer au démarrage"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Icône sur le Bureau"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "Association des fichiers NZB"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Supprimer le programme"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Supprimer les Paramètres"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -74,19 +74,19 @@ msgstr ""
|
||||
"Ce système nécessite que la bibliothèque d'exécution Microsoft vc90 soit "
|
||||
"installée en premier. Voulez-vous le faire maintenant?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Téléchargement de Microsoft runtime installateur ..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Erreur téléchargement, réessayer?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Impossible d'installer sans bibliothèque d'exécution, réessayer?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -95,7 +95,7 @@ msgstr ""
|
||||
"pour supprimer la version précédente ou `Annuler` pour annuler cette mise à "
|
||||
"niveau."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Vos paramètres et les données seront conservées."
|
||||
|
||||
|
||||
@@ -7,86 +7,86 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2011-06-26 10:50+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Norwegian Bokmal <nb@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: 2012-05-02 05:52+0000\n"
|
||||
"X-Generator: Launchpad (build 15177)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
msgstr ""
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr ""
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-01 18:56+0000\n"
|
||||
"Last-Translator: shypike <Unknown>\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: 2012-05-02 05:52+0000\n"
|
||||
"X-Generator: Launchpad (build 15177)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Ga naar de SABnzbd Wiki"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Toon vrijgave bericht"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Steun het project, Doneer!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Sluit \"SABnzbd.exe\" eerst af"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -41,31 +41,31 @@ msgstr ""
|
||||
" >>>> WAARSCHUWING <<<<\\\\r\\\\n\\\\r\\\\nLees eerst het "
|
||||
"vrijgave bericht of ga naar http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Dit verwijdert SABnzbd van je systeem"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Opstarten bij systeem start"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Pictogram op bureaublad"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "NZB bestanden koppelen aan SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Verwijder programma"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Verwijder instellingen"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -73,19 +73,19 @@ msgstr ""
|
||||
"Op dit systeem moeten eerst de Microsoft runtime bibliotheek VC90 "
|
||||
"geïnstalleerd worden. Wilt u dat nu doen?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Downloaden van de Microsoft bibliotheek"
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Download mislukt, opnieuw?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Installeren heeft geen zin zonder de bibliotheek, opnieuw?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -93,7 +93,7 @@ msgstr ""
|
||||
"U kunt geen bestaande installatie overschrijven.\\n\\nKlik op `OK` om de "
|
||||
"vorige versie te verwijderen of op `Annuleren` om te stoppen."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Je instellingen en bestanden blijven behouden."
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-02 10:07+0000\n"
|
||||
"Last-Translator: Tomasz 'Zen' Napierala <tomasz@napierala.org>\n"
|
||||
"Language-Team: Polish <pl@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: 2012-05-03 05:55+0000\n"
|
||||
"X-Generator: Launchpad (build 15185)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Idź do wiki SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Pokaż informacje o wydaniu"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Wspomóż projekt!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Najpierw zamknij SABnzbd.exe"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -41,31 +41,31 @@ msgstr ""
|
||||
" >>>> UWAGA <<<<\\r\\n\\r\\nNajpierw przeczytaj informacje "
|
||||
"o wydaniu lub odwiedź http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "To odinstaluje SABnzbd z systemu"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Uruchom wraz z systemem"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Ikona pulpitu"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "powiązanie pliku NZB"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Usuń program"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Skasuj obecne ustawienia"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -73,19 +73,19 @@ msgstr ""
|
||||
"Ten system wymaga najpierw zainstalowania bibliotek Microsoft VC90. Czy "
|
||||
"chcesz wykonać teraz instalację?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Pobieranie instalatora bibliotek Microsoft..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Problem z pobieraniem, spróbować ponownie?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Nie można wykonać instalacji bez bibliotek, spróbować ponownie?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -93,7 +93,7 @@ msgstr ""
|
||||
"Nie można nadpisać istniejącej instalacji. \\n\\n Naciśnij `OK`, aby usunąć "
|
||||
"poprzednia wersję lub `Anuluj` aby anulować aktualizację."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Twoje ustawienia i dane zostaną zachowane."
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-06-17 03:09+0000\n"
|
||||
"Last-Translator: lrrosa <Unknown>\n"
|
||||
"Language-Team: Brazilian Portuguese <pt_BR@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: 2012-06-18 05:39+0000\n"
|
||||
"X-Generator: Launchpad (build 15419)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Vá para a Wiki do SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Mostrar Notas de Lançamento"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Apoie o projeto. Faça uma doação!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Por favor, feche \"SABnzbd.exe\" primeiro"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -41,31 +41,31 @@ msgstr ""
|
||||
" >>>> ATENÇÃO <<<<\\r\\n\\r\\nPor favor, verifique primeiro "
|
||||
"as notas de lançamento ou vá até http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Isso irá desinstalar SABnzbd de seu sistema"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Executar na inicialização"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Ícone na Área de Trabalho"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "Associação com Arquivos NZB"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Excluir o Programa"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Apagar Configurações"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -73,19 +73,19 @@ msgstr ""
|
||||
"Este sistema precisa que a biblioteca runtime Microsoft VC90 seja instalada "
|
||||
"antes. Você quer fazer isso agora?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Baixando o instalador runtime da Microsoft ..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Houve um erro de download. Quer tentar novamente?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Não é possível instalar sem a biblioteca runtime. Quer repetir?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -93,7 +93,7 @@ msgstr ""
|
||||
"Você não pode substituir uma instalação existente. \\n\\nClique `OK` para "
|
||||
"remover a versão anterior ou `Cancelar` para cancelar esta atualização."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Suas configurações e os dados serão preservados."
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-04 12:45+0000\n"
|
||||
"Last-Translator: nicusor <Unknown>\n"
|
||||
"Language-Team: Romanian <ro@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: 2012-05-05 05:41+0000\n"
|
||||
"X-Generator: Launchpad (build 15195)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Dute la Wiki SABnzbd"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Arată Notele de Publicare"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Susţine proiectul, Donează!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Închideţi mai întâi \"SABnzbd.exe\""
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -42,31 +42,31 @@ msgstr ""
|
||||
"întâi notele de publicare sau să vizitaţi "
|
||||
"http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Acest lucru va dezinstala SABnzbd din sistem"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Executare la pornire"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Icoană Desktop"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "Asociere cu Fişierele NZB"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Şterge Program"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Ştergeţi Setări"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -74,19 +74,19 @@ msgstr ""
|
||||
"Acest sistem necesită librăria Microsoft VC90 instalată. Dortiți să faceți "
|
||||
"asta acum ?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Descărcare rutină instalare Microsoft..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Eroare descărcare, încerc din nou?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Nu pot instala fără rutină librărie, încerc din nou?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -94,7 +94,7 @@ msgstr ""
|
||||
"Nu puteți suprascrie instalarea existentă. \\n\\nClick `OK` pentru a elimina "
|
||||
"versiunea anterioară sau `Anulare` pentru a anula actualizarea."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Setările şi informaţiile vor fi salvate."
|
||||
|
||||
|
||||
@@ -7,33 +7,33 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sabnzbd\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-05-01 18:51+0000\n"
|
||||
"POT-Creation-Date: 2012-08-14 18:42+0000\n"
|
||||
"PO-Revision-Date: 2012-05-15 19:42+0000\n"
|
||||
"Last-Translator: Andreas Lindberg <andypandyswe@gmail.com>\n"
|
||||
"Language-Team: Swedish <sv@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: 2012-05-16 05:28+0000\n"
|
||||
"X-Generator: Launchpad (build 15247)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-15 05:11+0000\n"
|
||||
"X-Generator: Launchpad (build 15801)\n"
|
||||
|
||||
#: NSIS_Installer.nsi:417
|
||||
#: NSIS_Installer.nsi:425
|
||||
msgid "Go to the SABnzbd Wiki"
|
||||
msgstr "Gå till SABnzbd Wiki"
|
||||
|
||||
#: NSIS_Installer.nsi:419
|
||||
#: NSIS_Installer.nsi:427
|
||||
msgid "Show Release Notes"
|
||||
msgstr "Visa releasenoteringar"
|
||||
|
||||
#: NSIS_Installer.nsi:421
|
||||
#: NSIS_Installer.nsi:429
|
||||
msgid "Support the project, Donate!"
|
||||
msgstr "Donera och stöd detta projekt!"
|
||||
|
||||
#: NSIS_Installer.nsi:423
|
||||
#: NSIS_Installer.nsi:431
|
||||
msgid "Please close \"SABnzbd.exe\" first"
|
||||
msgstr "Var vänlig stäng \"SABnzbd.exe\" först"
|
||||
|
||||
#: NSIS_Installer.nsi:425
|
||||
#: NSIS_Installer.nsi:433
|
||||
msgid ""
|
||||
" >>>> WARNING <<<<\\r\\n\\r\\nPlease, first check the "
|
||||
"release notes or go to http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
@@ -41,31 +41,31 @@ msgstr ""
|
||||
" >>>> VARNING <<<<\\r\\n\\r\\nVänligen läs först "
|
||||
"releasenoteringarna eller gå till http://wiki.sabnzbd.org/introducing-0-7-0 !"
|
||||
|
||||
#: NSIS_Installer.nsi:427
|
||||
#: NSIS_Installer.nsi:435
|
||||
msgid "This will uninstall SABnzbd from your system"
|
||||
msgstr "Detta kommer att avinstallera SABnzbd från systemet"
|
||||
|
||||
#: NSIS_Installer.nsi:429
|
||||
#: NSIS_Installer.nsi:437
|
||||
msgid "Run at startup"
|
||||
msgstr "Kör vid uppstart"
|
||||
|
||||
#: NSIS_Installer.nsi:431
|
||||
#: NSIS_Installer.nsi:439
|
||||
msgid "Desktop Icon"
|
||||
msgstr "Skrivbordsikon"
|
||||
|
||||
#: NSIS_Installer.nsi:433
|
||||
#: NSIS_Installer.nsi:441
|
||||
msgid "NZB File association"
|
||||
msgstr "NZB Filassosication"
|
||||
|
||||
#: NSIS_Installer.nsi:435
|
||||
#: NSIS_Installer.nsi:443
|
||||
msgid "Delete Program"
|
||||
msgstr "Radera programmet"
|
||||
|
||||
#: NSIS_Installer.nsi:437
|
||||
#: NSIS_Installer.nsi:445
|
||||
msgid "Delete Settings"
|
||||
msgstr "Radera inställningar"
|
||||
|
||||
#: NSIS_Installer.nsi:439
|
||||
#: NSIS_Installer.nsi:447
|
||||
msgid ""
|
||||
"This system requires the Microsoft runtime library VC90 to be installed "
|
||||
"first. Do you want to do that now?"
|
||||
@@ -73,19 +73,19 @@ msgstr ""
|
||||
"Detta system kräver att Microsofts runtimebibliotek VC90 är installerat. "
|
||||
"Vill du göra detta nu?"
|
||||
|
||||
#: NSIS_Installer.nsi:441
|
||||
#: NSIS_Installer.nsi:449
|
||||
msgid "Downloading Microsoft runtime installer..."
|
||||
msgstr "Laddar ned Microsofts runtimeinstaller..."
|
||||
|
||||
#: NSIS_Installer.nsi:443
|
||||
#: NSIS_Installer.nsi:451
|
||||
msgid "Download error, retry?"
|
||||
msgstr "Misslyckat nedladdningsförsök, försök igen?"
|
||||
|
||||
#: NSIS_Installer.nsi:445
|
||||
#: NSIS_Installer.nsi:453
|
||||
msgid "Cannot install without runtime library, retry?"
|
||||
msgstr "Kan inte installera utan runtimebibliotek, försök igen?"
|
||||
|
||||
#: NSIS_Installer.nsi:447
|
||||
#: NSIS_Installer.nsi:455
|
||||
msgid ""
|
||||
"You cannot overwrite an existing installation. \\n\\nClick `OK` to remove "
|
||||
"the previous version or `Cancel` to cancel this upgrade."
|
||||
@@ -94,7 +94,7 @@ msgstr ""
|
||||
"avinstallera tidigare version eller 'Avbryt' för att avbryta denna "
|
||||
"uppgradering."
|
||||
|
||||
#: NSIS_Installer.nsi:449
|
||||
#: NSIS_Installer.nsi:457
|
||||
msgid "Your settings and data will be preserved."
|
||||
msgstr "Dina inställningar och ditt data kommer att bevaras."
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@ import subprocess
|
||||
import time
|
||||
import cherrypy
|
||||
from threading import RLock, Lock, Condition, Thread
|
||||
try:
|
||||
import sleepless
|
||||
except ImportError:
|
||||
sleepless = None
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Determine platform flags
|
||||
@@ -59,6 +63,10 @@ elif os.name == 'posix':
|
||||
pass
|
||||
if platform.machine() == 'i386':
|
||||
DARWIN_INTEL = True
|
||||
if DARWIN:
|
||||
DARWIN_ML = [int(n) for n in platform.mac_ver()[0].split('.')] >= [10, 8]
|
||||
else:
|
||||
DARWIN_ML = False
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
@@ -212,6 +220,13 @@ def initialize(pause_downloader = False, clean_up = False, evalSched=False, repa
|
||||
# New admin folder
|
||||
misc.remove_all(cfg.admin_dir.get_path(), '*.sab')
|
||||
|
||||
### Optionally wait for "incomplete" to become online
|
||||
if cfg.wait_for_dfolder():
|
||||
wait_for_download_folder()
|
||||
else:
|
||||
cfg.download_dir.set(cfg.download_dir(), create=True)
|
||||
cfg.download_dir.set_create(True)
|
||||
|
||||
### Set access rights for "incomplete" base folder
|
||||
misc.set_permissions(cfg.download_dir.get_path(), recursive=False)
|
||||
|
||||
@@ -294,10 +309,11 @@ def initialize(pause_downloader = False, clean_up = False, evalSched=False, repa
|
||||
PostProcessor()
|
||||
|
||||
NzbQueue()
|
||||
NzbQueue.do.read_queue(repair)
|
||||
|
||||
Assembler()
|
||||
|
||||
NzbQueue.do.read_queue(repair)
|
||||
|
||||
Downloader(pause_downloader or paused)
|
||||
|
||||
DirScanner()
|
||||
@@ -608,7 +624,7 @@ def add_nzbfile(nzbfile, pp=None, script=None, cat=None, priority=NORMAL_PRIORIT
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
|
||||
if ext.lower() in ('.zip', '.rar'):
|
||||
return ProcessArchiveFile(filename, path, pp, script, cat, priority=priority)
|
||||
return ProcessArchiveFile(filename, path, pp, script, cat, priority=priority, nzbname=nzbname)
|
||||
else:
|
||||
return ProcessSingleFile(filename, path, pp, script, cat, priority=priority, nzbname=nzbname, keep=keep, reuse=reuse)
|
||||
|
||||
@@ -752,13 +768,21 @@ def empty_queues():
|
||||
|
||||
|
||||
def keep_awake():
|
||||
""" If we still have work to do, keep Windows system awake
|
||||
""" If we still have work to do, keep Windows/OSX system awake
|
||||
"""
|
||||
global KERNEL32
|
||||
if KERNEL32 and not sabnzbd.downloader.Downloader.do.paused:
|
||||
if (not PostProcessor.do.empty()) or not NzbQueue.do.is_empty():
|
||||
# set ES_SYSTEM_REQUIRED
|
||||
KERNEL32.SetThreadExecutionState(ctypes.c_int(0x00000001))
|
||||
if KERNEL32 or sleepless:
|
||||
if sabnzbd.cfg.keep_awake():
|
||||
awake = False
|
||||
if not sabnzbd.downloader.Downloader.do.paused:
|
||||
if (not PostProcessor.do.empty()) or not NzbQueue.do.is_empty():
|
||||
awake = True
|
||||
if KERNEL32:
|
||||
# set ES_SYSTEM_REQUIRED
|
||||
KERNEL32.SetThreadExecutionState(ctypes.c_int(0x00000001))
|
||||
else:
|
||||
sleepless.keep_awake(u'SABnzbd is busy downloading and/or post-processing')
|
||||
if not awake and sleepless:
|
||||
sleepless.allow_sleep()
|
||||
|
||||
|
||||
def CheckFreeSpace():
|
||||
@@ -1021,6 +1045,9 @@ def check_all_tasks():
|
||||
# Check one-shot pause
|
||||
sabnzbd.scheduler.pause_check()
|
||||
|
||||
# Check (and terminate) idle jobs
|
||||
sabnzbd.nzbqueue.NzbQueue.do.stop_idle_jobs()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -1055,21 +1082,21 @@ def check_incomplete_vs_complete():
|
||||
cfg.download_dir.set('incomplete')
|
||||
|
||||
|
||||
def wait_for_download_folder():
|
||||
""" Wait for download folder to become available """
|
||||
while not cfg.download_dir.test_path():
|
||||
logging.debug('Waiting for "incomplete" folder')
|
||||
time.sleep(2.0)
|
||||
|
||||
|
||||
# Required wrapper because nzbstuff.py cannot import downloader.py
|
||||
def active_primaries():
|
||||
return sabnzbd.downloader.Downloader.do.active_primaries()
|
||||
|
||||
|
||||
def proxy_postproc(nzo):
|
||||
sabnzbd.postproc.PostProcessor.do.process(nzo)
|
||||
|
||||
def proxy_pre_queue(name, pp, cat, script, priority, size, groups):
|
||||
return sabnzbd.newsunpack.pre_queue(name, pp, cat, script, priority, size, groups)
|
||||
|
||||
def proxy_get_history_size():
|
||||
history_db = sabnzbd.database.get_history_handle()
|
||||
return history_db.get_history_size()
|
||||
|
||||
def proxy_build_history():
|
||||
""" Proxy to let nzbqueue call api """
|
||||
return sabnzbd.api.build_history()
|
||||
|
||||
@@ -52,7 +52,7 @@ from sabnzbd.utils.json import JsonWriter
|
||||
from sabnzbd.utils.pathbrowser import folders_at_path
|
||||
from sabnzbd.misc import loadavg, to_units, diskfree, disktotal, get_ext, \
|
||||
get_filename, int_conv, globber, time_format, remove_all, \
|
||||
starts_with_path
|
||||
starts_with_path, cat_convert
|
||||
from sabnzbd.encoding import xml_name, unicoder, special_fixer, platform_encode, html_escape
|
||||
from sabnzbd.postproc import PostProcessor
|
||||
from sabnzbd.articlecache import ArticleCache
|
||||
@@ -293,9 +293,11 @@ def _api_addfile(name, output, kwargs):
|
||||
#Side effect of next line is that attribute .value is created
|
||||
#which is needed to make add_nzbfile() work
|
||||
size = name.length
|
||||
else:
|
||||
elif hasattr(name, 'value'):
|
||||
size = len(name.value)
|
||||
if name is not None and name.filename and size:
|
||||
else:
|
||||
size = 0
|
||||
if name is not None and size and name.filename:
|
||||
cat = kwargs.get('cat')
|
||||
xcat = kwargs.get('xcat')
|
||||
if not cat and xcat:
|
||||
@@ -344,7 +346,7 @@ def _api_addlocalfile(name, output, kwargs):
|
||||
|
||||
if get_ext(name) in ('.zip', '.rar'):
|
||||
res = sabnzbd.dirscanner.ProcessArchiveFile(\
|
||||
fn, name, pp=pp, script=script, cat=cat, priority=priority, keep=True)
|
||||
fn, name, pp=pp, script=script, cat=cat, priority=priority, keep=True, nzbname=nzbname)
|
||||
elif get_ext(name) in ('.nzb', '.gz'):
|
||||
res = sabnzbd.dirscanner.ProcessSingleFile(\
|
||||
fn, name, pp=pp, script=script, cat=cat, priority=priority, keep=True, nzbname=nzbname)
|
||||
@@ -422,6 +424,8 @@ def _api_history(name, output, kwargs):
|
||||
limit = kwargs.get('limit')
|
||||
search = kwargs.get('search')
|
||||
failed_only = kwargs.get('failed_only')
|
||||
if not limit:
|
||||
limit = cfg.history_limit()
|
||||
|
||||
if name == 'delete':
|
||||
special = value.lower()
|
||||
@@ -430,10 +434,10 @@ def _api_history(name, output, kwargs):
|
||||
history_db = cherrypy.thread_data.history_db
|
||||
if special in ('all', 'failed'):
|
||||
if del_files:
|
||||
del_job_files(history_db.get_failed_paths())
|
||||
history_db.remove_failed()
|
||||
del_job_files(history_db.get_failed_paths(search))
|
||||
history_db.remove_failed(search)
|
||||
if special in ('all', 'completed'):
|
||||
history_db.remove_completed()
|
||||
history_db.remove_completed(search)
|
||||
return report(output)
|
||||
elif value:
|
||||
jobs = value.split(',')
|
||||
@@ -554,10 +558,13 @@ def _api_auth(name, output, kwargs):
|
||||
if not cfg.disable_key():
|
||||
auth = 'badkey'
|
||||
key = kwargs.get('key', '')
|
||||
if key == cfg.nzb_key():
|
||||
auth = 'nzbkey'
|
||||
if key == cfg.api_key():
|
||||
if not key:
|
||||
auth = 'apikey'
|
||||
else:
|
||||
if key == cfg.nzb_key():
|
||||
auth = 'nzbkey'
|
||||
if key == cfg.api_key():
|
||||
auth = 'apikey'
|
||||
elif cfg.username() and cfg.password():
|
||||
auth = 'login'
|
||||
return report(output, keyword='auth', data=auth)
|
||||
@@ -643,7 +650,7 @@ def _api_test_email(name, output, kwargs):
|
||||
pack['unpack'] = ['action 1', 'action 2']
|
||||
res = sabnzbd.emailer.endjob('I had a d\xe8ja vu', 123, 'unknown', True,
|
||||
os.path.normpath(os.path.join(cfg.complete_dir.get_path(), '/unknown/I had a d\xe8ja vu')),
|
||||
123*MEBI, pack, 'my_script', 'Line 1\nLine 2\nLine 3\nd\xe8ja vu\n', 0)
|
||||
123*MEBI, None, pack, 'my_script', 'Line 1\nLine 2\nLine 3\nd\xe8ja vu\n', 0)
|
||||
if res == 'Email succeeded':
|
||||
res = None
|
||||
return report(output, error=res)
|
||||
@@ -1100,7 +1107,7 @@ def build_queue(web_dir=None, root=None, verbose=False, prim=True, webdir='', ve
|
||||
slot['mbdone_fmt'] = locale.format('%d', int(mb-mbleft), True)
|
||||
slot['size'] = format_bytes(bytes)
|
||||
slot['sizeleft'] = format_bytes(bytesleft)
|
||||
if not Downloader.do.paused and status != 'Paused' and status != 'Fetching' and not found_active:
|
||||
if not Downloader.do.paused and status not in (Status.PAUSED, Status.FETCHING) and not found_active:
|
||||
if status == Status.CHECKING:
|
||||
slot['status'] = Status.CHECKING
|
||||
else:
|
||||
@@ -1124,7 +1131,7 @@ def build_queue(web_dir=None, root=None, verbose=False, prim=True, webdir='', ve
|
||||
slot['percentage'] = "%s" % (int(((mb-mbleft) / mb) * 100))
|
||||
slot['missing'] = missing
|
||||
|
||||
if status in (Status.PAUSED, Status.CHECKING):
|
||||
if Downloader.do.paused or Downloader.do.postproc or status not in (Status.DOWNLOADING, Status.QUEUED):
|
||||
slot['timeleft'] = '0:00:00'
|
||||
slot['eta'] = 'unknown'
|
||||
else:
|
||||
@@ -1266,12 +1273,13 @@ def qstatus_data():
|
||||
|
||||
state = "IDLE"
|
||||
if Downloader.do.paused:
|
||||
state = "PAUSED"
|
||||
state = Status.PAUSED
|
||||
elif qnfo[QNFO_BYTES_LEFT_FIELD] / MEBI > 0:
|
||||
state = "DOWNLOADING"
|
||||
state = Status.DOWNLOADING
|
||||
|
||||
status = {
|
||||
"state" : state,
|
||||
"pp_active" : not PostProcessor.do.empty(),
|
||||
"paused" : Downloader.do.paused,
|
||||
"pause_int" : scheduler.pause_int(),
|
||||
"kbpersec" : bpsnow / KIBI,
|
||||
@@ -1536,7 +1544,8 @@ def build_header(prim, webdir=''):
|
||||
if not color:
|
||||
color = ''
|
||||
|
||||
header = { 'T': Ttemplate, 'Tspec': Tspec, 'Tx' : Ttemplate, 'version':sabnzbd.__version__, 'paused': Downloader.do.paused,
|
||||
header = { 'T': Ttemplate, 'Tspec': Tspec, 'Tx' : Ttemplate, 'version':sabnzbd.__version__,
|
||||
'paused': Downloader.do.paused or Downloader.do.postproc,
|
||||
'pause_int': scheduler.pause_int(), 'paused_all': sabnzbd.PAUSED_ALL,
|
||||
'uptime':uptime, 'color_scheme':color }
|
||||
speed_limit = Downloader.do.get_limit()
|
||||
@@ -1587,13 +1596,13 @@ def build_header(prim, webdir=''):
|
||||
header['left_quota'] = to_units(BPSMeter.do.left)
|
||||
|
||||
status = ''
|
||||
if Downloader.do.paused:
|
||||
if Downloader.do.paused or Downloader.do.postproc:
|
||||
status = Status.PAUSED
|
||||
elif bytespersec > 0:
|
||||
status = Status.DOWNLOADING
|
||||
else:
|
||||
status = 'Idle'
|
||||
header['status'] = "%s" % status
|
||||
header['status'] = status
|
||||
|
||||
anfo = ArticleCache.do.cache_info()
|
||||
|
||||
@@ -1673,9 +1682,11 @@ def build_history(start=None, limit=None, verbose=False, verbose_list=None, sear
|
||||
# Aquire the db instance
|
||||
try:
|
||||
history_db = cherrypy.thread_data.history_db
|
||||
close_db = False
|
||||
except:
|
||||
# Required for repairs at startup because Cherrypy isn't active yet
|
||||
history_db = get_history_handle()
|
||||
close_db = True
|
||||
|
||||
# Fetch history items
|
||||
if not h_limit:
|
||||
@@ -1741,6 +1752,9 @@ def build_history(start=None, limit=None, verbose=False, verbose_list=None, sear
|
||||
total_items += full_queue_size
|
||||
fetched_items = len(items)
|
||||
|
||||
if close_db:
|
||||
history_db.close()
|
||||
|
||||
return (items, fetched_items, total_items)
|
||||
|
||||
|
||||
@@ -1932,3 +1946,13 @@ def del_from_section(kwargs):
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def history_remove_failed():
|
||||
""" Remove all failed jobs from history, including files """
|
||||
logging.info('Scheduled removal of all failed jobs')
|
||||
history_db = get_history_handle()
|
||||
del_job_files(history_db.get_failed_paths())
|
||||
history_db.remove_failed()
|
||||
history_db.close()
|
||||
del history_db
|
||||
|
||||
@@ -35,7 +35,8 @@ except:
|
||||
|
||||
import sabnzbd
|
||||
from sabnzbd.misc import get_filepath, sanitize_filename, get_unique_path, renamer, \
|
||||
set_permissions
|
||||
set_permissions, flag_file
|
||||
from sabnzbd.constants import QCHECK_FILE
|
||||
import sabnzbd.cfg as cfg
|
||||
from sabnzbd.articlecache import ArticleCache
|
||||
from sabnzbd.postproc import PostProcessor
|
||||
@@ -87,13 +88,17 @@ class Assembler(Thread):
|
||||
try:
|
||||
filepath = _assemble(nzf, filepath, dupe)
|
||||
except IOError, (errno, strerror):
|
||||
# 28 == disk full => pause downloader
|
||||
if errno == 28:
|
||||
logging.error(Ta('Disk full! Forcing Pause'))
|
||||
if nzo.deleted:
|
||||
# Job was deleted, ignore error
|
||||
pass
|
||||
else:
|
||||
logging.error(Ta('Disk error on creating file %s'), latin1(filepath))
|
||||
# Pause without saving
|
||||
sabnzbd.downloader.Downloader.do.pause(save=False)
|
||||
# 28 == disk full => pause downloader
|
||||
if errno == 28:
|
||||
logging.error(Ta('Disk full! Forcing Pause'))
|
||||
else:
|
||||
logging.error(Ta('Disk error on creating file %s'), latin1(filepath))
|
||||
# Pause without saving
|
||||
sabnzbd.downloader.Downloader.do.pause(save=False)
|
||||
except:
|
||||
logging.error('Fatal error in Assembler', exc_info = True)
|
||||
break
|
||||
@@ -107,8 +112,15 @@ class Assembler(Thread):
|
||||
logging.debug('Got md5pack for set %s', setname)
|
||||
|
||||
if check_encrypted_rar(nzo, filepath):
|
||||
logging.warning(Ta('WARNING: Paused job "%s" because of encrypted RAR file'), latin1(nzo.final_name))
|
||||
nzo.pause()
|
||||
if cfg.pause_on_pwrar() == 1:
|
||||
logging.warning(Ta('WARNING: Paused job "%s" because of encrypted RAR file'), latin1(nzo.final_name))
|
||||
nzo.pause()
|
||||
else:
|
||||
logging.warning(Ta('WARNING: Aborted job "%s" because of encrypted RAR file'), latin1(nzo.final_name))
|
||||
nzo.fail_msg = T('Aborted, encryption detected')
|
||||
import sabnzbd.nzbqueue
|
||||
sabnzbd.nzbqueue.NzbQueue.do.end_job(nzo)
|
||||
nzf.completed = True
|
||||
else:
|
||||
sabnzbd.nzbqueue.NzbQueue.do.remove(nzo.nzo_id, add_to_history=False, cleanup=False)
|
||||
PostProcessor.do.process(nzo)
|
||||
@@ -133,7 +145,7 @@ def _assemble(nzf, path, dupe):
|
||||
decodetable = nzf.decodetable
|
||||
|
||||
for articlenum in decodetable:
|
||||
sleep(0.01)
|
||||
sleep(0.001)
|
||||
article = decodetable[articlenum]
|
||||
|
||||
data = ArticleCache.do.load_article(article)
|
||||
@@ -200,35 +212,37 @@ def file_has_articles(nzf):
|
||||
# For a full description of the par2 specification, visit:
|
||||
# http://parchive.sourceforge.net/docs/specifications/parity-volume-spec/article-spec.html
|
||||
|
||||
def GetMD5Hashes(fname):
|
||||
def GetMD5Hashes(fname, force=False):
|
||||
""" Get the hash table from a PAR2 file
|
||||
Return as dictionary, indexed on names and True for utf8-encoded names
|
||||
"""
|
||||
new_encoding = False
|
||||
new_encoding = True
|
||||
table = {}
|
||||
try:
|
||||
f = open(fname, 'rb')
|
||||
except:
|
||||
return table, new_encoding
|
||||
if force or not flag_file(os.path.split(fname)[0], QCHECK_FILE):
|
||||
try:
|
||||
f = open(fname, 'rb')
|
||||
except:
|
||||
return table, new_encoding
|
||||
|
||||
try:
|
||||
header = f.read(8)
|
||||
while header:
|
||||
name, hash = ParseFilePacket(f, header)
|
||||
new_encoding |= is_utf8(name)
|
||||
if name:
|
||||
table[name] = hash
|
||||
new_encoding = False
|
||||
try:
|
||||
header = f.read(8)
|
||||
while header:
|
||||
name, hash = ParseFilePacket(f, header)
|
||||
new_encoding |= is_utf8(name)
|
||||
if name:
|
||||
table[name] = hash
|
||||
header = f.read(8)
|
||||
|
||||
except (struct.error, IndexError):
|
||||
logging.info('Cannot use corrupt par2 file for QuickCheck, "%s"', fname)
|
||||
table = {}
|
||||
except:
|
||||
logging.debug('QuickCheck parser crashed in file %s', fname)
|
||||
logging.info('Traceback: ', exc_info = True)
|
||||
table = {}
|
||||
except (struct.error, IndexError):
|
||||
logging.info('Cannot use corrupt par2 file for QuickCheck, "%s"', fname)
|
||||
table = {}
|
||||
except:
|
||||
logging.debug('QuickCheck parser crashed in file %s', fname)
|
||||
logging.info('Traceback: ', exc_info = True)
|
||||
table = {}
|
||||
|
||||
f.close()
|
||||
f.close()
|
||||
return table, new_encoding
|
||||
|
||||
|
||||
@@ -286,11 +300,11 @@ def is_cloaked(path, names):
|
||||
def check_encrypted_rar(nzo, filepath):
|
||||
""" Check if file is rar and is encrypted """
|
||||
encrypted = False
|
||||
if not nzo.password and cfg.pause_on_pwrar() and is_rarfile(filepath):
|
||||
if not nzo.password and not nzo.meta.get('password') and cfg.pause_on_pwrar() and is_rarfile(filepath):
|
||||
try:
|
||||
zf = RarFile(filepath, all_names=True)
|
||||
encrypted = zf.encrypted or is_cloaked(filepath, zf.namelist())
|
||||
if encrypted and int(nzo.encrypted) < 2:
|
||||
if encrypted and int(nzo.encrypted) < 2 and not nzo.reuse:
|
||||
nzo.encrypted = 1
|
||||
else:
|
||||
encrypted = False
|
||||
|
||||
@@ -63,12 +63,12 @@ def this_month(t):
|
||||
|
||||
|
||||
_DAYS = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
|
||||
def last_month_day(t=None):
|
||||
def last_month_day(tm):
|
||||
""" Return last day of this month """
|
||||
t = t or time.localtime(t)
|
||||
year, month = time.localtime(t)[:2]
|
||||
year, month = tm[:2]
|
||||
day = _DAYS[month]
|
||||
if day == 28 and (year % 4) == 0 and (year % 400) == 0:
|
||||
# This simple formula for leap years is good enough
|
||||
if day == 28 and (year % 4) == 0:
|
||||
day = 29
|
||||
return day
|
||||
|
||||
@@ -140,7 +140,14 @@ class BPSMeter(object):
|
||||
""" Get the latest data from the database and assign to a fake server
|
||||
"""
|
||||
logging.debug('Setting default BPS meter values')
|
||||
grand, month, week = sabnzbd.proxy_get_history_size()
|
||||
import sabnzbd.database
|
||||
history_db = sabnzbd.database.get_history_handle()
|
||||
grand, month, week = history_db.get_history_size()
|
||||
history_db.close()
|
||||
self.grand_total = {}
|
||||
self.month_total = {}
|
||||
self.week_total = {}
|
||||
self.day_total = {}
|
||||
if grand: self.grand_total['x'] = grand
|
||||
if month: self.month_total['x'] = month
|
||||
if week: self.week_total['x'] = week
|
||||
@@ -303,20 +310,21 @@ class BPSMeter(object):
|
||||
tm = time.localtime(t)
|
||||
if self.q_period == 'd':
|
||||
nx = (tm[0], tm[1], tm[2], self.q_hour, self.q_minute, 0, 0, 0, tm[8])
|
||||
if (tm.tm_hour + tm.tm_min * 60) >= (self.q_hour + self.q_minute * 60):
|
||||
if (tm.tm_hour * 60 + tm.tm_min) >= (self.q_hour * 60 + self.q_minute):
|
||||
# If today's moment has passed, it will happen tomorrow
|
||||
t = time.mktime(nx) + 24 * 3600
|
||||
tm = time.localtime(t)
|
||||
elif self.q_period == 'w':
|
||||
if self.q_day < tm.tm_wday+1 or (self.q_day == tm.tm_wday+1 and (tm.tm_hour + tm.tm_min * 60) >= (self.q_hour + self.q_minute * 60)):
|
||||
if self.q_day < tm.tm_wday+1 or (self.q_day == tm.tm_wday+1 and (tm.tm_hour * 60 + tm.tm_min) >= (self.q_hour * 60 + self.q_minute)):
|
||||
tm = time.localtime(next_week(t))
|
||||
dif = abs(self.q_day - tm.tm_wday - 1)
|
||||
t = time.mktime(tm) + dif * 24 * 3600
|
||||
tm = time.localtime(t)
|
||||
elif self.q_period == 'm':
|
||||
if self.q_day < tm.tm_mday or (self.q_day == tm.tm_mday and (tm.tm_hour + tm.tm_min * 60) >= (self.q_hour + self.q_minute * 60)):
|
||||
if self.q_day < tm.tm_mday or (self.q_day == tm.tm_mday and (tm.tm_hour * 60 + tm.tm_min) >= (self.q_hour * 60 + self.q_minute)):
|
||||
tm = time.localtime(next_month(t))
|
||||
tm = (tm[0], tm[1], self.q_day, self.q_hour, self.q_minute, 0, 0, 0, tm[8])
|
||||
day = min(last_month_day(tm), self.q_day)
|
||||
tm = (tm[0], tm[1], day, self.q_hour, self.q_minute, 0, 0, 0, tm[8])
|
||||
else:
|
||||
return
|
||||
tm = (tm[0], tm[1], tm[2], self.q_hour, self.q_minute, 0, 0, 0, tm[8])
|
||||
@@ -376,18 +384,34 @@ class BPSMeter(object):
|
||||
if m:
|
||||
self.q_hour = int(m.group(1))
|
||||
self.q_minute = int(m.group(2))
|
||||
self.q_day = max(1, self.q_day)
|
||||
self.q_day = min(7, self.q_day)
|
||||
if self.q_period == 'w':
|
||||
self.q_day = max(1, self.q_day)
|
||||
self.q_day = min(7, self.q_day)
|
||||
elif self.q_period == 'm':
|
||||
self.q_day = max(1, self.q_day)
|
||||
self.q_day = min(31, self.q_day)
|
||||
else:
|
||||
self.q_day = 1
|
||||
self.change_quota(allow_resume=False)
|
||||
return quota_handler, self.q_hour, self.q_minute
|
||||
else:
|
||||
return None, 0, 0
|
||||
|
||||
|
||||
def midnight(self):
|
||||
""" Midnight action: dummy update for all servers """
|
||||
for server in self.day_total:
|
||||
self.update(server)
|
||||
|
||||
|
||||
def quota_handler():
|
||||
""" To be called from scheduler """
|
||||
logging.debug('Checking quota')
|
||||
BPSMeter.do.reset_quota()
|
||||
|
||||
|
||||
def midnight_action():
|
||||
if BPSMeter.do:
|
||||
BPSMeter.do.midnight()
|
||||
|
||||
BPSMeter()
|
||||
|
||||
@@ -24,7 +24,7 @@ import sabnzbd
|
||||
from sabnzbd.constants import DEF_HOST, DEF_PORT_WIN_SSL, DEF_PORT_WIN, DEF_STDINTF, \
|
||||
DEF_DOWNLOAD_DIR, DEF_NZBBACK_DIR, DEF_PORT_UNIX_SSL, \
|
||||
NORMAL_PRIORITY, DEF_SCANRATE, DEF_PORT_UNIX, DEF_COMPLETE_DIR, \
|
||||
DEF_ADMIN_DIR
|
||||
DEF_ADMIN_DIR, NOTIFY_KEYS
|
||||
from sabnzbd.config import OptionBool, OptionNumber, OptionPassword, \
|
||||
OptionDir, OptionStr, OptionList, no_nonsense, \
|
||||
validate_octal, validate_safedir, validate_dir_exists, \
|
||||
@@ -79,7 +79,8 @@ email_full = OptionBool('misc', 'email_full', False)
|
||||
email_dir = OptionDir('misc', 'email_dir', create=True)
|
||||
email_rss = OptionBool('misc', 'email_rss', False)
|
||||
|
||||
version_check = OptionBool('misc', 'check_new_rel', True)
|
||||
version_check = OptionNumber('misc', 'check_new_rel', 1)
|
||||
news_items = OptionBool('misc', 'news_items', True)
|
||||
autobrowser = OptionBool('misc', 'auto_browser', True)
|
||||
replace_illegal = OptionBool('misc', 'replace_illegal', True)
|
||||
pre_script = OptionStr('misc', 'pre_script', 'None')
|
||||
@@ -92,6 +93,7 @@ enable_tsjoin = OptionBool('misc', 'enable_tsjoin', True)
|
||||
enable_par_cleanup = OptionBool('misc', 'enable_par_cleanup', True)
|
||||
never_repair = OptionBool('misc', 'never_repair', False)
|
||||
ignore_unrar_dates = OptionBool('misc', 'ignore_unrar_dates', False)
|
||||
overwrite_files = OptionBool('misc', 'overwrite_files', False)
|
||||
|
||||
par_option = OptionStr('misc', 'par_option', '', validation=no_nonsense)
|
||||
nice = OptionStr('misc', 'nice', '', validation=no_nonsense)
|
||||
@@ -101,6 +103,7 @@ par2_multicore = OptionBool('misc', 'par2_multicore', True)
|
||||
allow_64bit_tools = OptionBool('misc', 'allow_64bit_tools', True)
|
||||
allow_streaming = OptionBool('misc', 'allow_streaming', False)
|
||||
pre_check = OptionBool('misc', 'pre_check', False)
|
||||
fail_hopeless = OptionBool('misc', 'fail_hopeless', False)
|
||||
req_completion_rate = OptionNumber('misc', 'req_completion_rate', 100.2, 100, 200)
|
||||
|
||||
newzbin_username = OptionStr('newzbin', 'username')
|
||||
@@ -124,11 +127,14 @@ auto_sort = OptionBool('misc', 'auto_sort', False)
|
||||
folder_rename = OptionBool('misc', 'folder_rename', True)
|
||||
folder_max_length = OptionNumber('misc', 'folder_max_length', DEF_FOLDER_MAX, 20, 65000)
|
||||
pause_on_pwrar = OptionBool('misc', 'pause_on_pwrar', True)
|
||||
prio_sort_list = OptionList('misc', 'prio_sort_list')
|
||||
|
||||
safe_postproc = OptionBool('misc', 'safe_postproc', True)
|
||||
empty_postproc = OptionBool('misc', 'empty_postproc', False)
|
||||
pause_on_post_processing = OptionBool('misc', 'pause_on_post_processing', False)
|
||||
ampm = OptionBool('misc', 'ampm', False)
|
||||
rss_filenames = OptionBool('misc', 'rss_filenames', False)
|
||||
rss_odd_titles = OptionList('misc', 'rss_odd_titles', ['nzbindex.nl/', 'nzbindex.com/', 'nzbclub.com/'])
|
||||
|
||||
schedules = OptionList('misc', 'schedlines')
|
||||
|
||||
@@ -151,11 +157,13 @@ date_categories = OptionStr('misc', 'date_categories', ['tv'])
|
||||
matrix_username = OptionStr('nzbmatrix', 'username')
|
||||
matrix_apikey = OptionStr('nzbmatrix', 'apikey')
|
||||
matrix_del_bookmark = OptionBool('nzbmatrix', 'del_bookmark', True)
|
||||
xxx_username = OptionStr('nzbxxx', 'username')
|
||||
xxx_apikey = OptionStr('nzbxxx', 'apikey')
|
||||
|
||||
configlock = OptionBool('misc', 'config_lock', 0)
|
||||
|
||||
umask = OptionStr('misc', 'permissions', '', validation=validate_octal)
|
||||
download_dir = OptionDir('misc', 'download_dir', DEF_DOWNLOAD_DIR, validation=validate_safedir)
|
||||
download_dir = OptionDir('misc', 'download_dir', DEF_DOWNLOAD_DIR, create=False, validation=validate_safedir)
|
||||
download_free = OptionStr('misc', 'download_free')
|
||||
complete_dir = OptionDir('misc', 'complete_dir', DEF_COMPLETE_DIR, create=False, \
|
||||
apply_umask=True, validation=validate_notempty)
|
||||
@@ -169,6 +177,8 @@ dirscan_speed = OptionNumber('misc', 'dirscan_speed', DEF_SCANRATE, 0, 3600)
|
||||
size_limit = OptionStr('misc', 'size_limit', '0')
|
||||
password_file = OptionDir('misc', 'password_file', '', create=False)
|
||||
fsys_type = OptionNumber('misc', 'fsys_type', 0, 0, 2)
|
||||
wait_for_dfolder = OptionBool('misc', 'wait_for_dfolder', False)
|
||||
warn_empty_nzb = OptionBool('misc', 'warn_empty_nzb', True)
|
||||
|
||||
cherryhost = OptionStr('misc', 'host', DEF_HOST)
|
||||
if sabnzbd.WIN32:
|
||||
@@ -203,13 +213,15 @@ log_new = OptionBool('logging', 'log_new', False)
|
||||
|
||||
https_cert = OptionDir('misc', 'https_cert', 'server.cert', create=False)
|
||||
https_key = OptionDir('misc', 'https_key', 'server.key', create=False)
|
||||
https_chain = OptionDir('misc','https_chain', create=False)
|
||||
enable_https = OptionBool('misc', 'enable_https', False)
|
||||
|
||||
language = OptionStr('misc', 'language', 'en')
|
||||
ssl_type = OptionStr('misc', 'ssl_type', 'v23')
|
||||
unpack_check = OptionBool('misc', 'unpack_check', True)
|
||||
no_penalties = OptionBool('misc', 'no_penalties', False)
|
||||
random_server_ip = OptionBool('misc', 'random_server_ip', True)
|
||||
randomize_server_ip = OptionBool('misc', 'randomize_server_ip', False)
|
||||
ipv6_servers = OptionNumber('misc', 'ipv6_servers', 1, 0, 2)
|
||||
|
||||
# Internal options, not saved in INI file
|
||||
debug_delay = OptionNumber('misc', 'debug_delay', 0, add=False)
|
||||
@@ -218,6 +230,7 @@ api_key = OptionStr('misc', 'api_key', create_api_key())
|
||||
nzb_key = OptionStr('misc', 'nzb_key', create_api_key())
|
||||
disable_key = OptionBool('misc', 'disable_api_key', False)
|
||||
api_warnings = OptionBool('misc', 'api_warnings', True)
|
||||
local_range = OptionStr('misc', 'local_range')
|
||||
max_art_tries = OptionNumber('misc', 'max_art_tries', 3, 2)
|
||||
max_art_opt = OptionBool('misc', 'max_art_opt', False)
|
||||
use_pickle = OptionBool('misc', 'use_pickle', False)
|
||||
@@ -225,8 +238,10 @@ no_ipv6 = OptionBool('misc', 'no_ipv6', False)
|
||||
|
||||
growl_server = OptionStr('growl', 'growl_server')
|
||||
growl_password = OptionPassword('growl', 'growl_password')
|
||||
growl_enable = OptionBool('growl', 'growl_enable', True)
|
||||
growl_enable = OptionBool('growl', 'growl_enable', not sabnzbd.DARWIN_ML)
|
||||
ntfosd_enable = OptionBool('growl', 'ntfosd_enable', not sabnzbd.WIN32 and not sabnzbd.DARWIN)
|
||||
ncenter_enable = OptionBool('growl', 'ncenter_enable', sabnzbd.DARWIN)
|
||||
notify_classes = OptionList('growl', 'notify_classes', NOTIFY_KEYS)
|
||||
|
||||
quota_size = OptionStr('misc', 'quota_size')
|
||||
quota_day = OptionStr('misc', 'quota_day')
|
||||
@@ -235,11 +250,15 @@ quota_period = OptionStr('misc', 'quota_period', 'm')
|
||||
|
||||
osx_menu = OptionBool('misc', 'osx_menu', True)
|
||||
osx_speed = OptionBool('misc', 'osx_speed', True)
|
||||
keep_awake = OptionBool('misc', 'keep_awake', True)
|
||||
win_menu = OptionBool('misc', 'win_menu', True)
|
||||
uniconfig = OptionBool('misc', 'uniconfig', True)
|
||||
allow_incomplete_nzb = OptionBool('misc', 'allow_incomplete_nzb', False)
|
||||
marker_file = OptionStr('misc', 'nomedia_marker', '')
|
||||
wait_ext_drive = OptionNumber('misc', 'wait_ext_drive', 5, 1, 60)
|
||||
history_limit = OptionNumber('misc', 'history_limit', 50, 0)
|
||||
show_sysload = OptionNumber('misc', 'show_sysload', 2, 0, 2)
|
||||
web_watchdog = OptionBool('misc', 'web_watchdog', False)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Set root folders for Folder config-items
|
||||
@@ -259,3 +278,4 @@ def set_root_folders(home, lcldata):
|
||||
def set_root_folders2():
|
||||
https_cert.set_root(admin_dir.get_path())
|
||||
https_key.set_root(admin_dir.get_path())
|
||||
https_chain.set_root(admin_dir.get_path())
|
||||
@@ -139,7 +139,7 @@ class OptionNumber(Option):
|
||||
else:
|
||||
value = float(value)
|
||||
except ValueError:
|
||||
value = 0
|
||||
value = self._Option__default_val
|
||||
if self.__validation:
|
||||
error, val = self.__validation(value)
|
||||
self._Option__set(val)
|
||||
@@ -186,6 +186,14 @@ class OptionDir(Option):
|
||||
res, path = sabnzbd.misc.create_real_path(self.ident()[1], self.__root, value, self.__apply_umask)
|
||||
return path
|
||||
|
||||
def test_path(self):
|
||||
""" Return True if path exists """
|
||||
value = self.get()
|
||||
if value:
|
||||
return os.path.exists(sabnzbd.misc.real_path(self.__root, value))
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_root(self, root):
|
||||
""" Set new root, is assumed to be valid """
|
||||
self.__root = root
|
||||
@@ -210,6 +218,10 @@ class OptionDir(Option):
|
||||
self._Option__set(value)
|
||||
return error
|
||||
|
||||
def set_create(self, value):
|
||||
""" Set auto-creation value """
|
||||
self.__create = value
|
||||
|
||||
|
||||
class OptionList(Option):
|
||||
""" List option class """
|
||||
@@ -224,7 +236,10 @@ class OptionList(Option):
|
||||
error = None
|
||||
if value is not None:
|
||||
if not isinstance(value, list):
|
||||
value = listquote.simplelist(value)
|
||||
if '"' not in value and ',' not in value:
|
||||
value = value.split()
|
||||
else:
|
||||
value = listquote.simplelist(value)
|
||||
if self.__validation:
|
||||
error, value = self.__validation(value)
|
||||
if not error:
|
||||
|
||||
@@ -43,6 +43,7 @@ PNFO_MISSING_FIELD = 18
|
||||
QNFO_BYTES_FIELD = 0
|
||||
QNFO_BYTES_LEFT_FIELD = 1
|
||||
QNFO_PNFO_LIST_FIELD = 2
|
||||
QNFO_Q_SIZE_LIST_FIELD = 3
|
||||
|
||||
ANFO_ARTICLE_SUM_FIELD = 0
|
||||
ANFO_CACHE_SIZE_FIELD = 1
|
||||
@@ -63,6 +64,8 @@ TERM_FLAG_FILE = 'running.sab'
|
||||
FUTURE_Q_FOLDER = 'future'
|
||||
JOB_ADMIN = '__ADMIN__'
|
||||
VERIFIED_FILE = '__verified__'
|
||||
QCHECK_FILE = '__skip_qcheck__'
|
||||
RENAMES_FILE = '__renames__'
|
||||
ATTRIB_FILE = 'SABnzbd_attrib'
|
||||
REPAIR_REQUEST = 'repair-all.sab'
|
||||
|
||||
@@ -139,7 +142,7 @@ date_match = [r'(\d{4})\W(\d{1,2})\W(\d{1,2})', #2008-10-16
|
||||
|
||||
year_match = r'[\W]([1|2]\d{3})([^\w]|$)' # Something '(YYYY)' or '.YYYY.' or ' YYYY '
|
||||
|
||||
sample_match = r'((^|[\W_])sample\d*[\W_])|(-s\.)' # something-sample.avi something-s.avi
|
||||
sample_match = r'((^|[\W_])sample\d*[\W_])|(-s\.\w+$)' # something-sample.avi something-s.avi
|
||||
|
||||
class Status():
|
||||
COMPLETED = 'Completed'
|
||||
@@ -156,3 +159,5 @@ class Status():
|
||||
REPAIRING = 'Repairing'
|
||||
RUNNING = 'Running'
|
||||
VERIFYING = 'Verifying'
|
||||
|
||||
NOTIFY_KEYS = ('startup', 'download', 'pp', 'complete', 'other')
|
||||
|
||||
@@ -51,6 +51,27 @@ def get_history_handle():
|
||||
return HistoryDB(_HISTORY_DB)
|
||||
|
||||
|
||||
def convert_search(search):
|
||||
""" Convert classic wildcard to SQL wildcard """
|
||||
if not search:
|
||||
# Default value
|
||||
search = ''
|
||||
else:
|
||||
# Allow * for wildcard matching and space
|
||||
search = search.replace('*','%').replace(' ', '%')
|
||||
|
||||
# Allow ^ for start of string and $ for end of string
|
||||
if search and search.startswith('^'):
|
||||
search = search.replace('^','')
|
||||
search += '%'
|
||||
elif search and search.endswith('$'):
|
||||
search = search.replace('$','')
|
||||
search = '%' + search
|
||||
else:
|
||||
search = '%' + search + '%'
|
||||
return search
|
||||
|
||||
|
||||
# Note: Add support for execute return values
|
||||
|
||||
class HistoryDB(object):
|
||||
@@ -141,19 +162,22 @@ class HistoryDB(object):
|
||||
logging.error(Ta('Failed to close database, see log'))
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
|
||||
def remove_completed(self):
|
||||
return self.execute("""DELETE FROM history WHERE status = 'Completed'""", save=True)
|
||||
def remove_completed(self, search=None):
|
||||
search = convert_search(search)
|
||||
return self.execute("""DELETE FROM history WHERE name LIKE ? AND status = 'Completed'""", (search,), save=True)
|
||||
|
||||
def get_failed_paths(self):
|
||||
def get_failed_paths(self, search=None):
|
||||
""" Return list of all storage paths of failed jobs (may contain non-existing or empty paths) """
|
||||
fetch_ok = self.execute("""SELECT path FROM history WHERE status = 'Failed'""")
|
||||
search = convert_search(search)
|
||||
fetch_ok = self.execute("""SELECT path FROM history WHERE name LIKE ? AND status = 'Failed'""", (search,))
|
||||
if fetch_ok:
|
||||
return [item.get('path') for item in self.c.fetchall()]
|
||||
else:
|
||||
return []
|
||||
|
||||
def remove_failed(self):
|
||||
return self.execute("""DELETE FROM history WHERE status = 'Failed'""", save=True)
|
||||
def remove_failed(self, search=None):
|
||||
search = convert_search(search)
|
||||
return self.execute("""DELETE FROM history WHERE name LIKE ? AND status = 'Failed'""", (search,), save=True)
|
||||
|
||||
def remove_history(self, jobs=None):
|
||||
if jobs is None:
|
||||
@@ -180,22 +204,7 @@ class HistoryDB(object):
|
||||
|
||||
def fetch_history(self, start=None, limit=None, search=None, failed_only=0):
|
||||
|
||||
if not search:
|
||||
# Default value
|
||||
search = ''
|
||||
else:
|
||||
# Allow * for wildcard matching and space
|
||||
search = search.replace('*','%').replace(' ', '%')
|
||||
|
||||
# Allow ^ for start of string and $ for end of string
|
||||
if search and search.startswith('^'):
|
||||
search = search.replace('^','')
|
||||
search += '%'
|
||||
elif search and search.endswith('$'):
|
||||
search = search.replace('$','')
|
||||
search = '%' + search
|
||||
else:
|
||||
search = '%' + search + '%'
|
||||
search = convert_search(search)
|
||||
|
||||
# Get the number of results
|
||||
if failed_only:
|
||||
|
||||
@@ -23,6 +23,7 @@ import Queue
|
||||
import binascii
|
||||
import logging
|
||||
import re
|
||||
from time import sleep
|
||||
from threading import Thread
|
||||
try:
|
||||
import _yenc
|
||||
@@ -72,6 +73,7 @@ class Decoder(Thread):
|
||||
def run(self):
|
||||
from sabnzbd.nzbqueue import NzbQueue
|
||||
while 1:
|
||||
sleep(0.001)
|
||||
art_tup = self.queue.get()
|
||||
if not art_tup:
|
||||
break
|
||||
@@ -82,6 +84,8 @@ class Decoder(Thread):
|
||||
article, lines = art_tup
|
||||
nzf = article.nzf
|
||||
nzo = nzf.nzo
|
||||
art_id = article.article
|
||||
killed = False
|
||||
|
||||
data = None
|
||||
|
||||
@@ -94,13 +98,13 @@ class Decoder(Thread):
|
||||
if nzo.precheck:
|
||||
raise BadYenc
|
||||
register = True
|
||||
logging.debug("Decoding %s", article)
|
||||
logging.debug("Decoding %s", art_id)
|
||||
|
||||
data = decode(article, lines)
|
||||
nzf.article_count += 1
|
||||
found = True
|
||||
except IOError, e:
|
||||
logme = Ta('Decoding %s failed') % article
|
||||
logme = Ta('Decoding %s failed') % art_id
|
||||
logging.info(logme)
|
||||
sabnzbd.downloader.Downloader.do.pause()
|
||||
|
||||
@@ -111,7 +115,7 @@ class Decoder(Thread):
|
||||
register = False
|
||||
|
||||
except CrcError, e:
|
||||
logme = Ta('CRC Error in %s (%s -> %s)') % (article, e.needcrc, e.gotcrc)
|
||||
logme = Ta('CRC Error in %s (%s -> %s)') % (art_id, e.needcrc, e.gotcrc)
|
||||
logging.info(logme)
|
||||
|
||||
data = e.data
|
||||
@@ -133,27 +137,32 @@ class Decoder(Thread):
|
||||
# Examine headers (for precheck) or body (for download)
|
||||
# And look for DMCA clues (while skipping "X-" headers)
|
||||
for line in lines:
|
||||
if not line.startswith('X-') and match_str(line.lower(), ('dmca', 'removed', 'cancel')):
|
||||
logging.info('Article removed from server (%s)', article)
|
||||
lline = line.lower()
|
||||
if 'message-id:' in lline:
|
||||
found = True
|
||||
if not line.startswith('X-') and match_str(lline, ('dmca', 'removed', 'cancel', 'blocked')):
|
||||
killed = True
|
||||
break
|
||||
if killed:
|
||||
logme = 'Article removed from server (%s)'
|
||||
logging.info(logme, art_id)
|
||||
if nzo.precheck:
|
||||
if found or not killed:
|
||||
if found and not killed:
|
||||
# Pre-check, proper article found, just register
|
||||
logging.debug('Server has article %s', article)
|
||||
logging.debug('Server has article %s', art_id)
|
||||
register = True
|
||||
elif not killed and not found:
|
||||
logme = Ta('Badly formed yEnc article in %s') % article
|
||||
logme = Ta('Badly formed yEnc article in %s') % art_id
|
||||
logging.info(logme)
|
||||
|
||||
if not found:
|
||||
if not found or killed:
|
||||
new_server_found = self.__search_new_server(article)
|
||||
if new_server_found:
|
||||
register = False
|
||||
logme = None
|
||||
|
||||
except:
|
||||
logme = Ta('Unknown Error while decoding %s') % article
|
||||
logme = Ta('Unknown Error while decoding %s') % art_id
|
||||
logging.info(logme)
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
|
||||
@@ -163,7 +172,10 @@ class Decoder(Thread):
|
||||
logme = None
|
||||
|
||||
if logme:
|
||||
article.nzf.nzo.inc_log('bad_art_log', logme)
|
||||
if killed:
|
||||
article.nzf.nzo.inc_log('killed_art_log', art_id)
|
||||
else:
|
||||
article.nzf.nzo.inc_log('bad_art_log', art_id)
|
||||
|
||||
else:
|
||||
new_server_found = self.__search_new_server(article)
|
||||
@@ -234,7 +246,7 @@ def decode(article, data):
|
||||
if not ybegin:
|
||||
found = False
|
||||
try:
|
||||
for i in xrange(10):
|
||||
for i in xrange(min(40, len(data))):
|
||||
if data[i].startswith('begin '):
|
||||
nzf.filename = name_fixer(data[i].split(None, 2)[2])
|
||||
nzf.type = 'uu'
|
||||
@@ -298,7 +310,7 @@ def yCheck(data):
|
||||
yend = None
|
||||
|
||||
## Check head
|
||||
for i in xrange(40):
|
||||
for i in xrange(min(40, len(data))):
|
||||
try:
|
||||
if data[i].startswith('=ybegin '):
|
||||
splits = 3
|
||||
|
||||
@@ -59,7 +59,8 @@ def CompareStat(tup1, tup2):
|
||||
return True
|
||||
|
||||
|
||||
def ProcessArchiveFile(filename, path, pp=None, script=None, cat=None, catdir=None, keep=False, priority=None, url=''):
|
||||
def ProcessArchiveFile(filename, path, pp=None, script=None, cat=None, catdir=None, keep=False,
|
||||
priority=None, url='', nzbname=None):
|
||||
""" Analyse ZIP file and create job(s).
|
||||
Accepts ZIP files with ONLY nzb/nfo/folder files in it.
|
||||
returns (status, nzo_ids)
|
||||
@@ -88,6 +89,7 @@ def ProcessArchiveFile(filename, path, pp=None, script=None, cat=None, catdir=No
|
||||
status = 1
|
||||
names = zf.namelist()
|
||||
names.sort()
|
||||
nzbcount = 0
|
||||
for name in names:
|
||||
name = name.lower()
|
||||
if not (name.endswith('.nzb') or name.endswith('.nfo') or name.endswith('/')):
|
||||
@@ -95,7 +97,10 @@ def ProcessArchiveFile(filename, path, pp=None, script=None, cat=None, catdir=No
|
||||
break
|
||||
elif name.endswith('.nzb'):
|
||||
status = 0
|
||||
nzbcount += 1
|
||||
if status == 0:
|
||||
if nzbcount != 1:
|
||||
nzbname = None
|
||||
for name in names:
|
||||
if name.lower().endswith('.nzb'):
|
||||
try:
|
||||
@@ -108,7 +113,8 @@ def ProcessArchiveFile(filename, path, pp=None, script=None, cat=None, catdir=No
|
||||
name = misc.sanitize_foldername(name)
|
||||
if data:
|
||||
try:
|
||||
nzo = nzbstuff.NzbObject(name, 0, pp, script, data, cat=cat, url=url, priority=priority)
|
||||
nzo = nzbstuff.NzbObject(name, 0, pp, script, data, cat=cat, url=url,
|
||||
priority=priority, nzbname=nzbname)
|
||||
except:
|
||||
nzo = None
|
||||
if nzo:
|
||||
@@ -171,6 +177,9 @@ def ProcessSingleFile(filename, path, pp=None, script=None, cat=None, catdir=Non
|
||||
except TypeError:
|
||||
# Duplicate, ignore
|
||||
nzo = None
|
||||
except ValueError:
|
||||
# Empty, but correct file
|
||||
return -1, nzo_ids
|
||||
except:
|
||||
if data.find("<nzb") >= 0 and data.find("</nzb") < 0:
|
||||
# Looks like an incomplete file, retry
|
||||
@@ -289,7 +298,7 @@ class DirScanner(threading.Thread):
|
||||
|
||||
for filename in files:
|
||||
path = os.path.join(folder, filename)
|
||||
if os.path.isdir(path) or path in self.ignored:
|
||||
if os.path.isdir(path) or path in self.ignored or filename[0] == '.':
|
||||
continue
|
||||
|
||||
ext = os.path.splitext(path)[1].lower()
|
||||
|
||||
@@ -47,6 +47,8 @@ _PENALTY_SHARE = 10 # Account sharing detected
|
||||
_PENALTY_TOOMANY = 10 # Too many connections
|
||||
_PENALTY_PERM = 10 # Permanent error, like bad username/password
|
||||
_PENALTY_SHORT = 1 # Minimal penalty when no_penalties is set
|
||||
_PENALTY_VERYSHORT = 0.1 # Error 400 without cause clues
|
||||
|
||||
|
||||
TIMER_LOCK = RLock()
|
||||
|
||||
@@ -77,7 +79,8 @@ class Server(object):
|
||||
self.warning = ''
|
||||
self.info = None # Will hold getaddrinfo() list
|
||||
self.request = False # True if a getaddrinfo() request is pending
|
||||
self.oddball = 'free.xsusenet.com' in host
|
||||
self.have_body = 'free.xsusenet.com' not in host
|
||||
self.have_stat = True # Assume server has "STAT", until proven otherwise
|
||||
|
||||
for i in range(threads):
|
||||
self.idle_threads.append(NewsWrapper(self, i+1))
|
||||
@@ -86,7 +89,7 @@ class Server(object):
|
||||
def hostip(self):
|
||||
""" Return a random entry from the possible IPs
|
||||
"""
|
||||
if cfg.random_server_ip() and self.info and len(self.info) > 1:
|
||||
if cfg.randomize_server_ip() and self.info and len(self.info) > 1:
|
||||
rnd = random.randint(0, len(self.info)-1)
|
||||
ip = self.info[rnd][4][0]
|
||||
logging.debug('For server %s, using IP %s' % (self.host, ip))
|
||||
@@ -502,8 +505,7 @@ class Downloader(Thread):
|
||||
ecode = msg[:3]
|
||||
display_msg = ' [%s]' % msg
|
||||
logging.debug('Server login problem: %s, %s', ecode, msg)
|
||||
if ((ecode in ('502', '400')) and clues_too_many(msg)) or \
|
||||
(ecode == '481' and clues_too_many(msg)):
|
||||
if ecode in ('502', '481', '400') and clues_too_many(msg):
|
||||
# Too many connections: remove this thread and reduce thread-setting for server
|
||||
# Plan to go back to the full number after a penalty timeout
|
||||
if server.active:
|
||||
@@ -531,7 +533,16 @@ class Downloader(Thread):
|
||||
if server.active:
|
||||
server.errormsg = Ta('Cannot connect to server %s [%s]') % ('', display_msg)
|
||||
logging.warning(Ta('Cannot connect to server %s [%s]'), '%s:%s' % (server.host, server.port), msg)
|
||||
penalty = _PENALTY_502
|
||||
if clues_pay(msg):
|
||||
penalty = _PENALTY_PERM
|
||||
else:
|
||||
penalty = _PENALTY_502
|
||||
block = True
|
||||
elif ecode == '400':
|
||||
# Temp connection problem?
|
||||
if server.active:
|
||||
logging.debug('Unspecified error 400 from server %s', server.host)
|
||||
penalty = _PENALTY_VERYSHORT
|
||||
block = True
|
||||
else:
|
||||
# Unknown error, just keep trying
|
||||
@@ -596,6 +607,19 @@ class Downloader(Thread):
|
||||
msg = T('Server %s requires user/password') % ('%s:%s' % (nw.server.host, nw.server.port))
|
||||
self.__reset_nw(nw, msg, quit=True)
|
||||
|
||||
elif code == '500':
|
||||
if nzo.precheck:
|
||||
# Assume "STAT" command is not supported
|
||||
server.have_stat = False
|
||||
logging.debug('Server %s does not support STAT', server.host)
|
||||
else:
|
||||
# Assume "BODY" command is not supported
|
||||
server.have_body = False
|
||||
logging.debug('Server %s does not support BODY', server.host)
|
||||
nw.lines = []
|
||||
nw.data = ''
|
||||
self.__request_article(nw)
|
||||
|
||||
if done:
|
||||
server.bad_cons = 0 # Succesful data, clear "bad" counter
|
||||
if sabnzbd.LOG_ALL:
|
||||
@@ -818,3 +842,13 @@ def clues_too_many_ip(text):
|
||||
if clue in text:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def clues_pay(text):
|
||||
""" Check for messages about payments
|
||||
"""
|
||||
text = text.lower()
|
||||
for clue in ('credits', 'paym', 'expired'):
|
||||
if clue in text:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -187,12 +187,16 @@ def send_with_template(prefix, parm):
|
||||
return ret
|
||||
|
||||
|
||||
def endjob(filename, msgid, cat, status, path, bytes, stages, script, script_output, script_ret):
|
||||
def endjob(filename, msgid, cat, status, path, bytes, fail_msg, stages, script, script_output, script_ret):
|
||||
""" Send end-of-job email """
|
||||
|
||||
# Translate the stage names
|
||||
tr = sabnzbd.api.Ttemplate
|
||||
xstages = {}
|
||||
if not status and fail_msg:
|
||||
xstages = {tr('stage-fail'): (fail_msg,)}
|
||||
else:
|
||||
xstages = {}
|
||||
|
||||
for stage in stages:
|
||||
lines = []
|
||||
for line in stages[stage]:
|
||||
|
||||
@@ -24,11 +24,13 @@ import os.path
|
||||
import logging
|
||||
import socket
|
||||
import time
|
||||
import subprocess
|
||||
from threading import Thread
|
||||
|
||||
import sabnzbd
|
||||
import sabnzbd.cfg
|
||||
from sabnzbd.encoding import unicoder, latin1
|
||||
from sabnzbd.constants import NOTIFY_KEYS
|
||||
from gntp import GNTPRegister
|
||||
from gntp.notifier import GrowlNotifier
|
||||
try:
|
||||
@@ -51,33 +53,36 @@ except:
|
||||
#------------------------------------------------------------------------------
|
||||
# Define translatable message table
|
||||
TT = lambda x:x
|
||||
_NOTIFICATION = {
|
||||
NOTIFICATION = {
|
||||
'startup' : TT('Startup/Shutdown'), #: Message class for Growl server
|
||||
'download' : TT('Added NZB'), #: Message class for Growl server
|
||||
'pp' : TT('Post-processing started'), #: Message class for Growl server
|
||||
'complete' : TT('Job finished'), #: Message class for Growl server
|
||||
'other' : TT('Other Messages') #: Message class for Growl server
|
||||
}
|
||||
_KEYS = ('startup', 'download', 'pp', 'complete', 'other')
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Setup platform dependent Growl support
|
||||
#
|
||||
_GROWL_ICON = None # Platform-dependant icon path
|
||||
_GROWL = None # Instance of the Notifier after registration
|
||||
_GROWL_REG = False # Succesful registration
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def get_icon(host):
|
||||
if host is None:
|
||||
icon = os.path.join(os.path.join(sabnzbd.DIR_PROG, 'icons'), 'sabnzbd.ico')
|
||||
if not os.path.isfile(icon):
|
||||
icon = os.path.join(sabnzbd.DIR_PROG, 'sabnzbd.ico')
|
||||
if not os.path.isfile(icon):
|
||||
icon = None
|
||||
def get_icon():
|
||||
icon = os.path.join(os.path.join(sabnzbd.DIR_PROG, 'icons'), 'sabnzbd.ico')
|
||||
if not os.path.isfile(icon):
|
||||
icon = os.path.join(sabnzbd.DIR_PROG, 'sabnzbd.ico')
|
||||
if os.path.isfile(icon):
|
||||
if sabnzbd.WIN32 or sabnzbd.DARWIN:
|
||||
fp = open(icon, 'rb')
|
||||
icon = fp.read()
|
||||
fp.close
|
||||
else:
|
||||
# Due to a bug in GNTP, need this work-around for Linux/Unix
|
||||
icon = 'http://sabnzbdplus.sourceforge.net/version/sabnzbd.ico'
|
||||
else:
|
||||
icon = 'http://sabnzbdplus.sourceforge.net/version/sabnzbd.ico'
|
||||
icon = None
|
||||
return icon
|
||||
|
||||
|
||||
@@ -101,24 +106,24 @@ def send_notification(title , msg, gtype, wait=False):
|
||||
""" Send Notification message
|
||||
Return '' when OK, otherwise an error string
|
||||
"""
|
||||
msg1 = ''
|
||||
msg2 = ''
|
||||
if sabnzbd.cfg.growl_enable():
|
||||
if _HAVE_CLASSIC_GROWL and not sabnzbd.cfg.growl_server():
|
||||
return send_local_growl(title, msg, gtype)
|
||||
else:
|
||||
if wait:
|
||||
msg1 = send_growl(title, msg, gtype)
|
||||
res = []
|
||||
if gtype in sabnzbd.cfg.notify_classes() or wait:
|
||||
if sabnzbd.DARWIN_ML and sabnzbd.cfg.ncenter_enable():
|
||||
res.append(send_notification_center(title, msg, gtype))
|
||||
if sabnzbd.cfg.growl_enable():
|
||||
if _HAVE_CLASSIC_GROWL and not sabnzbd.cfg.growl_server():
|
||||
return send_local_growl(title, msg, gtype)
|
||||
else:
|
||||
msg1 = 'ok'
|
||||
Thread(target=send_growl, args=(title, msg, gtype)).start()
|
||||
time.sleep(0.5)
|
||||
if have_ntfosd():
|
||||
msg2 = send_notify_osd(title, msg)
|
||||
if msg1 and msg2:
|
||||
return '%s / %s' % (msg1, msg2)
|
||||
return msg1 or msg2
|
||||
if wait:
|
||||
res.append(send_growl(title, msg, gtype))
|
||||
else:
|
||||
res.append('ok')
|
||||
Thread(target=send_growl, args=(title, msg, gtype)).start()
|
||||
time.sleep(0.5)
|
||||
if have_ntfosd():
|
||||
res.append(send_notify_osd(title, msg))
|
||||
|
||||
return ' / '.join([r for r in res if r])
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def reset_growl():
|
||||
@@ -136,10 +141,7 @@ def register_growl():
|
||||
error = None
|
||||
host, port = sabnzbd.misc.split_host(sabnzbd.cfg.growl_server())
|
||||
|
||||
if host:
|
||||
sys_name = '@' + sabnzbd.misc.hostname().lower()
|
||||
else:
|
||||
sys_name = ''
|
||||
sys_name = hostname(host)
|
||||
|
||||
# Clean up persistent data in GNTP to make re-registration work
|
||||
GNTPRegister.notifications = []
|
||||
@@ -147,9 +149,9 @@ def register_growl():
|
||||
|
||||
growler = GrowlNotifier(
|
||||
applicationName = 'SABnzbd%s' % sys_name,
|
||||
applicationIcon = get_icon(host or None),
|
||||
notifications = [Tx(_NOTIFICATION[key]) for key in _KEYS],
|
||||
hostname = host or None,
|
||||
applicationIcon = get_icon(),
|
||||
notifications = [Tx(NOTIFICATION[key]) for key in NOTIFY_KEYS],
|
||||
hostname = host or 'localhost',
|
||||
port = port or 23053,
|
||||
password = sabnzbd.cfg.growl_password() or None
|
||||
)
|
||||
@@ -172,6 +174,7 @@ def register_growl():
|
||||
except:
|
||||
error = 'Unknown Growl registration error'
|
||||
logging.debug(error)
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
del growler
|
||||
ret = None
|
||||
|
||||
@@ -196,12 +199,9 @@ def send_growl(title , msg, gtype):
|
||||
logging.debug('Send to Growl: %s %s %s', gtype, latin1(title), latin1(msg))
|
||||
try:
|
||||
ret = _GROWL.notify(
|
||||
noteType = Tx(_NOTIFICATION.get(gtype, 'other')),
|
||||
noteType = Tx(NOTIFICATION.get(gtype, 'other')),
|
||||
title = title,
|
||||
description = unicoder(msg),
|
||||
#icon = options.icon,
|
||||
#sticky = options.sticky,
|
||||
#priority = options.priority
|
||||
)
|
||||
if ret is None or isinstance(ret, bool):
|
||||
return None
|
||||
@@ -238,7 +238,7 @@ if _HAVE_CLASSIC_GROWL:
|
||||
""" Send to local Growl server, OSX-only """
|
||||
global _local_growl
|
||||
if not _local_growl:
|
||||
notes = [Tx(_NOTIFICATION[key]) for key in _KEYS]
|
||||
notes = [Tx(NOTIFICATION[key]) for key in NOTIFY_KEYS]
|
||||
_local_growl = Growl.GrowlNotifier(
|
||||
applicationName = 'SABnzbd',
|
||||
applicationIcon = _OSX_ICON,
|
||||
@@ -246,7 +246,7 @@ if _HAVE_CLASSIC_GROWL:
|
||||
defaultNotifications = notes
|
||||
)
|
||||
_local_growl.register()
|
||||
_local_growl.notify(Tx(_NOTIFICATION.get(gtype, 'other')), title, msg)
|
||||
_local_growl.notify(Tx(NOTIFICATION.get(gtype, 'other')), title, msg)
|
||||
return None
|
||||
|
||||
|
||||
@@ -277,3 +277,47 @@ if _HAVE_NTFOSD:
|
||||
return error
|
||||
else:
|
||||
return 'Not enabled'
|
||||
|
||||
|
||||
def ncenter_path():
|
||||
""" Return path of Notification Center tool, if it exists """
|
||||
tool = os.path.normpath(os.path.join(sabnzbd.DIR_PROG, '../Resources/SABnzbd.app/Contents/MacOS/SABnzbd'))
|
||||
if os.path.exists(tool):
|
||||
return tool
|
||||
else:
|
||||
return None
|
||||
|
||||
def send_notification_center(title, msg, gtype):
|
||||
""" Send message to Mountain Lion's Notification Center """
|
||||
tool = ncenter_path()
|
||||
if tool:
|
||||
try:
|
||||
command = [tool, '-title', title, '-message', msg, '-group', Tx(NOTIFICATION.get(gtype, 'other'))]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
|
||||
output = proc.stdout.read()
|
||||
proc.wait()
|
||||
if 'Notification delivered' in output:
|
||||
output = ''
|
||||
except:
|
||||
logging.info('Cannot run notifier "%s"', tool)
|
||||
logging.debug("Traceback: ", exc_info = True)
|
||||
output = 'Notifier tool crashed'
|
||||
else:
|
||||
output = 'Notifier app not found'
|
||||
return output.strip('*\n ')
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def hostname(host=True):
|
||||
""" Return host's pretty name """
|
||||
if sabnzbd.WIN32:
|
||||
sys_name = os.environ.get('computername', 'unknown')
|
||||
else:
|
||||
try:
|
||||
sys_name = os.uname()[1]
|
||||
except:
|
||||
sys_name = 'unknown'
|
||||
if host:
|
||||
return '@%s' % sys_name.lower()
|
||||
else:
|
||||
return ''
|
||||
|
||||
@@ -84,6 +84,12 @@ def check_server(host, port):
|
||||
return badParameterResponse(T('Server address "%s:%s" is not valid.') % (host, port))
|
||||
|
||||
|
||||
def check_access():
|
||||
""" Check if external address is allowed """
|
||||
referrer = cherrypy.request.remote.ip
|
||||
return referrer in ('127.0.0.1', '::1') or referrer.startswith(cfg.local_range())
|
||||
|
||||
|
||||
def ConvertSpecials(p):
|
||||
""" Convert None to 'None' and 'Default' to ''
|
||||
"""
|
||||
@@ -158,6 +164,8 @@ def set_auth(conf):
|
||||
|
||||
def check_session(kwargs):
|
||||
""" Check session key """
|
||||
if not check_access():
|
||||
return u'No access'
|
||||
key = kwargs.get('session')
|
||||
if not key:
|
||||
key = kwargs.get('apikey')
|
||||
@@ -176,6 +184,10 @@ def check_apikey(kwargs, nokey=False):
|
||||
""" Check api key or nzbkey
|
||||
Return None when OK, otherwise an error message
|
||||
"""
|
||||
def log_warning(txt):
|
||||
txt = '%s %s>%s' % (txt, cherrypy.request.remote.ip, cherrypy.request.headers.get('User-Agent', '??'))
|
||||
logging.warning('%s', txt)
|
||||
|
||||
output = kwargs.get('output')
|
||||
mode = kwargs.get('mode', '')
|
||||
callback = kwargs.get('callback')
|
||||
@@ -188,19 +200,22 @@ def check_apikey(kwargs, nokey=False):
|
||||
# For NZB upload calls, a separate key can be used
|
||||
nzbkey = kwargs.get('mode', '') in ('addid', 'addurl', 'addfile', 'addlocalfile')
|
||||
|
||||
if not nzbkey and not check_access():
|
||||
return report(output, 'No access')
|
||||
|
||||
# First check APIKEY, if OK that's sufficient
|
||||
if not (cfg.disable_key() or nokey):
|
||||
key = kwargs.get('apikey')
|
||||
if not key:
|
||||
if not special:
|
||||
logging.warning(Ta('API Key missing, please enter the api key from Config->General into your 3rd party program:'))
|
||||
log_warning(Ta('API Key missing, please enter the api key from Config->General into your 3rd party program:'))
|
||||
return report(output, 'API Key Required', callback=callback)
|
||||
elif nzbkey and key == cfg.nzb_key():
|
||||
return None
|
||||
elif key == cfg.api_key():
|
||||
return None
|
||||
else:
|
||||
logging.warning(Ta('API Key incorrect, Use the api key from Config->General in your 3rd party program:'))
|
||||
log_warning(Ta('API Key incorrect, Use the api key from Config->General in your 3rd party program:'))
|
||||
return report(output, 'API Key Incorrect', callback=callback)
|
||||
|
||||
# No active APIKEY, check web credentials instead
|
||||
@@ -209,7 +224,7 @@ def check_apikey(kwargs, nokey=False):
|
||||
pass
|
||||
else:
|
||||
if not special:
|
||||
logging.warning(Ta('Authentication missing, please enter username/password from Config->General into your 3rd party program:'))
|
||||
log_warning(Ta('Authentication missing, please enter username/password from Config->General into your 3rd party program:'))
|
||||
return report(output, 'Missing authentication', callback=callback)
|
||||
return None
|
||||
|
||||
@@ -249,6 +264,8 @@ class MainPage(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if not check_access(): return Protected()
|
||||
|
||||
if sabnzbd.OLD_QUEUE and not cfg.warned_old_queue():
|
||||
cfg.warned_old_queue.set(True)
|
||||
config.save_config()
|
||||
@@ -293,6 +310,7 @@ class MainPage(object):
|
||||
|
||||
|
||||
def add_handler(self, kwargs):
|
||||
if not check_access(): return Protected()
|
||||
id = kwargs.get('id', '')
|
||||
if not id:
|
||||
id = kwargs.get('url', '')
|
||||
@@ -397,7 +415,9 @@ class MainPage(object):
|
||||
def api(self, **kwargs):
|
||||
"""Handler for API over http, with explicit authentication parameters
|
||||
"""
|
||||
logging.debug('API-call from %s %s', cherrypy.request.remote.ip, kwargs)
|
||||
if not kwargs.get('tickleme') or not cfg.web_watchdog():
|
||||
logging.debug('API-call from %s [%s] %s', cherrypy.request.remote.ip, \
|
||||
cherrypy.request.headers.get('User-Agent', '??'), kwargs)
|
||||
if kwargs.get('mode', '') not in ('version', 'auth'):
|
||||
msg = check_apikey(kwargs)
|
||||
if msg: return msg
|
||||
@@ -407,6 +427,7 @@ class MainPage(object):
|
||||
def scriptlog(self, **kwargs):
|
||||
""" Duplicate of scriptlog of History, needed for some skins """
|
||||
# No session key check, due to fixed URLs
|
||||
if not check_access(): return Protected()
|
||||
|
||||
name = kwargs.get('name')
|
||||
if name:
|
||||
@@ -458,7 +479,7 @@ class NzoPage(object):
|
||||
# /nzb/SABnzbd_nzo_xxxxx/files
|
||||
# /nzb/SABnzbd_nzo_xxxxx/bulk_operation
|
||||
# /nzb/SABnzbd_nzo_xxxxx/save
|
||||
|
||||
if not check_access(): return Protected()
|
||||
nzo_id = None
|
||||
for a in args:
|
||||
if a.startswith('SABnzbd_nzo'):
|
||||
@@ -629,6 +650,7 @@ class QueuePage(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if not check_access(): return Protected()
|
||||
start = kwargs.get('start')
|
||||
limit = kwargs.get('limit')
|
||||
dummy2 = kwargs.get('dummy2')
|
||||
@@ -845,6 +867,7 @@ class HistoryPage(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if not check_access(): return Protected()
|
||||
start = kwargs.get('start')
|
||||
limit = kwargs.get('limit')
|
||||
search = kwargs.get('search')
|
||||
@@ -863,9 +886,11 @@ class HistoryPage(object):
|
||||
#history_items, total_bytes, bytes_beginning = sabnzbd.history_info()
|
||||
#history['bytes_beginning'] = "%.2f" % (bytes_beginning / GIGI)
|
||||
|
||||
postfix = T('B') #: Abbreviation for bytes, as in GB
|
||||
grand, month, week, day = BPSMeter.do.get_sums()
|
||||
history['total_size'], history['month_size'], history['week_size'], history['day_size'] = \
|
||||
to_units(grand), to_units(month), to_units(week), to_units(day)
|
||||
to_units(grand, postfix=postfix), to_units(month, postfix=postfix), \
|
||||
to_units(week, postfix=postfix), to_units(day, postfix=postfix)
|
||||
|
||||
history['lines'], history['fetched'], history['noofslots'] = build_history(limit=limit, start=start, verbose=self.__verbose, verbose_list=self.__verbose_list, search=search, failed_only=failed_only)
|
||||
|
||||
@@ -963,7 +988,7 @@ class HistoryPage(object):
|
||||
def scriptlog(self, **kwargs):
|
||||
""" Duplicate of scriptlog of History, needed for some skins """
|
||||
# No session key check, due to fixed URLs
|
||||
|
||||
if not check_access(): return Protected()
|
||||
name = kwargs.get('name')
|
||||
if name:
|
||||
history_db = cherrypy.thread_data.history_db
|
||||
@@ -1009,6 +1034,7 @@ class ConfigPage(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if not check_access(): return Protected()
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
|
||||
conf['configfn'] = config.get_filename()
|
||||
@@ -1018,6 +1044,7 @@ class ConfigPage(object):
|
||||
for svr in config.get_servers():
|
||||
new[svr] = {}
|
||||
conf['servers'] = new
|
||||
conf['news_items'] = cfg.news_items()
|
||||
|
||||
conf['folders'] = sabnzbd.nzbqueue.scan_jobs(all=False, action=False)
|
||||
|
||||
@@ -1065,12 +1092,14 @@ class ConfigPage(object):
|
||||
def orphan_delete(kwargs):
|
||||
path = kwargs.get('name')
|
||||
if path:
|
||||
path = platform_encode(path)
|
||||
path = os.path.join(cfg.download_dir.get_path(), path)
|
||||
remove_all(path, recursive=True)
|
||||
|
||||
def orphan_add(kwargs):
|
||||
path = kwargs.get('name')
|
||||
if path:
|
||||
path = platform_encode(path)
|
||||
path = os.path.join(cfg.download_dir.get_path(), path)
|
||||
sabnzbd.nzbqueue.repair_job(path, None)
|
||||
|
||||
@@ -1090,7 +1119,7 @@ class ConfigFolders(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1134,7 +1163,7 @@ SWITCH_LIST = \
|
||||
'ignore_samples', 'pause_on_post_processing', 'quick_check', 'nice', 'ionice',
|
||||
'ssl_type', 'pre_script', 'pause_on_pwrar', 'ampm', 'sfv_check', 'folder_rename',
|
||||
'unpack_check', 'quota_size', 'quota_day', 'quota_resume', 'quota_period',
|
||||
'pre_check', 'max_art_tries', 'max_art_opt'
|
||||
'pre_check', 'max_art_tries', 'max_art_opt', 'fail_hopeless'
|
||||
)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -1146,7 +1175,7 @@ class ConfigSwitches(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1186,14 +1215,18 @@ class ConfigSwitches(object):
|
||||
SPECIAL_BOOL_LIST = \
|
||||
( 'start_paused', 'no_penalties', 'ignore_wrong_unrar', 'create_group_folders',
|
||||
'queue_complete_pers', 'api_warnings', 'allow_64bit_tools', 'par2_multicore',
|
||||
'never_repair', 'allow_streaming', 'ignore_unrar_dates', 'rss_filenames',
|
||||
'never_repair', 'allow_streaming', 'ignore_unrar_dates', 'rss_filenames', 'news_items',
|
||||
'osx_menu', 'osx_speed', 'win_menu', 'uniconfig', 'use_pickle', 'allow_incomplete_nzb',
|
||||
'random_server_ip', 'no_ipv6'
|
||||
'randomize_server_ip', 'no_ipv6', 'keep_awake', 'overwrite_files', 'empty_postproc',
|
||||
'web_watchdog', 'wait_for_dfolder', 'warn_empty_nzb'
|
||||
)
|
||||
SPECIAL_VALUE_LIST = \
|
||||
( 'size_limit', 'folder_max_length', 'fsys_type', 'movie_rename_limit', 'nomedia_marker',
|
||||
'req_completion_rate', 'wait_ext_drive'
|
||||
'req_completion_rate', 'wait_ext_drive', 'history_limit', 'show_sysload', 'ipv6_servers'
|
||||
)
|
||||
SPECIAL_LIST_LIST = \
|
||||
( 'rss_odd_titles', 'prio_sort_list'
|
||||
)
|
||||
|
||||
class ConfigSpecial(object):
|
||||
def __init__(self, web_dir, root, prim):
|
||||
@@ -1203,7 +1236,7 @@ class ConfigSpecial(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1212,6 +1245,7 @@ class ConfigSpecial(object):
|
||||
|
||||
conf['switches'] = [ (kw, config.get_config('misc', kw)(), config.get_config('misc', kw).default()) for kw in SPECIAL_BOOL_LIST]
|
||||
conf['entries'] = [ (kw, config.get_config('misc', kw)(), config.get_config('misc', kw).default()) for kw in SPECIAL_VALUE_LIST]
|
||||
conf['entries'].extend( [ (kw, config.get_config('misc', kw).get_string(), '') for kw in SPECIAL_LIST_LIST] )
|
||||
|
||||
template = Template(file=os.path.join(self.__web_dir, 'config_special.tmpl'),
|
||||
filter=FILTER, searchList=[conf], compilerSettings=DIRECTIVES)
|
||||
@@ -1222,7 +1256,7 @@ class ConfigSpecial(object):
|
||||
msg = check_session(kwargs)
|
||||
if msg: return msg
|
||||
|
||||
for kw in SPECIAL_BOOL_LIST + SPECIAL_VALUE_LIST:
|
||||
for kw in SPECIAL_BOOL_LIST + SPECIAL_VALUE_LIST + SPECIAL_LIST_LIST:
|
||||
item = config.get_config('misc', kw)
|
||||
value = kwargs.get(kw)
|
||||
msg = item.set(value)
|
||||
@@ -1236,8 +1270,8 @@ class ConfigSpecial(object):
|
||||
#------------------------------------------------------------------------------
|
||||
GENERAL_LIST = (
|
||||
'host', 'port', 'username', 'password', 'disable_api_key',
|
||||
'refresh_rate', 'cache_limit',
|
||||
'enable_https', 'https_port', 'https_cert', 'https_key'
|
||||
'refresh_rate', 'cache_limit', 'local_range',
|
||||
'enable_https', 'https_port', 'https_cert', 'https_key', 'https_chain'
|
||||
)
|
||||
|
||||
class ConfigGeneral(object):
|
||||
@@ -1271,7 +1305,7 @@ class ConfigGeneral(object):
|
||||
else:
|
||||
return ''
|
||||
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1335,6 +1369,7 @@ class ConfigGeneral(object):
|
||||
conf['https_port'] = cfg.https_port()
|
||||
conf['https_cert'] = cfg.https_cert()
|
||||
conf['https_key'] = cfg.https_key()
|
||||
conf['https_chain'] = cfg.https_chain()
|
||||
conf['enable_https'] = cfg.enable_https()
|
||||
conf['username'] = cfg.username()
|
||||
conf['password'] = cfg.password.get_stars()
|
||||
@@ -1343,6 +1378,8 @@ class ConfigGeneral(object):
|
||||
conf['cache_limit'] = cfg.cache_limit()
|
||||
conf['cleanup_list'] = cfg.cleanup_list.get_string()
|
||||
conf['nzb_key'] = cfg.nzb_key()
|
||||
conf['local_range'] = cfg.local_range()
|
||||
conf['my_lcldata'] = cfg.admin_dir.get_path()
|
||||
|
||||
template = Template(file=os.path.join(self.__web_dir, 'config_general.tmpl'),
|
||||
filter=FILTER, searchList=[conf], compilerSettings=DIRECTIVES)
|
||||
@@ -1450,7 +1487,7 @@ class ConfigServer(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1506,6 +1543,18 @@ class ConfigServer(object):
|
||||
BPSMeter.do.clear_server(server)
|
||||
raise dcRaiser(self.__root, kwargs)
|
||||
|
||||
@cherrypy.expose
|
||||
def toggleServer(self, **kwargs):
|
||||
msg = check_session(kwargs)
|
||||
if msg: return msg
|
||||
server = kwargs.get('server')
|
||||
if server:
|
||||
svr = config.get_config('servers', server)
|
||||
svr.enable.set(not svr.enable())
|
||||
config.save_config()
|
||||
Downloader.do.update_server(server, server)
|
||||
raise dcRaiser(self.__root, kwargs)
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def unique_svr_name(server):
|
||||
@@ -1597,7 +1646,7 @@ class ConfigRss(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -1627,6 +1676,7 @@ class ConfigRss(object):
|
||||
active_feed = kwargs.get('feed', '')
|
||||
conf['active_feed'] = active_feed
|
||||
conf['rss'] = rss
|
||||
conf['rss_next'] = time.strftime(time_format('%H:%M'),time.localtime(sabnzbd.rss.next_run()))
|
||||
|
||||
if active_feed:
|
||||
readout = bool(self.__refresh_readout)
|
||||
@@ -1873,7 +1923,7 @@ class ConfigRss(object):
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
_SCHED_ACTIONS = ('resume', 'pause', 'pause_all', 'shutdown', 'restart', 'speedlimit',
|
||||
'pause_post', 'resume_post', 'scan_folder', 'rss_scan')
|
||||
'pause_post', 'resume_post', 'scan_folder', 'rss_scan', 'remove_failed')
|
||||
|
||||
class ConfigScheduling(object):
|
||||
def __init__(self, web_dir, root, prim):
|
||||
@@ -1895,22 +1945,22 @@ class ConfigScheduling(object):
|
||||
days["7"] = T('Sunday')
|
||||
return days
|
||||
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
|
||||
actions = []
|
||||
actions.extend(_SCHED_ACTIONS)
|
||||
days = get_days()
|
||||
day_names = get_days()
|
||||
conf['schedlines'] = []
|
||||
snum = 1
|
||||
conf['taskinfo'] = []
|
||||
for ev in scheduler.sort_schedules(forward=True):
|
||||
for ev in scheduler.sort_schedules(all_events=False):
|
||||
line = ev[3]
|
||||
conf['schedlines'].append(line)
|
||||
try:
|
||||
m, h, day, action = line.split(' ', 3)
|
||||
m, h, day_numbers, action = line.split(' ', 3)
|
||||
except:
|
||||
continue
|
||||
action = action.strip()
|
||||
@@ -1930,7 +1980,17 @@ class ConfigScheduling(object):
|
||||
act = ''
|
||||
if act in ('enable_server', 'disable_server'):
|
||||
action = Ttemplate("sch-" + act) + ' ' + server
|
||||
item = (snum, '%02d' % int(h), '%02d' % int(m), days.get(day, '**'), '%s %s' % (action, value))
|
||||
|
||||
if day_numbers == "1234567":
|
||||
days_of_week = "Daily"
|
||||
elif day_numbers == "12345":
|
||||
days_of_week = "Weekdays"
|
||||
elif day_numbers == "67":
|
||||
days_of_week = "Weekends"
|
||||
else:
|
||||
days_of_week = ", ".join([day_names.get(i, "**") for i in day_numbers])
|
||||
item = (snum, '%02d' % int(h), '%02d' % int(m), days_of_week, '%s %s' % (action, value))
|
||||
|
||||
conf['taskinfo'].append(item)
|
||||
snum += 1
|
||||
|
||||
@@ -1955,7 +2015,9 @@ class ConfigScheduling(object):
|
||||
|
||||
minute = kwargs.get('minute')
|
||||
hour = kwargs.get('hour')
|
||||
dayofweek = kwargs.get('dayofweek')
|
||||
days_of_week = ''.join([str(x) for x in kwargs.get('daysofweek', '')])
|
||||
if not days_of_week:
|
||||
days_of_week = '1234567'
|
||||
action = kwargs.get('action')
|
||||
arguments = kwargs.get('arguments')
|
||||
|
||||
@@ -1965,7 +2027,7 @@ class ConfigScheduling(object):
|
||||
elif arguments in ('off','disable'):
|
||||
arguments = '0'
|
||||
|
||||
if minute and hour and dayofweek and action:
|
||||
if minute and hour and days_of_week and action:
|
||||
if action == 'speedlimit':
|
||||
if not (arguments and arguments.isdigit()):
|
||||
action = '0'
|
||||
@@ -1984,7 +2046,7 @@ class ConfigScheduling(object):
|
||||
if action:
|
||||
sched = cfg.schedules()
|
||||
sched.append('%s %s %s %s %s' %
|
||||
(minute, hour, dayofweek, action, arguments))
|
||||
(minute, hour, days_of_week, action, arguments))
|
||||
cfg.schedules.set(sched)
|
||||
|
||||
config.save_config()
|
||||
@@ -2015,7 +2077,7 @@ class ConfigIndexers(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -2098,7 +2160,7 @@ class ConfigCats(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -2172,7 +2234,7 @@ class ConfigSorting(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -2225,6 +2287,7 @@ class Status(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if not check_access(): return Protected()
|
||||
header, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
|
||||
header['logfile'] = sabnzbd.LOGFILE
|
||||
@@ -2476,10 +2539,15 @@ def GetRssLog(feed):
|
||||
# Sort in the order the jobs came from the feed
|
||||
names.sort(lambda x, y: jobs[x].get('order', 0) - jobs[y].get('order', 0))
|
||||
|
||||
done = [xml_name(jobs[job]['title']) for job in names if jobs[job]['status'] == 'D']
|
||||
good = [make_item(jobs[job]) for job in names if jobs[job]['status'][0] == 'G']
|
||||
bad = [make_item(jobs[job]) for job in names if jobs[job]['status'][0] == 'B']
|
||||
|
||||
# Sort in reverse order of time stamp for 'Done'
|
||||
dnames = [job for job in jobs.keys() if jobs[job]['status'] == 'D']
|
||||
dnames.sort(lambda x, y: jobs[y].get('timestamp', 0) - jobs[x].get('timestamp', 0))
|
||||
done = [xml_name(jobs[job]['title']) for job in dnames]
|
||||
|
||||
|
||||
return done, good, bad
|
||||
|
||||
def ShowRssLog(feed, all):
|
||||
@@ -2563,7 +2631,7 @@ LIST_EMAIL = (
|
||||
'email_server', 'email_to', 'email_from',
|
||||
'email_account', 'email_pwd', 'email_dir', 'email_rss'
|
||||
)
|
||||
LIST_GROWL = ('growl_enable', 'growl_server', 'growl_password', 'ntfosd_enable')
|
||||
LIST_GROWL = ('growl_enable', 'growl_server', 'growl_password', 'ntfosd_enable', 'ncenter_enable')
|
||||
|
||||
class ConfigNotify(object):
|
||||
def __init__(self, web_dir, root, prim):
|
||||
@@ -2574,7 +2642,7 @@ class ConfigNotify(object):
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self, **kwargs):
|
||||
if cfg.configlock():
|
||||
if cfg.configlock() or not check_access():
|
||||
return Protected()
|
||||
|
||||
conf, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
|
||||
@@ -2583,11 +2651,15 @@ class ConfigNotify(object):
|
||||
conf['lastmail'] = self.__lastmail
|
||||
conf['have_growl'] = True
|
||||
conf['have_ntfosd'] = sabnzbd.growler.have_ntfosd()
|
||||
conf['have_ncenter'] = sabnzbd.DARWIN_ML and bool(sabnzbd.growler.ncenter_path())
|
||||
|
||||
for kw in LIST_EMAIL:
|
||||
conf[kw] = config.get_config('misc', kw).get_string()
|
||||
for kw in LIST_GROWL:
|
||||
conf[kw] = config.get_config('growl', kw).get_string()
|
||||
conf['notify_list'] = NOTIFY_KEYS
|
||||
conf['notify_classes'] = cfg.notify_classes.get_string()
|
||||
conf['notify_texts'] = sabnzbd.growler.NOTIFICATION
|
||||
|
||||
template = Template(file=os.path.join(self.__web_dir, 'config_notify.tmpl'),
|
||||
filter=FILTER, searchList=[conf], compilerSettings=DIRECTIVES)
|
||||
@@ -2606,6 +2678,7 @@ class ConfigNotify(object):
|
||||
msg = config.get_config('growl', kw).set(platform_encode(kwargs.get(kw)))
|
||||
if msg:
|
||||
return badParameterResponse(T('Incorrect value for %s: %s') % (kw, unicoder(msg)))
|
||||
cfg.notify_classes.set(kwargs.get('notify_classes', ''))
|
||||
|
||||
config.save_config()
|
||||
self.__lastmail = None
|
||||
|
||||
105
sabnzbd/misc.py
105
sabnzbd/misc.py
@@ -39,7 +39,7 @@ except:
|
||||
|
||||
import sabnzbd
|
||||
from sabnzbd.decorators import synchronized
|
||||
from sabnzbd.constants import DEFAULT_PRIORITY, FUTURE_Q_FOLDER, JOB_ADMIN, GIGI, VERIFIED_FILE, Status
|
||||
from sabnzbd.constants import DEFAULT_PRIORITY, FUTURE_Q_FOLDER, JOB_ADMIN, GIGI, Status, MEBI
|
||||
import sabnzbd.config as config
|
||||
import sabnzbd.cfg as cfg
|
||||
from sabnzbd.encoding import unicoder, latin1
|
||||
@@ -259,10 +259,10 @@ def sanitize_foldername(name):
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def verified_flag_file(path, create=False):
|
||||
def flag_file(path, flag, create=False):
|
||||
""" Create verify flag file or return True if it already exists """
|
||||
path = os.path.join(path, JOB_ADMIN)
|
||||
path = os.path.join(path, VERIFIED_FILE)
|
||||
path = os.path.join(path, flag)
|
||||
if create:
|
||||
try:
|
||||
f = open(path, 'w')
|
||||
@@ -590,11 +590,20 @@ def check_latest_version():
|
||||
|
||||
logging.debug("Checked for a new release, cur= %s, latest= %s (on %s)", current, latest, url)
|
||||
|
||||
if latest_test and cfg.version_check() > 1:
|
||||
# User always wants to see the latest test release
|
||||
latest = latest_test
|
||||
url = url_beta
|
||||
|
||||
if testver and current < latest:
|
||||
# This is a test version, but user has't seen the
|
||||
# "Final" of this one yet, so show the Final
|
||||
sabnzbd.NEW_VERSION = "%s;%s" % (latest_label, url)
|
||||
elif current < latest:
|
||||
# This one is behind, show latest final
|
||||
sabnzbd.NEW_VERSION = "%s;%s" % (latest_label, url)
|
||||
elif testver and current < latest_test:
|
||||
# This is a test version beyond the latest Final, so show latest Alpha/Beta/RC
|
||||
sabnzbd.NEW_VERSION = "%s;%s" % (latest_testlabel, url_beta)
|
||||
|
||||
|
||||
@@ -622,7 +631,7 @@ def from_units(val):
|
||||
else:
|
||||
return 0.0
|
||||
|
||||
def to_units(val, spaces=0, dec_limit=2):
|
||||
def to_units(val, spaces=0, dec_limit=2, postfix=''):
|
||||
""" Convert number to K/M/G/T/P notation
|
||||
Add "spaces" if not ending in letter
|
||||
dig_limit==1 show single decimal for M and higher
|
||||
@@ -651,8 +660,8 @@ def to_units(val, spaces=0, dec_limit=2):
|
||||
else:
|
||||
decimals = 0
|
||||
|
||||
format = '%%s%%.%sf %%s' % decimals
|
||||
return format % (sign, val, unit)
|
||||
format = '%%s%%.%sf %%s%%s' % decimals
|
||||
return format % (sign, val, unit, postfix)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def same_file(a, b):
|
||||
@@ -707,17 +716,6 @@ def split_host(srv):
|
||||
return (host, port)
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def hostname():
|
||||
""" Return host's pretty name """
|
||||
if sabnzbd.WIN32:
|
||||
return os.environ.get('computername', 'unknown')
|
||||
try:
|
||||
return os.uname()[1]
|
||||
except:
|
||||
return 'unknown'
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
def check_mount(path):
|
||||
""" Return False if volume isn't mounted on Linux or OSX
|
||||
@@ -788,13 +786,23 @@ def create_dirs(dirpath):
|
||||
|
||||
|
||||
@synchronized(DIR_LOCK)
|
||||
def move_to_path(path, new_path, unique=True):
|
||||
""" Move a file to a new path, optionally give unique filename """
|
||||
if unique:
|
||||
new_path = get_unique_path(new_path, create_dir=False)
|
||||
def move_to_path(path, new_path):
|
||||
""" Move a file to a new path, optionally give unique filename
|
||||
Return (ok, new_path)
|
||||
"""
|
||||
ok = True
|
||||
overwrite = cfg.overwrite_files()
|
||||
if overwrite and os.path.exists(new_path):
|
||||
try:
|
||||
os.remove(new_path)
|
||||
except:
|
||||
overwrite = False
|
||||
if not overwrite:
|
||||
new_path = get_unique_filename(new_path)
|
||||
|
||||
if new_path:
|
||||
logging.debug("Moving. Old path:%s new path:%s unique?:%s",
|
||||
path,new_path, unique)
|
||||
logging.debug("Moving. Old path:%s new path:%s overwrite?:%s",
|
||||
path, new_path, overwrite)
|
||||
try:
|
||||
# First try cheap rename
|
||||
renamer(path, new_path)
|
||||
@@ -809,8 +817,8 @@ def move_to_path(path, new_path, unique=True):
|
||||
if not (cfg.marker_file() and cfg.marker_file() in path):
|
||||
logging.error(Ta('Failed moving %s to %s'), path, new_path)
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
new_path = None
|
||||
return new_path
|
||||
ok = False
|
||||
return ok, new_path
|
||||
|
||||
|
||||
@synchronized(DIR_LOCK)
|
||||
@@ -829,6 +837,10 @@ def cleanup_empty_directories(path):
|
||||
pass
|
||||
if not repeat:
|
||||
break
|
||||
try:
|
||||
remove_dir(path)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@synchronized(DIR_LOCK)
|
||||
@@ -987,15 +999,40 @@ def get_filename(path):
|
||||
except:
|
||||
return ''
|
||||
|
||||
|
||||
def memory_usage():
|
||||
try:
|
||||
# Probably only works on Linux because it uses /proc/<pid>/statm
|
||||
t = open('/proc/%d/statm' % os.getpid())
|
||||
v = t.read().split()
|
||||
t.close()
|
||||
virt = int(_PAGE_SIZE * int(v[0]) / MEBI)
|
||||
res = int(_PAGE_SIZE * int(v[1]) / MEBI)
|
||||
return "V=%sM R=%sM" % (virt, res)
|
||||
except:
|
||||
return ''
|
||||
|
||||
try:
|
||||
_PAGE_SIZE = os.sysconf("SC_PAGE_SIZE")
|
||||
except:
|
||||
_PAGE_SIZE = 0
|
||||
_HAVE_STATM = _PAGE_SIZE and memory_usage()
|
||||
|
||||
|
||||
def loadavg():
|
||||
""" Return 1, 5 and 15 minute load average of host or "" if not supported
|
||||
"""
|
||||
if sabnzbd.WIN32 or sabnzbd.DARWIN:
|
||||
return ""
|
||||
try:
|
||||
return "%.2f | %.2f | %.2f" % os.getloadavg()
|
||||
except:
|
||||
return ""
|
||||
p = ''
|
||||
if not sabnzbd.WIN32 and not sabnzbd.DARWIN:
|
||||
opt = cfg.show_sysload()
|
||||
if opt:
|
||||
try:
|
||||
p = '%.2f | %.2f | %.2f' % os.getloadavg()
|
||||
except:
|
||||
pass
|
||||
if opt > 1 and _HAVE_STATM:
|
||||
p = '%s | %s' % (p, memory_usage())
|
||||
return p
|
||||
|
||||
|
||||
def format_time_string(seconds, days=0):
|
||||
@@ -1044,7 +1081,11 @@ def int_conv(value):
|
||||
# Diskfree
|
||||
if sabnzbd.WIN32:
|
||||
# windows diskfree
|
||||
import win32api
|
||||
try:
|
||||
# Careful here, because win32api test hasn't been done yet!
|
||||
import win32api
|
||||
except:
|
||||
pass
|
||||
def diskfree(_dir):
|
||||
""" Return amount of free diskspace in GBytes
|
||||
"""
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user