|
@ -34,14 +34,14 @@ except ImportError: |
|
|
|
|
|
|
|
|
# SABnzbd modules |
|
|
# SABnzbd modules |
|
|
import sabnzbd |
|
|
import sabnzbd |
|
|
from sabnzbd.constants import sample_match, GIGI, ATTRIB_FILE, JOB_ADMIN, \ |
|
|
from sabnzbd.constants import sample_match, GIGI, ATTRIB_FILE, \ |
|
|
DEFAULT_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, \ |
|
|
DEFAULT_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, \ |
|
|
HIGH_PRIORITY, PAUSED_PRIORITY, TOP_PRIORITY, DUP_PRIORITY, \ |
|
|
HIGH_PRIORITY, PAUSED_PRIORITY, TOP_PRIORITY, DUP_PRIORITY, \ |
|
|
RENAMES_FILE, Status |
|
|
RENAMES_FILE, Status |
|
|
from sabnzbd.misc import to_units, cat_to_opts, cat_convert, sanitize_foldername, \ |
|
|
from sabnzbd.misc import to_units, cat_to_opts, cat_convert, sanitize_foldername, \ |
|
|
get_unique_path, get_admin_path, remove_all, format_source_url, \ |
|
|
get_unique_path, get_admin_path, remove_all, format_source_url, \ |
|
|
sanitize_filename, globber, sanitize_foldername, int_conv, \ |
|
|
sanitize_filename, globber, sanitize_foldername, int_conv, \ |
|
|
set_permissions |
|
|
set_permissions, job_admin_dir |
|
|
import sabnzbd.cfg as cfg |
|
|
import sabnzbd.cfg as cfg |
|
|
from sabnzbd.trylist import TryList |
|
|
from sabnzbd.trylist import TryList |
|
|
from sabnzbd.encoding import unicoder, platform_encode, latin1, name_fixer |
|
|
from sabnzbd.encoding import unicoder, platform_encode, latin1, name_fixer |
|
@ -670,7 +670,7 @@ class NzbObject(TryList): |
|
|
|
|
|
|
|
|
# Determine "incomplete" folder |
|
|
# Determine "incomplete" folder |
|
|
wdir = os.path.join(cfg.download_dir.get_path(), self.work_name) |
|
|
wdir = os.path.join(cfg.download_dir.get_path(), self.work_name) |
|
|
adir = os.path.join(wdir, JOB_ADMIN) |
|
|
adir = job_admin_dir(wdir) |
|
|
|
|
|
|
|
|
# Duplicate checking, needs to be done before the backup |
|
|
# Duplicate checking, needs to be done before the backup |
|
|
duplicate = (not reuse) and nzb and dup_check and sabnzbd.backup_exists(filename) |
|
|
duplicate = (not reuse) and nzb and dup_check and sabnzbd.backup_exists(filename) |
|
@ -681,7 +681,7 @@ class NzbObject(TryList): |
|
|
else: |
|
|
else: |
|
|
wdir = get_unique_path(wdir, create_dir=True) |
|
|
wdir = get_unique_path(wdir, create_dir=True) |
|
|
set_permissions(wdir) |
|
|
set_permissions(wdir) |
|
|
adir = os.path.join(wdir, JOB_ADMIN) |
|
|
adir = job_admin_dir(wdir) |
|
|
|
|
|
|
|
|
if not os.path.exists(adir): |
|
|
if not os.path.exists(adir): |
|
|
os.mkdir(adir) |
|
|
os.mkdir(adir) |
|
|