Add %D (disc title without disambiguation) to allowed template variables
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -277,9 +277,9 @@ def getRelativePath(targetPath, collectionPath):
|
||||
def validate_template(template, kind):
|
||||
"""Raise exception if disc/track template includes invalid variables."""
|
||||
if kind == 'disc':
|
||||
matches = re.findall(r'%[^ABCRSXdrxy]', template)
|
||||
matches = re.findall(r'%[^ABCDRSXdrxy]', template)
|
||||
elif kind == 'track':
|
||||
matches = re.findall(r'%[^ABCRSXadnrstxy]', template)
|
||||
matches = re.findall(r'%[^ABCDRSXadnrstxy]', template)
|
||||
if '%' in template and matches:
|
||||
raise ValueError(kind + ' template string contains invalid '
|
||||
'variable(s): {}'.format(', '.join(matches)))
|
||||
|
||||
Reference in New Issue
Block a user