@@ 2,7 2,7 @@
doc = '''
scrobble .rockbox/playback.log, handling exclusions and such.
-this script assumes filenames of the form '$root/<artist>/<album>? (Disc <#>)?/<#> - <name>.<ext>'
+this script assumes filenames of the form '$root/<artist>/<album>? (Disc <#>)?/[Disk # - ]<#> - <name>.<ext>'
config is INI-format. it supports the following parameters:
[pb2s]
@@ 126,7 126,7 @@ def scrobblify(entries: Iterator[RawLogEntry]) -> Iterator[Scrobble]:
if (m := re.search(' ?\\(Disc \\d+\\)$', album)) is not None:
album = album[:m.start()]
- if (m := re.match('\\d+ - ', track)) is not None:
+ if (m := re.match('(Disc \\d+ - )?\\d+ - ', track)) is not None:
track = track[m.end():]
track = track.rsplit('.', 1)[0]