From f51962f64558311c32a9d864eba15230a8043d2c Mon Sep 17 00:00:00 2001 From: rembo10 Date: Tue, 8 Apr 2014 11:43:03 -0700 Subject: [PATCH] Added 'other' category to extras --- headphones/mb.py | 2 +- headphones/webserve.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/headphones/mb.py b/headphones/mb.py index c6ae9f08..25061bf3 100644 --- a/headphones/mb.py +++ b/headphones/mb.py @@ -223,7 +223,7 @@ def getArtist(artistid, extrasonly=False): # Need to convert extras string from something like '2,5.6' to ['ep','live','remix'] extras = db_artist['Extras'] - extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook", "other"] includes = [] i = 1 diff --git a/headphones/webserve.py b/headphones/webserve.py index 76cca6f9..6da816b7 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -85,7 +85,7 @@ class WebInterface(object): raise cherrypy.HTTPRedirect("home") # Serve the extras up as a dict to make things easier for new templates - extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook", "other"] extras_dict = {} if not artist['Extras']: @@ -143,12 +143,12 @@ class WebInterface(object): # # If they are, we need to convert kwargs to string format if not newstyle: - extras = "1,2,3,4,5,6,7,8" + extras = "1,2,3,4,5,6,7,8,9" else: temp_extras_list = [] # TODO: Put these extras as a global variable i = 1 - for extra in ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook"]: + for extra in ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook", "other"]: if extra in kwargs: temp_extras_list.append(i) i += 1 @@ -1069,7 +1069,7 @@ class WebInterface(object): } # Need to convert EXTRAS to a dictionary we can pass to the config: it'll come in as a string like 2,5,6,8 - extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "spokenword", "audiobook", "other"] extras_dict = {} i = 1 @@ -1094,7 +1094,7 @@ class WebInterface(object): numberofseeders=None, use_piratebay=0, piratebay_proxy_url=None, use_isohunt=0, use_kat=0, use_mininova=0, waffles=0, waffles_uid=None, waffles_passkey=None, whatcd=0, whatcd_username=None, whatcd_password=None, rutracker=0, rutracker_user=None, rutracker_password=None, rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, album_art_format=None, embed_album_art=0, embed_lyrics=0, replace_existing_folders=False, destination_dir=None, lossless_destination_dir=None, folder_format=None, file_format=None, file_underscores=0, include_extras=0, single=0, ep=0, compilation=0, soundtrack=0, live=0, - remix=0, spokenword=0, audiobook=0, autowant_upcoming=False, autowant_all=False, keep_torrent_files=False, prefer_torrents=0, interface=None, log_dir=None, cache_dir=None, music_encoder=0, encoder=None, xldprofile=None, + remix=0, spokenword=0, audiobook=0, other=0, autowant_upcoming=False, autowant_all=False, keep_torrent_files=False, prefer_torrents=0, interface=None, log_dir=None, cache_dir=None, music_encoder=0, encoder=None, xldprofile=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0, delete_lossless_files=0, growl_enabled=0, growl_onsnatch=0, growl_host=None, growl_password=None, 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, nma_onsnatch=0, pushalot_enabled=False, pushalot_apikey=None, pushalot_onsnatch=0, synoindex_enabled=False, @@ -1286,7 +1286,7 @@ class WebInterface(object): # Convert the extras to list then string. Coming in as 0 or 1 temp_extras_list = [] - extras_list = [single, ep, compilation, soundtrack, live, remix, spokenword, audiobook] + extras_list = [single, ep, compilation, soundtrack, live, remix, spokenword, audiobook, other] i = 1 for extra in extras_list: