diff --git a/man/whipper-cd-rip.rst b/man/whipper-cd-rip.rst index 2b8447b..af2a0b9 100644 --- a/man/whipper-cd-rip.rst +++ b/man/whipper-cd-rip.rst @@ -94,6 +94,8 @@ Template schemes | - %A: release artist | - %S: release sort name +| - %B: release barcode +| - %C: release catalog number | - %d: disc title | - %y: release year | - %r: release type, lowercase diff --git a/whipper/command/cd.py b/whipper/command/cd.py index 205e650..32f95f7 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -54,6 +54,8 @@ filling in the variables and adding the file extension. Variables for both disc and track template are: - %A: release artist - %S: release sort name + - %B: release barcode + - %C: release catalog number - %d: disc title - %y: release year - %r: release type, lowercase diff --git a/whipper/common/common.py b/whipper/common/common.py index 9a5f523..f41704c 100644 --- a/whipper/common/common.py +++ b/whipper/common/common.py @@ -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'%[^ARSXdrxy]', template) + matches = re.findall(r'%[^ABCRSXdrxy]', template) elif kind == 'track': - matches = re.findall(r'%[^ARSXadnrstxy]', template) + matches = re.findall(r'%[^ABCRSXadnrstxy]', template) if '%' in template and matches: raise ValueError(kind + ' template string contains invalid ' 'variable(s): {}'.format(', '.join(matches))) diff --git a/whipper/common/mbngs.py b/whipper/common/mbngs.py index a36f536..507defe 100644 --- a/whipper/common/mbngs.py +++ b/whipper/common/mbngs.py @@ -71,6 +71,10 @@ class DiscMetadata: :vartype tracks: list of :any:`TrackMetadata` :cvar countries: MusicBrainz release countries :vartype countries: list or None + :cvar catalogNumber: release catalog number + :vartype catalogNumber: str or None + :cvar barcode: release barcode + :vartype barcode: str or None """ artist = None diff --git a/whipper/common/program.py b/whipper/common/program.py index c953287..60a375f 100644 --- a/whipper/common/program.py +++ b/whipper/common/program.py @@ -176,6 +176,8 @@ class Program: * ``%A``: release artist * ``%S``: release artist sort name + * ``%B``: release barcode + * ``%C``: release catalog number * ``%d``: disc title * ``%y``: release year * ``%r``: release type, lowercase