|
@ -19,26 +19,54 @@ |
|
|
sabnzbd.interface - webinterface |
|
|
sabnzbd.interface - webinterface |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
import os |
|
|
import functools |
|
|
import time |
|
|
import hashlib |
|
|
from datetime import datetime |
|
|
|
|
|
import cherrypy |
|
|
|
|
|
import logging |
|
|
import logging |
|
|
import urllib.request, urllib.parse, urllib.error |
|
|
import os |
|
|
import re |
|
|
import re |
|
|
import hashlib |
|
|
|
|
|
import socket |
|
|
import socket |
|
|
import ssl |
|
|
import ssl |
|
|
import functools |
|
|
import time |
|
|
from threading import Thread |
|
|
import urllib.error |
|
|
|
|
|
import urllib.parse |
|
|
|
|
|
import urllib.request |
|
|
|
|
|
from datetime import datetime |
|
|
from random import randint |
|
|
from random import randint |
|
|
|
|
|
from threading import Thread |
|
|
from xml.sax.saxutils import escape |
|
|
from xml.sax.saxutils import escape |
|
|
|
|
|
|
|
|
|
|
|
import cherrypy |
|
|
|
|
|
from Cheetah.Template import Template |
|
|
|
|
|
|
|
|
import sabnzbd |
|
|
import sabnzbd |
|
|
|
|
|
import sabnzbd.cfg as cfg |
|
|
|
|
|
import sabnzbd.config as config |
|
|
|
|
|
import sabnzbd.newsunpack |
|
|
|
|
|
import sabnzbd.notifier as notifier |
|
|
import sabnzbd.rss |
|
|
import sabnzbd.rss |
|
|
import sabnzbd.scheduler as scheduler |
|
|
import sabnzbd.scheduler as scheduler |
|
|
|
|
|
from sabnzbd.api import ( |
|
|
from Cheetah.Template import Template |
|
|
list_scripts, |
|
|
|
|
|
list_cats, |
|
|
|
|
|
del_from_section, |
|
|
|
|
|
api_handler, |
|
|
|
|
|
build_queue, |
|
|
|
|
|
build_status, |
|
|
|
|
|
retry_job, |
|
|
|
|
|
build_header, |
|
|
|
|
|
build_history, |
|
|
|
|
|
format_bytes, |
|
|
|
|
|
del_hist_job, |
|
|
|
|
|
Ttemplate, |
|
|
|
|
|
build_queue_header, |
|
|
|
|
|
) |
|
|
|
|
|
from sabnzbd.bpsmeter import BPSMeter |
|
|
|
|
|
from sabnzbd.constants import MEBI, DEF_SKIN_COLORS, DEF_STDCONFIG, DEF_MAIN_TMPL, DEFAULT_PRIORITY, CHEETAH_DIRECTIVES |
|
|
|
|
|
from sabnzbd.decoder import SABYENC_ENABLED |
|
|
|
|
|
from sabnzbd.downloader import Downloader |
|
|
|
|
|
from sabnzbd.encoding import xml_name, utob |
|
|
|
|
|
from sabnzbd.filesystem import real_path, long_path, globber, globber_full, remove_all, clip_path, same_file |
|
|
|
|
|
from sabnzbd.lang import list_languages |
|
|
from sabnzbd.misc import ( |
|
|
from sabnzbd.misc import ( |
|
|
to_units, |
|
|
to_units, |
|
|
from_units, |
|
|
from_units, |
|
@ -50,42 +78,13 @@ from sabnzbd.misc import ( |
|
|
probablyipv6, |
|
|
probablyipv6, |
|
|
opts_to_pp, |
|
|
opts_to_pp, |
|
|
) |
|
|
) |
|
|
from sabnzbd.filesystem import real_path, long_path, globber, globber_full, remove_all, clip_path, same_file |
|
|
|
|
|
from sabnzbd.newswrapper import GetServerParms |
|
|
from sabnzbd.newswrapper import GetServerParms |
|
|
from sabnzbd.bpsmeter import BPSMeter |
|
|
|
|
|
from sabnzbd.encoding import xml_name, utob |
|
|
|
|
|
import sabnzbd.config as config |
|
|
|
|
|
import sabnzbd.cfg as cfg |
|
|
|
|
|
import sabnzbd.notifier as notifier |
|
|
|
|
|
import sabnzbd.newsunpack |
|
|
|
|
|
from sabnzbd.downloader import Downloader |
|
|
|
|
|
from sabnzbd.nzbqueue import NzbQueue |
|
|
from sabnzbd.nzbqueue import NzbQueue |
|
|
from sabnzbd.utils.servertests import test_nntp_server_dict |
|
|
|
|
|
from sabnzbd.decoder import SABYENC_ENABLED |
|
|
|
|
|
from sabnzbd.utils.diskspeed import diskspeedmeasure |
|
|
from sabnzbd.utils.diskspeed import diskspeedmeasure |
|
|
from sabnzbd.utils.getperformance import getpystone |
|
|
from sabnzbd.utils.getperformance import getpystone |
|
|
from sabnzbd.utils.internetspeed import internetspeed |
|
|
from sabnzbd.utils.internetspeed import internetspeed |
|
|
|
|
|
from sabnzbd.utils.servertests import test_nntp_server_dict |
|
|
|
|
|
|
|
|
from sabnzbd.constants import MEBI, DEF_SKIN_COLORS, DEF_STDCONFIG, DEF_MAIN_TMPL, DEFAULT_PRIORITY, CHEETAH_DIRECTIVES |
|
|
|
|
|
|
|
|
|
|
|
from sabnzbd.lang import list_languages |
|
|
|
|
|
|
|
|
|
|
|
from sabnzbd.api import ( |
|
|
|
|
|
list_scripts, |
|
|
|
|
|
list_cats, |
|
|
|
|
|
del_from_section, |
|
|
|
|
|
api_handler, |
|
|
|
|
|
build_queue, |
|
|
|
|
|
build_status, |
|
|
|
|
|
retry_job, |
|
|
|
|
|
build_header, |
|
|
|
|
|
build_history, |
|
|
|
|
|
format_bytes, |
|
|
|
|
|
report, |
|
|
|
|
|
del_hist_job, |
|
|
|
|
|
Ttemplate, |
|
|
|
|
|
build_queue_header, |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
############################################################################## |
|
|
############################################################################## |
|
|
# Global constants |
|
|
# Global constants |
|
|