From 9849a8334f48859a1a30242b6b2ab3e39f46a21c Mon Sep 17 00:00:00 2001 From: piejanssens Date: Tue, 5 Aug 2014 20:51:48 +0200 Subject: [PATCH] Added additional extra's for albums (e.g. dj-mix or mixtape/street). --- 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 d9cc96e6..25188f50 100644 --- a/headphones/mb.py +++ b/headphones/mb.py @@ -221,7 +221,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", "other"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "dj-mix", "mixtape/street", "spokenword", "audiobook", "broadcast", "interview", "other"] includes = [] i = 1 diff --git a/headphones/webserve.py b/headphones/webserve.py index 3a7c6f16..a1e1a985 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", "other"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "djmix", "mixtape_street", "spokenword", "audiobook", "broadcast", "interview", "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,9" + extras = "1,2,3,4,5,6,7,8,9,10,11,12,13" 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", "other"]: + for extra in ["single", "ep", "compilation", "soundtrack", "live", "remix", "djmix", "mixtape_street", "spokenword", "audiobook", "broadcast", "interview", "other"]: if extra in kwargs: temp_extras_list.append(i) i += 1 @@ -1115,7 +1115,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", "other"] + extras_list = ["single", "ep", "compilation", "soundtrack", "live", "remix", "dj-mix", "mixtape/street", "spokenword", "audiobook", "broadcast", "interview", "other"] extras_dict = {} i = 1 @@ -1140,7 +1140,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, other=0, autowant_upcoming=False, autowant_all=False, keep_torrent_files=False, prefer_torrents=0, open_magnet_links=0, interface=None, log_dir=None, cache_dir=None, music_encoder=0, encoder=None, xldprofile=None, + remix=0, djmix=0, mixtape_street=0, broadcast=0, interview=0, spokenword=0, audiobook=0, other=0, autowant_upcoming=False, autowant_all=False, keep_torrent_files=False, prefer_torrents=0, open_magnet_links=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, lms_enabled=0, lms_host=None, @@ -1350,7 +1350,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, other] + extras_list = [single, ep, compilation, soundtrack, live, remix, djmix, mixtape_street, spokenword, audiobook, broadcast, interview, other] i = 1 for extra in extras_list: