mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 16:03:59 +01:00
Added option to mark all albums as wanted, updated config pages with new options
This commit is contained in:
@@ -448,8 +448,14 @@
|
||||
<input class="styled" type="checkbox" name="include_extras" value="1" ${config['include_extras']} />
|
||||
Automatically Include Extras When Adding an Artist
|
||||
</p>
|
||||
<div class="tooltip"><span>(EPs, Compilations, Live Albums, Remix Albums and Singles)</span></div>
|
||||
<br /><br />
|
||||
<div class="tooltip"><span>(EPs, Compilations, Live Albums, Remix Albums and Singles)</span></div><br>
|
||||
<p>
|
||||
<input class="styled" type="checkbox" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} />Automatically Mark Upcoming Albums as Wanted
|
||||
</p>
|
||||
<p>
|
||||
<input class="styled" type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} />Automatically Mark All Albums as Wanted
|
||||
</p>
|
||||
<br />
|
||||
<h3>
|
||||
Interface:
|
||||
<h3>
|
||||
@@ -608,6 +614,34 @@
|
||||
<h3><input type="checkbox" name="xbmc_update" value="1" ${config['xbmc_update']} />Update XBMC Library</h3><br>
|
||||
<h3><input type="checkbox" name="xbmc_notify" value="1" ${config['xbmc_notify']} />Send Notification to XBMC</h3><br>
|
||||
</div>
|
||||
<h3><input type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} />Enable NotifyMyAndroid</h3><br>
|
||||
<div id="nmaoptions">
|
||||
<h3>NotifyMyAndroid API Key:</h3><input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30"><br>
|
||||
<i class="smalltext">Separate multiple api keys with commas</i><br>
|
||||
<h3>Priority:<select class="styled" name="nma_priority"></h3>
|
||||
%for x in [-2,-1,0,1,2]:
|
||||
<%
|
||||
if config['nma_priority'] == x:
|
||||
nma_priority_selected = 'selected'
|
||||
else:
|
||||
nma_priority_selected = ''
|
||||
|
||||
if x == -2:
|
||||
nma_priority_value = 'Very Low'
|
||||
elif x == -1:
|
||||
nma_priority_value = 'Moderate'
|
||||
elif x == 0:
|
||||
nma_priority_value = 'Normal'
|
||||
elif x == 1:
|
||||
nma_priority_value = 'High'
|
||||
else:
|
||||
nma_priority_value = 'Emergency'
|
||||
%>
|
||||
<option value=${x} ${nma_priority_selected}>${nma_priority_value}</option>
|
||||
%endfor
|
||||
</select>
|
||||
<br><br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -764,6 +798,25 @@
|
||||
}
|
||||
});
|
||||
|
||||
if ($("#nma").is(":checked"))
|
||||
{
|
||||
$("#nmaoptions").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#nmaoptions").hide();
|
||||
}
|
||||
|
||||
$("#nma").click(function(){
|
||||
if ($("#nma").is(":checked"))
|
||||
{
|
||||
$("#nmaoptions").show("fast");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#nmaoptions").hide("fast");
|
||||
}
|
||||
});
|
||||
$("#mirror").change(handleNewSelection);
|
||||
handleNewSelection.apply($("#mirror"));
|
||||
|
||||
|
||||
@@ -326,7 +326,8 @@
|
||||
<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>
|
||||
<h3><input type="checkbox" name="automark_wanted" value="1" ${config['automark_wanted']} />Automatically Mark Upcoming Albums as Wanted</h3>
|
||||
<h3><input type="checkbox" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} />Automatically Mark Upcoming Albums as Wanted</h3>
|
||||
<h3><input type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} />Automatically Mark All Albums as Wanted</h3>
|
||||
<br>
|
||||
<h3>Interface: <select name="interface"><h3>
|
||||
%for interface in config['interface_list']:
|
||||
|
||||
@@ -325,21 +325,23 @@
|
||||
<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="autowant_upcoming" value="1" ${config['autowant_upcoming']} />Automatically Mark Upcoming Albums as Wanted</h3>
|
||||
<h3><input type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} />Automatically Mark All 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>
|
||||
@@ -456,6 +458,34 @@
|
||||
<h3>XBMC Password:</h3><input type="password" name="xbmc_password" value="${config['xbmc_password']}" size="30"><br><br>
|
||||
<h3><input type="checkbox" name="xbmc_update" value="1" ${config['xbmc_update']} />Update XBMC Library</h3><br>
|
||||
<h3><input type="checkbox" name="xbmc_notify" value="1" ${config['xbmc_notify']} />Send Notification to XBMC</h3><br>
|
||||
</div>
|
||||
<h3><input type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} />Enable NotifyMyAndroid</h3><br>
|
||||
<div id="nmaoptions">
|
||||
<h3>NotifyMyAndroid API Key:</h3><input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30"><br>
|
||||
<i class="smalltext">Separate multiple api keys with commas</i><br>
|
||||
<h3>Priority:<select name="nma_priority"></h3>
|
||||
%for x in [-2,-1,0,1,2]:
|
||||
<%
|
||||
if config['nma_priority'] == x:
|
||||
nma_priority_selected = 'selected'
|
||||
else:
|
||||
nma_priority_selected = ''
|
||||
|
||||
if x == -2:
|
||||
nma_priority_value = 'Very Low'
|
||||
elif x == -1:
|
||||
nma_priority_value = 'Moderate'
|
||||
elif x == 0:
|
||||
nma_priority_value = 'Normal'
|
||||
elif x == 1:
|
||||
nma_priority_value = 'High'
|
||||
else:
|
||||
nma_priority_value = 'Emergency'
|
||||
%>
|
||||
<option value=${x} ${nma_priority_selected}>${nma_priority_value}</option>
|
||||
%endfor
|
||||
</select>
|
||||
<br><br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -610,6 +640,26 @@
|
||||
}
|
||||
});
|
||||
|
||||
if ($("#nma").is(":checked"))
|
||||
{
|
||||
$("#nmaoptions").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#nmaoptions").hide();
|
||||
}
|
||||
|
||||
$("#nma").click(function(){
|
||||
if ($("#nma").is(":checked"))
|
||||
{
|
||||
$("#nmaoptions").show("fast");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#nmaoptions").hide("fast");
|
||||
}
|
||||
});
|
||||
|
||||
$("#mirror").change(handleNewSelection);
|
||||
handleNewSelection.apply($("#mirror"));
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@ BLACKHOLE = None
|
||||
BLACKHOLE_DIR = None
|
||||
USENET_RETENTION = None
|
||||
INCLUDE_EXTRAS = False
|
||||
AUTOMARK_WANTED = False
|
||||
AUTOWANT_UPCOMING = False
|
||||
AUTOWANT_ALL = False
|
||||
|
||||
SEARCH_INTERVAL = 360
|
||||
LIBRARYSCAN_INTERVAL = 300
|
||||
@@ -211,7 +212,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, AUTOMARK_WANTED, \
|
||||
ADD_ARTISTS, CORRECT_METADATA, MOVE_FILES, RENAME_FILES, FOLDER_FORMAT, FILE_FORMAT, CLEANUP_FILES, INCLUDE_EXTRAS, AUTOWANT_UPCOMING, AUTOWANT_ALL, \
|
||||
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, \
|
||||
@@ -276,7 +277,8 @@ 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))
|
||||
AUTOWANT_UPCOMING = bool(check_setting_int(CFG, 'General', 'autowant_upcoming', 1))
|
||||
AUTOWANT_ALL = bool(check_setting_int(CFG, 'General', 'autowant_all', 0))
|
||||
|
||||
SEARCH_INTERVAL = check_setting_int(CFG, 'General', 'search_interval', 360)
|
||||
LIBRARYSCAN_INTERVAL = check_setting_int(CFG, 'General', 'libraryscan_interval', 300)
|
||||
@@ -498,7 +500,8 @@ 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']['autowant_upcoming'] = int(AUTOWANT_UPCOMING)
|
||||
new_config['General']['autowant_all'] = int(AUTOWANT_ALL)
|
||||
|
||||
new_config['General']['numberofseeders'] = NUMBEROFSEEDERS
|
||||
new_config['General']['torrentblackhole_dir'] = TORRENTBLACKHOLE_DIR
|
||||
|
||||
@@ -156,7 +156,9 @@ def addArtisttoDB(artistid, extrasonly=False):
|
||||
"Type": rg['type']
|
||||
}
|
||||
|
||||
if release_dict['releasedate'] > helpers.today() and headphones.AUTOMARK_WANTED:
|
||||
if headphones.AUTOWANT_ALL:
|
||||
newValueDict['Status'] = "Wanted"
|
||||
elif release_dict['releasedate'] > helpers.today() and headphones.AUTOWANT_UPCOMING:
|
||||
newValueDict['Status'] = "Wanted"
|
||||
else:
|
||||
newValueDict['Status'] = "Skipped"
|
||||
|
||||
@@ -383,7 +383,8 @@ 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),
|
||||
"autowant_upcoming" : checked(headphones.AUTOWANT_UPCOMING),
|
||||
"autowant_all" : checked(headphones.AUTOWANT_ALL),
|
||||
"log_dir" : headphones.LOG_DIR,
|
||||
"interface_list" : interface_list,
|
||||
"encode": checked(headphones.ENCODE),
|
||||
@@ -426,7 +427,7 @@ class WebInterface(object):
|
||||
usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, newznab=0, newznab_host=None, newznab_apikey=None,
|
||||
nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0,
|
||||
torrentblackhole_dir=None, download_torrent_dir=None, numberofseeders=10, use_isohunt=0, use_kat=0, use_mininova=0,
|
||||
rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, interface=None, log_dir=None,
|
||||
rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, autowant_upcoming=False, autowant_all=False, interface=None, log_dir=None,
|
||||
encode=0, encoder=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0,
|
||||
prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=0, xbmc_enabled=0, xbmc_host=None, xbmc_username=None, xbmc_password=None, xbmc_update=0, xbmc_notify=0,
|
||||
nma_enabled=False, nma_apikey=None, nma_priority=0, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None):
|
||||
@@ -482,7 +483,8 @@ class WebInterface(object):
|
||||
headphones.FOLDER_FORMAT = folder_format
|
||||
headphones.FILE_FORMAT = file_format
|
||||
headphones.INCLUDE_EXTRAS = include_extras
|
||||
headphones.AUTOMARK_WANTED = automark_wanted
|
||||
headphones.AUTOWANT_UPCOMING = autowant_upcoming
|
||||
headphones.AUTOWANT_ALL = autowant_all
|
||||
headphones.INTERFACE = interface
|
||||
headphones.LOG_DIR = log_dir
|
||||
headphones.ENCODE = encode
|
||||
|
||||
Reference in New Issue
Block a user