Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions plugins/classical_extras/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
#
# The main control routine is at the end of the module

PLUGIN_VERSION = '2.0.11'
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.2", "2.3"]
PLUGIN_VERSION = '2.0.12'
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.2", "2.3", "2.4"]
PLUGIN_LICENSE = "GPL-2.0"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"

Expand Down Expand Up @@ -118,7 +118,6 @@
##########################
# CONSTANTS
# N.B. Constants with long definitions are set in const.py
PRESERVE = [x.strip() for x in config.setting["preserved_tags"].split(',')]
DATE_SEP = '-'

# COMMONLY USED REGEX
Expand Down Expand Up @@ -598,6 +597,13 @@ def get_references_from_file(release_id, path, filename):
# OPTIONS


def get_preserved_tags():
preserved = config.setting["preserved_tags"]
if isinstance(preserved, str):
preserved = [x.strip() for x in preserved.split(',')]
return preserved


def get_options(release_id, album, track):
"""
Get the saved options from a release and use them according to flags set on the "advanced" tab
Expand Down Expand Up @@ -918,7 +924,7 @@ def get_options(release_id, album, track):
orig_metadata['genre'])
if options['cwp_genre_tag'] and options['cwp_genre_tag'] in orig_metadata:
keep_list.append(options['cwp_genre_tag'])
really_keep_list = PRESERVE[:]
really_keep_list = get_preserved_tags()[:]
really_keep_list.append(
options['cwp_options_tag'] +
':workparts_options')
Expand Down