tagger.py: set track title for audiobooks
authorColin P. Mccabe <colin@cmccabe.xyz>
Sat, 22 Sep 2018 01:00:00 +0000 (18:00 -0700)
committerColin P. Mccabe <colin@cmccabe.xyz>
Sat, 22 Sep 2018 01:00:00 +0000 (18:00 -0700)
Set track title for audiobooks.  Some music players sort on this field.

tagger.py

index be22447..ea59b59 100755 (executable)
--- a/tagger.py
+++ b/tagger.py
@@ -236,7 +236,7 @@ class MusicFile(object):
     def from_filename(filename):
         if (audiobook):
             match = audiobook_file_name_re.match(filename)
-            track_name = ""
+            track_name = match.group('track_number')
         else:
             match = music_file_name_re.match(filename)
             track_name = match.group('track_name')