beets
beets copied to clipboard
convert: Keep-both option
Use case
As described in issue #3407, my use-case is to have beets manage albums in more than one format. I like to keep FLAC files for when space is not an issue, ogg to use on my phone, and mp3 for my wife's old player that can't read ogg. So, ideally, I would like the option to do the following:
- If importing a lossless format
- import it to
$albumartist_sort/${albumtype}s/$original_year - $album [FLAC]/$track $title, AND - convert to ogg files in
$original_year - $album [OGG]/directory located in the same parent as the FLAC directory above, AND - convert likewise to MP3, AND
- import all three formats into my beets database, so I can use the format info in queries.
- import it to
Solution
My immediate thought is that instead of the toggle --keep-new to choose between keeping the original in your library and relegating the converted version to an untracked external directory tree, vs replacing the original with the converted version, the option should be --keep and accept the values 'original', 'new', and 'both', with 'both' importing the transcoded version into the library alongside the original.
Alternatives
As a workaround, converting an album to an external directory without --keep-new, and then importing that directory, does seem to achieve my goal (and the import step takes care of the problem of 'convert' not using the right ${format} string for the output directory). It's clunky though, and as far as I can tell the only way to automate this process is to write my own helper script.
Sounds like a pretty good idea! For what it's worth, this won't be extremely easy—it will be slightly tricky to get multiple sets of files to use the same metadata match in the importer pipeline. But I don't think it will be that difficult either.