amCap1712 / vlc-listenbrainz-plugin

A plugin to submit listens from VLC to Listenbrainz.
GNU General Public License v2.0
16 stars 2 forks source link

Try to determine title / artist from filename if untagged #4

Open MaxEtMoritz opened 1 year ago

MaxEtMoritz commented 1 year ago

First of all, thank you for creating this plugin!

Works great if the files have tags for title/artist(/MBIDs?). But if the file is not tagged the listens are not submitted.

There are some established naming conventions for music files, maybe the most common one being <artist> - <title>. It'd be nice if, as a fallback when no tags are found, the file name is examined to determine artist name and title, maybe with some builtin formats like the <artist> - <title> one or, taking it further, user-specified format string(s) like %artist% - %title% or similar syntax.

MaxEtMoritz commented 10 months ago

As a workaround, i was able to parse the filename into artist and title using VLC's lua interface. I created a lua script and added it to vlc-dir/lua/meta/fetcher folder. i uploaded that script as a gist if it's helpful for others.

amCap1712 commented 4 months ago

Hi! I would recommend using MusicBrainz Picard to instead tag the files first. AFAIK, ListenBrainz submission plugins for other music players also do not try to guess the track and artist names so it would be nice to be consistent. And such a detection scheme would be easily fallible anyway.