New Plugin: Save skipped imports
Description
This plugin will save the name of the skipped song/album to a text file during import for later review.
It will also allow you to try to find the Spotify link for the skipped songs if the Spotify plugin is installed and configured. This information can later be used together with other MB importers like Harmony.
If any song has already been written to the file, it will not be written again.
To Do
- [x] Documentation. (If you've added a new command-line flag, for example, find the appropriate page under
docs/to describe it.) - [x] Changelog. (Add an entry to
docs/changelog.rstto the bottom of one of the lists near the top of the document.) - [ ] Tests. (Very much encouraged but not strictly required.)
Extra Info
I haven't written any tests for this plugin as I'm not sure how to write tests for this kind of thing. If anyone knows how to write some good tests for this plugin I'm more than happy to add them to this PR!
I personally wrote this plugin to later use with Harmony as I currently manually save the skipped song-info from my library of not found songs, search spotify for them and add them through Harmony. Currently I have over 100 skipped songs and I'm only on the letter D in my library so this plugin will save me A LOT of time getting the information to later add.
Hi @EmberLightVFX, thank you for the submission! Interesting idea for a plugin. On a very high level and only having skimmed through this PR's conversation and code quickly, I would like to mention that I see quite similar use-cases for this plugin and the built-in log-file feature of Beets. Before moving on with this plugin, I would like to invite you to compare what benefits this plugin offers over the built-in import log (except the Spotify feature)
So first of all, in case one of you (including @henry-oberholtzer here), hasn't used it yet. This is the crash course:
- Configure in config.yaml to write skipped imports to a predefined log file (https://beets.readthedocs.io/en/stable/reference/config.html#log)
- Or use
beet import --log= ....for specific import runs - Run
beet import --quiet - Complete interactive-required imports later with
beet import --from-logfile ....
Quick and dirty here, I can certainly go into more details if you want. I'm also thinking that this feature might not be too obvious to find out how to use properly for new Beets users since it's rather poorly documented and writing a proper tutorial might also be worth putting effort into.
@EmberLightVFX @henry-oberholtzer any thoughts? Did you find time to think about my comparision with the internal log-file feature? I'm setting this PR to draft for now. Should we close it already and maybe only the spotify-suggest will be a future feature? How should we proceed?
Import from log file seems to do a lot of what this plug aims to do. It could certainly do with more highlighting in the documentation! This plugin seems to differ from --from-logfile in that it saves candidates, so maybe that'd be a different plugin direction.
Import from log file seems to do a lot of what this plug aims to do. It could certainly do with more highlighting in the documentation! This plugin seems to differ from
--from-logfilein that it saves candidates, so maybe that'd be a different plugin direction.
I agree that --from-logfile is kind of badly documented. When I first replied to this thread I wanted to simplay send you docs but found they are lacking detail on how to really use it, so I started to describe it quickly myself.
Is this plugin in its current state saving candidates to the text file already? From what I read here it only saves "artist - title" (which in my opinion is not very useful for a reimport later on. Is the purpose of this plugin even to move on with importing "difficult" to find tracks/albums or did I misunderstand it in the first place? Please rephrase again (sorry I might be slow here) @EmberLightVFX what you tried to do in the docs already (Harmony MusicBrainz importer for example)
https://github.com/beetbox/beets/pull/6140/files#diff-748c48fa17458aae81d7c28f64bf287aaf5864c919b16cbb8b62333daab78acbR42
https://github.com/beetbox/beets/pull/6140/files#diff-bbab3c937e587079482d4ff607fbd08ffb8886972381c44df243746a71d8e1bdR4-R5
I don't want to be at all opposed on creating a new and fancy plugin that helps people better import stuff into their Beets library but I'm not yet sure what we are really aiming for.
This plugin does a lot of file reading/writing, must handle errors, and even calls spotify and records things. There is a lot that can go wrong. The spotify search is only artist/title, that will bring a lot of false positives. Well, this could be a little improved if it would search via ISRC and then only fall back to artist/title/album. But even then I'm questioning: When a file to import has been skipped in the importer, most probably because it was hard to find from all the sources (mb,discogs,spotify,deezer,....) why will it be helpful to search for it on spotify again? If we didn't find it already, we won't find it then either, right?
Ooor asking again: Is the purpose not to find out what is difficult to import / no matches found / save tedious and manualy importing work in a logfile to work through in batch? Is there a different use-case?
So to wrap this up:
-
What do both of you think about taking the time to thoroughly document the from-logifle feature first, then we would see whether it can be improved (I'm sure there is much room for improvement) and were a plugin like we have here add even more value to the existing feature (or do something else entirely)
-
Also: Please provide some examples of how that textfile can look like, I'm having a hard time figuring out how it looks from the mentioned code snippets above, I have an idea but might not see all the details. That would help for a better high level review or maybe a concept refinement going forward.