beets icon indicating copy to clipboard operation
beets copied to clipboard

convert: Multiple automatic conversions

Open sdfg2 opened this issue 10 years ago • 4 comments
trafficstars

Could we add a feature whereby we select what happens at various stages of the import process when it relates to auto converting?

I want my canonical reference library to be flac. So if I get music that's lossless but not flac, on import, I want it to convert to flac /first/, and then import. That's all well and dandy, and it does it perfectly this way.

But I -also- want beets to manage my mobile media, so /after/ the flac has been imported and tagged and cover-arted and all the magical whiz I want beets to do, I would then like it to /also/ convert the canonical reference to opus.

I know I can do this manually, but it's a bit of a pain in the bum.

I envision something like pre_import_format, post_import_formats (or similar). Then it can just use the same convert.formats that are already there.

sdfg2 avatar Jun 28 '15 15:06 sdfg2

Interesting proposal. I'm guessing that most people will want all their converted music to be well-tagged, regardless of where it ends up (the canonical copy or some secondary library of lossy files). So maybe the right feature to add here is just "multiple automatic conversions". Would that cover your use case?

sampsyo avatar Jun 29 '15 15:06 sampsyo

I think so, but the biggest problem is the order in which the conversions take place - it seems daft to me to convert everything before import (as is currently done) if the tags are all nonsense. That's why I suggested a pre- and post-import period, so you can take whatever files you want in (in my case lossless, for example ALAC), then convert them to the 'core' format you want (in my case FLAC), do all the nice shiny tagging, artwork fetching, metadata cleaning - whatever else a user has told beets to do - and then use those new tags and files etc for the conversion process.

(Also, the path: $format bug needs fixed before this can happen ;-) )

sdfg2 avatar Jun 29 '15 20:06 sdfg2

Hmm, that's odd—conversion currently (as I read it) should happen after the metadata is applied. It happens at the same point in the import process as, for example, rewriting artists in the ftintitle plugin: after the new metadata has been fetched.

So can you reliably reproduce a situation where the wrong metadata is written to files? If so, this may be a bug.

sampsyo avatar Jun 29 '15 21:06 sampsyo

Oh, no, I misread the output. I assume that if an imported file is already in flac, it just gets copied? In which case yeah, multiple formats would work.

sdfg2 avatar Jun 30 '15 08:06 sdfg2