Browse Source

Put "download_dir" and "complete_dir" in $HOME/downloads.

Empty dirscan_dir is default.
tags/0.6.0
shypike 18 years ago
parent
commit
373f8b7be9
  1. 20
      main/interfaces/Default/templates/config_directories.tmpl
  2. 20
      main/interfaces/NOVA_0.3.2/templates/config_directories.tmpl
  3. 20
      main/interfaces/NOVA_0.4.5/templates/config_directories.tmpl
  4. 4
      main/sabnzbd/__init__.py
  5. 6
      main/sabnzbd/constants.py
  6. 2
      main/sabnzbd/interface.py

20
main/interfaces/Default/templates/config_directories.tmpl

@ -33,6 +33,16 @@
<fieldset class="EntryFieldSet">
<legend>User directories</legend>
<emp>In "$my_home"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Complete Directory:</strong><br>
Location to put completed downloads in.<br>
<input type="text" size="40" name="complete_dir" value="$complete_dir">
@ -55,16 +65,6 @@
<fieldset class="EntryFieldSet">
<legend>System directories</legend>
<emp>In "$my_lcldata"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Cache Directory:</strong><br>
Location for temporary storage.<br>
<input type="text" size="40" name="cache_dir" value="$cache_dir">

20
main/interfaces/NOVA_0.3.2/templates/config_directories.tmpl

@ -75,6 +75,16 @@
<fieldset class="EntryFieldSet">
<legend>User directories</legend>
<emp>In "$my_home"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Complete Directory:</strong><br>
Location to put completed downloads in.<br>
<input type="text" size="40" name="complete_dir" value="$complete_dir">
@ -97,16 +107,6 @@
<fieldset class="EntryFieldSet">
<legend>System directories</legend>
<emp>In "$my_lcldata"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Cache Directory:</strong><br>
Location for temporary storage.<br>
<input type="text" size="40" name="cache_dir" value="$cache_dir">

20
main/interfaces/NOVA_0.4.5/templates/config_directories.tmpl

@ -30,6 +30,16 @@
<fieldset class="EntryFieldSet">
<legend>User directories</legend>
<emp>In "$my_home"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Complete Directory:</strong><br>
Location to put completed downloads in.<br>
<input type="text" size="40" name="complete_dir" value="$complete_dir">
@ -52,16 +62,6 @@
<fieldset class="EntryFieldSet">
<legend>System directories</legend>
<emp>In "$my_lcldata"</emp><br><br>
<strong>Download Directory:</strong><br>
Location to put unprocessed downloads in.<br>
<input type="text" size="40" name="download_dir" value="$download_dir">
<br>
<br>
<strong>Minimum free space for Download Directory:</strong><br>
Auto-pause when free space is beneath this value (MB).<br>
<input type="text" size="10" name="download_free" value="$download_free">
<br>
<br>
<strong>Cache Directory:</strong><br>
Location for temporary storage.<br>
<input type="text" size="40" name="cache_dir" value="$cache_dir">

4
main/sabnzbd/__init__.py

@ -254,7 +254,7 @@ def initialize(pause_downloader = False, clean_up = False, force_save= False):
logging.debug("CREATE_CAT_FOLDERS -> %s", CREATE_CAT_FOLDERS)
logging.debug("CREATE_CAT_SUB -> %s", CREATE_CAT_SUB)
DOWNLOAD_DIR = dir_setup(CFG, "download_dir", DIR_LCLDATA, DEF_DOWNLOAD_DIR)
DOWNLOAD_DIR = dir_setup(CFG, "download_dir", DIR_HOME, DEF_DOWNLOAD_DIR)
if DOWNLOAD_DIR == "":
return False
@ -282,7 +282,7 @@ def initialize(pause_downloader = False, clean_up = False, force_save= False):
try:
defdir = CFG['misc']['dirscan_dir']
except:
defdir = "nzb"
defdir = DEF_NZB_DIR
dirscan_dir = dir_setup(CFG, "dirscan_dir", DIR_HOME, defdir)
dirscan_speed = check_setting_int(CFG, 'misc', 'dirscan_speed', DEF_SCANRATE)

6
main/sabnzbd/constants.py

@ -54,11 +54,11 @@ BYTES_FILE_NAME = 'bytes.sab'
QUEUE_FILE_NAME = 'queue.sab'
RSS_FILE_NAME = 'rss.sab'
DEF_DOWNLOAD_DIR = 'incomplete'
DEF_COMPLETE_DIR = 'downloads'
DEF_DOWNLOAD_DIR = 'downloads/incomplete'
DEF_COMPLETE_DIR = 'downloads/complete'
DEF_CACHE_DIR = 'cache'
DEF_LOG_DIR = 'logs'
DEF_NZB_DIR = 'nzb_backup'
DEF_NZB_DIR = ''
DEF_NZBBACK_DIR = ''
DEF_INTERFACES = 'interfaces'
DEF_STDINTF = 'Default'

2
main/sabnzbd/interface.py

@ -641,7 +641,7 @@ class ConfigDirectories(ProtectedClass):
cache_dir = None, nzb_backup_dir = None,
dirscan_dir = None, dirscan_speed = None, extern_proc = None):
dd = create_real_path('download_dir', sabnzbd.DIR_LCLDATA, download_dir)
dd = create_real_path('download_dir', sabnzbd.DIR_HOME, download_dir)
if not dd:
return "Error: cannot create download directory %s." % dd

Loading…
Cancel
Save