Automatically merging two collections by file type


#1

I have two sets of music files in my collection, one of FLACs and one of MP3s, and there are duplicates of many of the FLACs in the mp3s. I am combining the two by linking into a third directory and I can watch the import and hit S or R to deal with duplicate issues but is there a way of automating this within beets? I can presumably extend via scripting or a plugin but just wanted to check.


#2

Interesting situation! What exactly would you want to automate? Skip all FLACs, and import all MP3s?

Depending on what “goal state” you want, you could consider using the duplicate_action config option creatively—perhaps in multiple passes—to make automated decisions.


#3

The approach I have taken so far is to import the mp3 tree, then import the FLAC tree, and if an album exists as FLACs, remove old by hitting R manually, but it’s a very slow process. As the processing isn’t destructive I’m thinking about using expect to automate the keypresses, but I wanted to make sure I wasn’t missing anything in beets itself.


#4

Ah, I see! If that’s the case, it seems like setting duplicate_action to remove would automate what you’ve been entering manually, right?


#5

Makes sense, I’ll give it a try.