mirror of
https://github.com/sabnzbd/sabnzbd.git
synced 2026-01-06 06:28:45 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b0580c3fd | ||
|
|
1feaf775d4 | ||
|
|
322436a9b9 | ||
|
|
2d633daf06 | ||
|
|
03fc8da459 | ||
|
|
8134dd0d32 | ||
|
|
45f6418163 | ||
|
|
bfe4fe0a6d | ||
|
|
6efbe4563c | ||
|
|
c1c27c1c69 | ||
|
|
befe9141fc |
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------------------
|
||||
0.6.2Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
- Fixed association of NZB files with SABnzbd, when using HTTPS-only on Windows Vista/7
|
||||
(resulted in multiple running copies of SABnzbd instead of an NZB upload)
|
||||
- Fixed incorrect email date header when using other language than English
|
||||
-------------------------------------------------------------------------------
|
||||
0.6.1Final by The SABnzbd-Team
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
4
PKG-INFO
4
PKG-INFO
@@ -1,7 +1,7 @@
|
||||
Metadata-Version: 1.0
|
||||
Name: SABnzbd
|
||||
Version: 0.6.1
|
||||
Summary: SABnzbd-0.6.1
|
||||
Version: 0.6.2
|
||||
Summary: SABnzbd-0.6.2
|
||||
Home-page: http://sourceforge.net/projects/sabnzbdplus
|
||||
Author: The SABnzbd Team
|
||||
Author-email: team@sabnzbd.org
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
\paperw11900\paperh16840\vieww16360\viewh15680\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f0\b\fs48 \cf0 SABnzbd 0.6.1\
|
||||
\f0\b\fs48 \cf0 SABnzbd 0.6.2\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
|
||||
|
||||
\b0\fs26 \cf0 \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*******************************************
|
||||
*** This is SABnzbd 0.6.1 ***
|
||||
*** This is SABnzbd 0.6.2 ***
|
||||
*******************************************
|
||||
SABnzbd is an open-source cross-platform binary newsreader.
|
||||
It simplifies the process of downloading from Usenet dramatically,
|
||||
|
||||
23
SABnzbd.py
23
SABnzbd.py
@@ -613,11 +613,9 @@ def get_webhost(cherryhost, cherryport, https_port):
|
||||
def is_sabnzbd_running(url):
|
||||
""" Return True when there's already a SABnzbd instance running.
|
||||
"""
|
||||
import urllib2
|
||||
try:
|
||||
url = '%s&mode=version' % (url)
|
||||
s = urllib2.urlopen(url)
|
||||
ver = s.read()
|
||||
ver = sabnzbd.newsunpack.get_from_url(url)
|
||||
if ver and ver.strip(' \n\r\t') == sabnzbd.__version__:
|
||||
return True
|
||||
else:
|
||||
@@ -780,7 +778,7 @@ def commandline_handler(frozen=True):
|
||||
# Get and remove any NZB file names
|
||||
for entry in args:
|
||||
if get_ext(entry) in ('.nzb', '.zip','.rar', '.gz'):
|
||||
upload_nzbs.append(entry)
|
||||
upload_nzbs.append(os.path.abspath(entry))
|
||||
|
||||
for opt, arg in opts:
|
||||
if opt in ('password','username','startup','perfmonini', 'perfmondll', 'interactive', 'wait'):
|
||||
@@ -1011,6 +1009,9 @@ def main():
|
||||
except:
|
||||
Bail_Out(browserhost, cherryport, '49')
|
||||
|
||||
# Find external programs
|
||||
sabnzbd.newsunpack.find_programs(sabnzbd.DIR_PROG)
|
||||
|
||||
# Windows instance is reachable through registry
|
||||
url = None
|
||||
if sabnzbd.WIN32:
|
||||
@@ -1186,9 +1187,6 @@ def main():
|
||||
else:
|
||||
autobrowser = sabnzbd.cfg.autobrowser()
|
||||
|
||||
# Find external programs
|
||||
sabnzbd.newsunpack.find_programs(sabnzbd.DIR_PROG)
|
||||
|
||||
if not sabnzbd.WIN_SERVICE and not getattr(sys, 'frozen', None) == 'macosx_app':
|
||||
signal.signal(signal.SIGINT, sabnzbd.sig_handler)
|
||||
signal.signal(signal.SIGTERM, sabnzbd.sig_handler)
|
||||
@@ -1296,7 +1294,7 @@ def main():
|
||||
'request.show_tracebacks': True,
|
||||
'checker.check_localhost' : bool(consoleLogging),
|
||||
'error_page.401': sabnzbd.misc.error_page_401
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
static = {'tools.staticdir.on': True, 'tools.staticdir.dir': os.path.join(web_dir, 'static')}
|
||||
@@ -1399,7 +1397,7 @@ def main():
|
||||
while not sabnzbd.SABSTOP:
|
||||
if sabnzbd.WIN_SERVICE:
|
||||
rc = win32event.WaitForMultipleObjects((sabnzbd.WIN_SERVICE.hWaitStop,
|
||||
sabnzbd.WIN_SERVICE.overlapped.hEvent), 0, 3000)
|
||||
sabnzbd.WIN_SERVICE.overlapped.hEvent), 0, 3000)
|
||||
if rc == win32event.WAIT_OBJECT_0:
|
||||
if mail:
|
||||
mail.send('stop')
|
||||
@@ -1510,9 +1508,9 @@ if sabnzbd.WIN32:
|
||||
_svc_display_name_ = 'SABnzbd Binary Newsreader'
|
||||
_svc_deps_ = ["EventLog", "Tcpip", "SABHelper"]
|
||||
_svc_description_ = 'Automated downloading from Usenet. ' \
|
||||
'Set to "automatic" to start the service at system startup. ' \
|
||||
'You may need to login with a real user account when you need ' \
|
||||
'access to network shares.'
|
||||
'Set to "automatic" to start the service at system startup. ' \
|
||||
'You may need to login with a real user account when you need ' \
|
||||
'access to network shares.'
|
||||
|
||||
def __init__(self, args):
|
||||
win32serviceutil.ServiceFramework.__init__(self, args)
|
||||
@@ -1650,4 +1648,3 @@ if __name__ == '__main__':
|
||||
|
||||
else:
|
||||
main()
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
<div id="config-components">
|
||||
|
||||
<div id="core-component-group1" class="component-group clearfix">
|
||||
<div class="component-group-desc">
|
||||
<h3>SABnzbd Config</h3>
|
||||
</div>
|
||||
<fieldset class="component-group-list">
|
||||
<div class="field-pair">
|
||||
<label class="nocheck clearfix">
|
||||
|
||||
@@ -28,6 +28,7 @@ Please choose your prefered language<br /><br />
|
||||
<div class="full-width">
|
||||
<table class="full-width">
|
||||
<tr>
|
||||
<td class="align-center"><input class="bigbutton" type="button" onclick="document.location ='./exit'" value="Exit SABnzbd" /></td>
|
||||
<td class="align-center"><input class="bigbutton" type="submit" value="Start Wizard" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -20,7 +20,7 @@ $T('wizard-explain-server')
|
||||
<div id="host-error" class="error-text hidden">$T('wizard-server-required')</div>
|
||||
<br class="clear" />
|
||||
<label class="label">$T('srv-port')</label><input id="port" class="text-input-thin" type="text" size="2" name="port" value="$port">
|
||||
<div id="port-tip" class="tips">E.g. 119 or 563 for SSL</div>
|
||||
<div id="port-tip" class="tips">$T('wizard-port-eg')</div>
|
||||
<div id="port-error" class="error-text hidden">$T('wizard-server-number')</div>
|
||||
<br class="clear" /><br class="clear" />
|
||||
<label class="label">$T('srv-username')</label><input class="validate-text clearinput text-input" type="text" size="12" name="username" value="$username">
|
||||
@@ -28,7 +28,7 @@ $T('wizard-explain-server')
|
||||
<label class="label">$T('srv-password')</label><input class="validate-text text-input" type="password" size="12" name="password" value="$password">
|
||||
<br class="clear" /><br class="clear" />
|
||||
<label class="label">$T('srv-connections')<span class="required-star">*</span></label><input id="connections" class="text-input-thin" type="text" size="2" name="connections" value="$connections">
|
||||
<div id="connections-tip" class="tips">$T('wizard-server-con-explain') E.g. 8 or 20</div>
|
||||
<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>
|
||||
|
||||
BIN
interfaces/wizard/static/images/flags/ro.png
Normal file
BIN
interfaces/wizard/static/images/flags/ro.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
77
licenses/Python/LICENSE-curl.txt
Normal file
77
licenses/Python/LICENSE-curl.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
The CURL binaries have been downloaded from:
|
||||
http://www.paehl.com/open_source/?CURL_7.21.6
|
||||
|
||||
License info:
|
||||
|
||||
=================================================================================
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright
|
||||
notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
||||
=================================================================================
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README
|
||||
|
||||
Curl is a command line tool for transferring data specified with URL
|
||||
syntax. Find out how to use curl by reading the curl.1 man page or the
|
||||
MANUAL document. Find out how to install Curl by reading the INSTALL
|
||||
document.
|
||||
|
||||
libcurl is the library curl is using to do its job. It is readily
|
||||
available to be used by your software. Read the libcurl.3 man page to
|
||||
learn how!
|
||||
|
||||
You find answers to the most frequent questions we get in the FAQ document.
|
||||
|
||||
Study the COPYING file for distribution terms and similar. If you distribute
|
||||
curl binaries or other binaries that involve libcurl, you might enjoy the
|
||||
LICENSE-MIXING document.
|
||||
|
||||
CONTACT
|
||||
|
||||
If you have problems, questions, ideas or suggestions, please contact us
|
||||
by posting to a suitable mailing list. See http://curl.haxx.se/mail/
|
||||
|
||||
All contributors to the project are listed in the THANKS document.
|
||||
|
||||
WEB SITE
|
||||
|
||||
Visit the curl web site for the latest news and downloads:
|
||||
|
||||
http://curl.haxx.se/
|
||||
|
||||
GIT
|
||||
|
||||
To download the very latest source off the GIT server do this:
|
||||
|
||||
git clone git://github.com/bagder/curl.git
|
||||
|
||||
(you'll get a directory named curl created, filled with the source code)
|
||||
|
||||
NOTICE
|
||||
|
||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||
Kungliga Tekniska H<>gskolan. This notice is included here to comply with the
|
||||
distribution terms.
|
||||
@@ -523,6 +523,10 @@ elif target in ('binary', 'installer'):
|
||||
setup(**options)
|
||||
rename_file('dist', Win32HelperName, Win32ServiceHelpName)
|
||||
|
||||
############################
|
||||
# Copy curl files
|
||||
shutil.copy2(r'win\curl\curl.exe', r'dist\lib')
|
||||
shutil.copy2(r'win\curl\libssh2.dll', r'dist\lib')
|
||||
|
||||
############################
|
||||
if target == 'installer':
|
||||
|
||||
1129
po/main/SABnzbd.pot
1129
po/main/SABnzbd.pot
File diff suppressed because it is too large
Load Diff
1145
po/main/da.po
1145
po/main/da.po
File diff suppressed because it is too large
Load Diff
1151
po/main/de.po
1151
po/main/de.po
File diff suppressed because it is too large
Load Diff
1797
po/main/fr.po
1797
po/main/fr.po
File diff suppressed because it is too large
Load Diff
1113
po/main/nb.po
1113
po/main/nb.po
File diff suppressed because it is too large
Load Diff
1143
po/main/nl.po
1143
po/main/nl.po
File diff suppressed because it is too large
Load Diff
1153
po/main/ro.px
1153
po/main/ro.px
File diff suppressed because it is too large
Load Diff
1113
po/main/sv.po
1113
po/main/sv.po
File diff suppressed because it is too large
Load Diff
@@ -124,6 +124,13 @@ def send(message, recipient):
|
||||
return T('Email succeeded')
|
||||
|
||||
|
||||
def get_email_date():
|
||||
""" Return un-localized date string for the Date: field
|
||||
"""
|
||||
# Get locale indepedant date/time string: "Sun May 22 20:15:12 2011"
|
||||
day, month, dayno, hms, year = time.asctime(time.gmtime()).split()
|
||||
return '%s, %s %s %s %s +0000' % (day, dayno, month, year, hms)
|
||||
|
||||
|
||||
################################################################################
|
||||
# email_endjob
|
||||
@@ -136,7 +143,7 @@ def send_with_template(prefix, parm):
|
||||
""" Send an email using template """
|
||||
|
||||
parm['from'] = cfg.email_from()
|
||||
parm['date'] = time.strftime(time_format('%a, %d %b %Y %H:%M:%S +0000'), time.gmtime())
|
||||
parm['date'] = get_email_date()
|
||||
|
||||
lst = []
|
||||
path = cfg.email_dir.get_path()
|
||||
@@ -212,16 +219,17 @@ def diskfull():
|
||||
""" Send email about disk full, no templates """
|
||||
|
||||
if cfg.email_full():
|
||||
return send(T('''to: %s
|
||||
from: %s
|
||||
subject: SABnzbd reports Disk Full
|
||||
return send(T('''To: %s
|
||||
From: %s
|
||||
Date: %s
|
||||
Subject: SABnzbd reports Disk Full
|
||||
|
||||
Hi,
|
||||
|
||||
SABnzbd has stopped downloading, because the disk is almost full.
|
||||
Please make room and resume SABnzbd manually.
|
||||
|
||||
''') % (cfg.email_to.get_string(), cfg.email_from()), cfg.email_to())
|
||||
''') % (cfg.email_to.get_string(), cfg.email_from(), get_email_date()), cfg.email_to())
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ NICE_COMMAND = None
|
||||
ZIP_COMMAND = None
|
||||
IONICE_COMMAND = None
|
||||
RAR_PROBLEM = False
|
||||
CURL_COMMAND = None
|
||||
|
||||
|
||||
def find_programs(curdir):
|
||||
"""Find external programs
|
||||
@@ -103,6 +105,7 @@ def find_programs(curdir):
|
||||
sabnzbd.newsunpack.RAR_COMMAND = check(curdir, 'win/unrar/UnRAR.exe')
|
||||
sabnzbd.newsunpack.PAR2C_COMMAND = check(curdir, 'win/par2/par2-classic.exe')
|
||||
sabnzbd.newsunpack.ZIP_COMMAND = check(curdir, 'win/unzip/unzip.exe')
|
||||
sabnzbd.newsunpack.CURL_COMMAND = check(curdir, 'lib/curl.exe')
|
||||
else:
|
||||
if not sabnzbd.newsunpack.PAR2_COMMAND:
|
||||
sabnzbd.newsunpack.PAR2_COMMAND = find_on_path('par2')
|
||||
@@ -1403,3 +1406,23 @@ def list2cmdline(lst):
|
||||
else:
|
||||
nlst.append(arg)
|
||||
return ' '.join(nlst)
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Work-around for the failure of Python2.5 on Windows to support IPV6 with HTTPS
|
||||
|
||||
def get_from_url(url):
|
||||
if sabnzbd.WIN32 and ' 2.5.' in sys.version and sabnzbd.newsunpack.CURL_COMMAND:
|
||||
command = [sabnzbd.newsunpack.CURL_COMMAND, "-k", url]
|
||||
stup, need_shell, command, creationflags = build_command(command)
|
||||
p = subprocess.Popen(command, shell=need_shell, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
startupinfo=stup, creationflags=creationflags)
|
||||
|
||||
output = p.stdout.read()
|
||||
p.wait()
|
||||
else:
|
||||
import urllib2
|
||||
s = urllib2.urlopen(url)
|
||||
output = s.read()
|
||||
return output
|
||||
|
||||
@@ -633,7 +633,7 @@ class NzbObject(TryList):
|
||||
|
||||
if nzb and '<nzb' in nzb:
|
||||
if 'A&A)' in nzb:
|
||||
# Fix needed to compensate for the idiocy at newzbin.com
|
||||
# Fix needed to compensate for some dumb NZB posters
|
||||
nzb = nzb.replace('A&A)', 'A&A)')
|
||||
handler = NzbParser(self)
|
||||
parser = xml.sax.make_parser()
|
||||
|
||||
@@ -241,6 +241,7 @@ SKIN_TEXT = {
|
||||
# Configuration
|
||||
'configuration' : TT('Configuration'),
|
||||
'confgFile' : TT('Config File'),
|
||||
'cache' : TT('Used cache'), #: Main config page, how much cache is in use
|
||||
'explain-Restart' : TT('This will restart SABnzbd.<br />Use it when you think the program has a stability problem.<br />Downloading will be paused before the restart and resume afterwards.'),
|
||||
'button-restart' : TT('Restart'),
|
||||
'explain-orphans' : TT('There are orphaned jobs in the download folder.<br />You can choose to delete them (including files) or send them back to the queue.'),
|
||||
@@ -478,6 +479,7 @@ SKIN_TEXT = {
|
||||
'tableFeeds' : TT('Feeds'), #: Tab title for Config->Feeds
|
||||
'button-rssNow' : TT('Read All Feeds Now'), #: Config->RSS button
|
||||
'feedSettings' : TT('Settings'), #: Tab title for Config->Feeds
|
||||
'filters' : TT('Filters'), #: Tab title for Config->Feeds
|
||||
|
||||
# Config->Email
|
||||
'configEmail' : TT('Email Notification'),
|
||||
@@ -773,6 +775,7 @@ SKIN_TEXT = {
|
||||
'wizard-server-help1' : TT('In order to download from usenet you will require access to a provider. Your ISP may provide you with access, however a premium provider is recommended.'),
|
||||
'wizard-server-help2' : TT('Don\'t have a usenet provider? We recommend trying %s.'),
|
||||
'wizard-server-con-explain' : TT('The number of connections allowed by your provider'),
|
||||
'wizard-server-con-eg' : TT('E.g. 8 or 20'), #: Wizard: examples of amount of connections
|
||||
'wizard-server-ssl-explain' : TT('Select only if your provider allows SSL connections.'),
|
||||
'wizard-server-text' : TT('Click to test the entered details.'),
|
||||
'wizard-server-required' : TT('This field is required.'),
|
||||
@@ -795,6 +798,7 @@ SKIN_TEXT = {
|
||||
'wizard-step-three' : TT('Step Three'), #: Wizard step
|
||||
'wizard-step-four' : TT('Step Four'), #: Wizard step
|
||||
'wizard-step-five' : TT('Step Five'), #: Wizard step
|
||||
'wizard-port-eg' : TT('E.g. 119 or 563 for SSL'), #: Wizard port number examples
|
||||
|
||||
#Special
|
||||
'yourRights' : TT('''
|
||||
|
||||
@@ -25,6 +25,7 @@ import logging
|
||||
import os
|
||||
import sabnzbd.cfg as cfg
|
||||
from sabnzbd.misc import get_ext, get_filename
|
||||
import sabnzbd.newsunpack
|
||||
|
||||
from sabnzbd.dirscanner import ProcessArchiveFile, ProcessSingleFile
|
||||
|
||||
@@ -43,7 +44,7 @@ def upload_file(url, fp):
|
||||
password = cfg.password()
|
||||
if username and password:
|
||||
url = '%s&ma_username=%s&ma_password=%s' % (url, username, password)
|
||||
urllib2.urlopen(url)
|
||||
sabnzbd.newsunpack.get_from_url(url)
|
||||
except:
|
||||
logging.error("Failed to upload file: %s", fp)
|
||||
logging.info("Traceback: ", exc_info = True)
|
||||
|
||||
@@ -62,6 +62,15 @@ class Wizard(object):
|
||||
searchList=[info], compilerSettings=sabnzbd.interface.DIRECTIVES)
|
||||
return template.respond()
|
||||
|
||||
@cherrypy.expose
|
||||
def exit(self, **kwargs):
|
||||
""" Stop SABnzbd """
|
||||
yield "Initiating shutdown..."
|
||||
sabnzbd.halt()
|
||||
yield "<br>SABnzbd-%s shutdown finished" % sabnzbd.__version__
|
||||
cherrypy.engine.exit()
|
||||
sabnzbd.SABSTOP = True
|
||||
|
||||
@cherrypy.expose
|
||||
def one(self, **kwargs):
|
||||
""" Accept language and show server page """
|
||||
|
||||
BIN
win/curl/curl.exe
Normal file
BIN
win/curl/curl.exe
Normal file
Binary file not shown.
BIN
win/curl/libssh2.dll
Normal file
BIN
win/curl/libssh2.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user