my problem is not all my favorite artist/track is on musicbrainz, so there is some steps that i have to take before import it to beets
current workflow
so why not cut some step from that.
here is proof of concept of that as script
https://gist.github.com/rachmadaniHaryono/934d0ba8eea14f3be5e91eb033481518
Hi! Interesting work. What’s your proposal here? It seems like your solution is working OK already.
I'm still learning how to make this as plugin for beet
Updated script https://github.com/rachmadaniHaryono/beets/blob/master/yt_beets.py
E:
does beet support saving data from plugin? Or the plugin must handle it by themselves?
is it possible to add YouTube thumbnail as additional cover?
In fact, I've a working (but completely undocumented and not very well tested or maintained) plugin in a local repository that does something along those lines. I had planned on uploading that to github at some point anyway, maybe I could do so soon, if I do, I'll drop a note here.
It hooks into youtube-dl in a rather hacky way and uses its commandline parser, lets it do its job and then starts a normal beets import session for anything that has been download, usage is like
beet ydl [beets-ydl options] -- [youtube-dl options]
# Import as singletons
beet ydl -- -f bestaudio <youtube link>
# import as album (useful for playlists for example)
beet ydl --album -- -f bestaudio <youtube link>
Beets' templating engine is used to set initial metadata (before the import) such that the importer has a good chance of matching musicbrainz entries. Because this is configurable, it could also be used to save any of the other metadata you mention as long as youtube-dl supports it.
is there a way to import a file but also give directly artist and title value for musicbrainz match track?
Not exactly, but perhaps more usefully: there is a --search-id flag to the import command that lets you specify a specific MBID.
a way to save YouTube metadata to track?
Have you seen the modify command? You can save any field name you like.
does beet support saving data from plugin?
I’m not sure exactly what you mean… but certainly, there are lots of plugins (lyrics, lastgenre, etc.) that store metadata. And see the fetchart plugin for an example of associating album art images with albums.
Hey guys. I did some effort on this. Made a small plugin to download albums from Youtube. It will also parse track times from youtube-dl sources and split the mp3 album files into tracks. Tested only in some YouTube URLs by now. https://github.com/vmassuchetto/beets-ydl
hi @vmassuchetto , i would love it if you can improve it.
it would be better if the song can be searched without having to know the youtube url.
so search musicbrainz > search mb result on youtube (or others) > download with tags and info from youtube
@sampsyo this could be greatly improved if we could import one-track albums. I see that this is implemented in https://github.com/beetbox/beets/commit/c9141a6adf912f18916cad99b4f55e52e530916f, but doing beet import full-album.mp3 and entering some search to the correct album will try to import the file as a track of the album, and not as the full album.
Any ideas of how to achieve this? Would be great if tracklists could go into the description or something like this. Thanks.
That would be really hard to do, probably! It would require some fundamental changes to beets to decouple files from tracks—it currently believes that every item is backed by exactly one file. So multiple tracks can't be ranges within a single audio file on disk.
https://github.com/beetbox/beets/issues/136 discusses this kind of refactoring in more detail.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Hey guys. I did some effort on this. Made a small plugin to download albums from Youtube. It will also parse track times from youtube-dl sources and split the mp3 album files into tracks. Tested only in some YouTube URLs by now. https://github.com/vmassuchetto/beets-ydl