Emit warning when the subcode's pre-emphasis flag of a track differs from the ToC's one

In the future I'd like to make sure this information is included in the logfile too (maybe also in the cue sheet).

Related to issue #296.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2020-09-18 11:58:18 +00:00
parent 145cc47aa8
commit 1661e4291e

View File

@@ -22,6 +22,8 @@ _BEGIN_CDRDAO_RE = re.compile(r"-" * 60)
_LAST_TRACK_RE = re.compile(r"^[ ]?(?P<track>[0-9]*)")
_LEADOUT_RE = re.compile(
r"^Leadout AUDIO\s*[0-9]\s*[0-9]*:[0-9]*:[0-9]*\([0-9]*\)")
_SUBCODE_EMPHASIS_LINE = ("Pre-emphasis flag of track differs from TOC - "
"toc file contains TOC setting.")
class ProgressParser:
@@ -55,6 +57,10 @@ class ProgressParser:
"found %d Q sub-channels with CRC errors" %
(self.currentTrack, int(crc_s.group('channels'))))
# TODO: add subcode pre-emphasis info for each track to logger too
if _SUBCODE_EMPHASIS_LINE in line:
logger.warning(_SUBCODE_EMPHASIS_LINE)
self.oldline = line