How to fill in missing tracks

Sorry to post again, but learning the ropes. I posted recently about my troubles with singletons. I won’t repeat that here, but my experimenting left me with some albums that are now missing tracks. I backed up my files prior to testing so I have a copy of the folder with all of the tracks present. What I would like to do is use that backup and import it into teams so that the missing tracks in the beets database will be filled in.

For example, I have a folder that should have ten tracks (1-10) but number 2, 3, 4 are missing. I have a backup that has all ten tracks. How would I overlay those missing tracks back into beets?

My reading of the documentation shows a “merge” option that sounds perfect, but I haven’t seen that as an option and it doesn’t seem to be a command.

I do see:“beet duplicates --album --merge --delete” and the description sounds promising, but it appears to be working on duplicates that already exist in the database, not where I have an external group of files that I am using to fill in the missing tracks.

At some point I will become self sufficient and maybe even capable of giving back, but I am (obviously) not there yet. Thanks for your help.

Have you tried re-importing those tracks with beet import? Provided they are tagged as the same album, beets will prompt you that there is a duplicate and offer the option to merge/replace the version currently in your library.

2 Likes

Yes. That seemed to be the first place to start. Since the source folder is simply a backup of the folder that was already imported into beets, the tagging is exactly the same. I tried “beet import ” and it spun a bit and came back with candidates for matching like it is going through the auto tag process all over again and migrates it into a new folder with the Album_ID appended to it.

I am beginning to come to the conclusion that beets is a futile effort.

While it’s sort of annoyingly manual, the thing to do is to remove the album (with beet rm -a <name of album>) before importing the complete one again.

Thanks for your insight. I will do this to resolve those that my testing introduced gaps.

Theoretically you should be able to import one missing track after the other and at the “duplicates prompt” in the importer you choose merge, which then gives you another “candidate” that tries to merge in that missing track. Oh well, Jack did explain that already! Sorry.

Now you do this 3 times in a row and your album is complete, so yes, Adrian is absolutely right: Just delete and reimport it and you are done. That is much faster in this case haha :-)))

What I often do though to not be stopped with the “duplicate prompt”. I just set duplicate_action: merge in the import section of config.

Good to have you on onboard! Welcome to the beets journey! :slight_smile:

Thanks for the insight. I took Adrian’s advice to delete and reimport. Actually, started writing a plugin to do what I want. Might not be for everyone, but I use the missing plugin to identify missing tracks and then search the database for instances where I might already have that particular song on another album (stand alone album vs greatest hits, etc) and then put everything together and reimport.

The learning curve was pretty steep at first, but I got past it. I am not new to coding, but I am new to python and I am rusty. It has been awhile since I have written code routinely. The addin actually works perfectly at this point for my purposes, but now I am trying to polish it up a bit so that maybe it can see the world beyond my desktop.

Beets has been a fun exercise. I appreciate the insight that has been shared.

1 Like

Glad you are happy with it so far and yeah it would be wonderful if your plugin would see the world. It mitght have one fan already! Polish a little and I’m happy to review a submission :slight_smile:

2 Likes