mirror of
https://github.com/rembo10/headphones.git
synced 2026-06-26 20:43:51 +01:00
Added option to disable marking upcoming albums as wanted
This commit is contained in:
@@ -325,21 +325,22 @@
|
||||
<h2>Miscellaneous:</h2>
|
||||
<br>
|
||||
<h3><input type="checkbox" name="include_extras" value="1" ${config['include_extras']} />Automatically Include Extras When Adding an Artist</h3>
|
||||
<i class="smalltext">(EPs, Compilations, Live Albums, Remix Albums and Singles)</i>
|
||||
<br><br>
|
||||
<h3>Interface: <select name="interface"><h3>
|
||||
%for interface in config['interface_list']:
|
||||
<%
|
||||
if interface == headphones.INTERFACE:
|
||||
selected = 'selected="selected"'
|
||||
else:
|
||||
selected = ''
|
||||
%>
|
||||
<option value="${interface}" ${selected}>${interface}</option>
|
||||
%endfor
|
||||
</select>
|
||||
<br><br>
|
||||
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
|
||||
<i class="smalltext">(EPs, Compilations, Live Albums, Remix Albums and Singles)</i>
|
||||
<h3><input type="checkbox" name="automark_wanted" value="1" ${config['automark_wanted']} />Automatically Mark Upcoming Albums as Wanted</h3>
|
||||
<br>
|
||||
<h3>Interface: <select name="interface"><h3>
|
||||
%for interface in config['interface_list']:
|
||||
<%
|
||||
if interface == headphones.INTERFACE:
|
||||
selected = 'selected="selected"'
|
||||
else:
|
||||
selected = ''
|
||||
%>
|
||||
<option value="${interface}" ${selected}>${interface}</option>
|
||||
%endfor
|
||||
</select>
|
||||
<br><br>
|
||||
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -83,6 +83,7 @@ BLACKHOLE = None
|
||||
BLACKHOLE_DIR = None
|
||||
USENET_RETENTION = None
|
||||
INCLUDE_EXTRAS = False
|
||||
AUTOMARK_WANTED = False
|
||||
|
||||
SEARCH_INTERVAL = 360
|
||||
LIBRARYSCAN_INTERVAL = 300
|
||||
@@ -210,7 +211,7 @@ def initialize():
|
||||
global __INITIALIZED__, FULL_PATH, PROG_DIR, VERBOSE, DAEMON, DATA_DIR, CONFIG_FILE, CFG, CONFIG_VERSION, LOG_DIR, CACHE_DIR, \
|
||||
HTTP_PORT, HTTP_HOST, HTTP_USERNAME, HTTP_PASSWORD, HTTP_ROOT, LAUNCH_BROWSER, API_ENABLED, API_KEY, GIT_PATH, \
|
||||
CURRENT_VERSION, LATEST_VERSION, MUSIC_DIR, DESTINATION_DIR, PREFERRED_QUALITY, PREFERRED_BITRATE, DETECT_BITRATE, \
|
||||
ADD_ARTISTS, CORRECT_METADATA, MOVE_FILES, RENAME_FILES, FOLDER_FORMAT, FILE_FORMAT, CLEANUP_FILES, INCLUDE_EXTRAS, \
|
||||
ADD_ARTISTS, CORRECT_METADATA, MOVE_FILES, RENAME_FILES, FOLDER_FORMAT, FILE_FORMAT, CLEANUP_FILES, INCLUDE_EXTRAS, AUTOMARK_WANTED, \
|
||||
ADD_ALBUM_ART, EMBED_ALBUM_ART, EMBED_LYRICS, DOWNLOAD_DIR, BLACKHOLE, BLACKHOLE_DIR, USENET_RETENTION, SEARCH_INTERVAL, \
|
||||
TORRENTBLACKHOLE_DIR, NUMBEROFSEEDERS, ISOHUNT, KAT, MININOVA, DOWNLOAD_TORRENT_DIR, \
|
||||
LIBRARYSCAN_INTERVAL, DOWNLOAD_SCAN_INTERVAL, SAB_HOST, SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, \
|
||||
@@ -275,6 +276,7 @@ def initialize():
|
||||
BLACKHOLE_DIR = check_setting_str(CFG, 'General', 'blackhole_dir', '')
|
||||
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', '')
|
||||
INCLUDE_EXTRAS = bool(check_setting_int(CFG, 'General', 'include_extras', 0))
|
||||
AUTOMARK_WANTED = bool(check_setting_int(CFG, 'General', 'automark_wanted', 1))
|
||||
|
||||
SEARCH_INTERVAL = check_setting_int(CFG, 'General', 'search_interval', 360)
|
||||
LIBRARYSCAN_INTERVAL = check_setting_int(CFG, 'General', 'libraryscan_interval', 300)
|
||||
@@ -496,6 +498,7 @@ def config_write():
|
||||
new_config['General']['blackhole_dir'] = BLACKHOLE_DIR
|
||||
new_config['General']['usenet_retention'] = USENET_RETENTION
|
||||
new_config['General']['include_extras'] = int(INCLUDE_EXTRAS)
|
||||
new_config['General']['automark_wanted'] = int(AUTOMARK_WANTED)
|
||||
|
||||
new_config['General']['numberofseeders'] = NUMBEROFSEEDERS
|
||||
new_config['General']['torrentblackhole_dir'] = TORRENTBLACKHOLE_DIR
|
||||
|
||||
@@ -156,7 +156,7 @@ def addArtisttoDB(artistid, extrasonly=False):
|
||||
"Type": rg['type']
|
||||
}
|
||||
|
||||
if release_dict['releasedate'] > helpers.today():
|
||||
if release_dict['releasedate'] > helpers.today() and headphones.AUTOMARK_WANTED:
|
||||
newValueDict['Status'] = "Wanted"
|
||||
else:
|
||||
newValueDict['Status'] = "Skipped"
|
||||
|
||||
@@ -383,6 +383,7 @@ class WebInterface(object):
|
||||
"folder_format" : headphones.FOLDER_FORMAT,
|
||||
"file_format" : headphones.FILE_FORMAT,
|
||||
"include_extras" : checked(headphones.INCLUDE_EXTRAS),
|
||||
"automark_wanted" : checked(headphones.AUTOMARK_WANTED),
|
||||
"log_dir" : headphones.LOG_DIR,
|
||||
"interface_list" : interface_list,
|
||||
"encode": checked(headphones.ENCODE),
|
||||
@@ -481,6 +482,7 @@ class WebInterface(object):
|
||||
headphones.FOLDER_FORMAT = folder_format
|
||||
headphones.FILE_FORMAT = file_format
|
||||
headphones.INCLUDE_EXTRAS = include_extras
|
||||
headphones.AUTOMARK_WANTED = automark_wanted
|
||||
headphones.INTERFACE = interface
|
||||
headphones.LOG_DIR = log_dir
|
||||
headphones.ENCODE = encode
|
||||
|
||||
Reference in New Issue
Block a user