Track naming #29
SenorSmartyPants
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made a few rounds of changes to how I name individual files of my audiobooks using beets. Here's a copy of the config given in the beets-audible readme.
$track - $title
is the area of concern.First thing I wanted to change was for books with just one file, I didn't want a track number in the filename. For these examples you need to add the
inline
plugin to your config. I did this so I could do more complicated logic and save it to a variable. The logic aftertrack_and_title
checks if there is more than one track/file for this book, if there is output the track (padded to 2 digits) and title, otherwise, just output the title. This works well for single file M4Bs.After importing more of my mp3 library I ran into tracks that I had named as
Chapter XX - Title.mp3
. Beets wanted to rename them asXX - Chapter XX - Title.mp3
. I didn't want the extra track numbers in those cases where the track number matched the chapter number. So I changed track_and_title to use a regular expression to check the title if it contained a couple variations.Chapter XX -
Chapter XX:
Chapter XX
XX -
XX:
XX
If those are found in the title, just use the title to name the file. But if chapter numbers don't match, it will rename to something like
06 - Chapter 3.mp3
Beta Was this translation helpful? Give feedback.
All reactions