Pick cover art from local metadata
Is there a way to pick the cover art from the metadata on the file itself? All of my music is locally and each album has it's cover art in the same folder. Is there a way to use those images for the cover art or there are issues with Discord?
Hi, may I know what music player you are using? Have you set the ImgBB API key yet?
The program will try to read the cover art from the song's metadata, if it doesn't exist, it will try to find the cover art file (if it knows the path to the song). See https://github.com/lazykern/mprisence/blob/main/config%2Fexample.toml#L74-L76
I didn't want to create another issue for this, as it's within the same topic.
I recently updated to the latest version and it is finally picking up the cover art, but sadly it's using cover art cached from musicbrainz, and it is inaccurate.
If I want to use the cover art file that's in the same folder as the song, I need to configure ImgBB for that?
Thanks in advance.
Sorry for the late reply! Yes, you have to configure ImgBB (no worries it's free) to use local cover art since discord rich presence requires an url for image that will be shown.
If ImgBB provider is used to fetch the cover art, it will prioritize embedded image in the track first, if the embedded image is not found it will try to find the cover image file (can be configured in cover.file_names in mprisence config starting from the track directory.
The cover file names to search for can be configured like this
[cover]
file_names = ["cover", "folder", "front", "album", "art"] # this is the default config
You might want to config mprisence to prioritize the local cover art too.
[cover.provider]
provider = ["imgbb", "musicbrainz"] # Try local cover art first, default: ["musicbrainz", "imgbb"]
Make sure to clear the cache folder too!
rm -r ~/.cache/mprisence/
However, if you don't want to use ImgBB, it's best to tag you music files with MusicBrainz Picard for the best match with MusicBrainz.
Also, in version 1.1.0, I increased the score filter in MusicBrainz cover art queries to 95%, it might help clearing out false-positives.
Please let me know if you encounter any further issues.
Thanks a lot! This worked like a charm.
And thanks again for mantaining this project, it's nice being able to share what I'm listening to on Discord properly :)
Awesome, glad it helped! And thanks right back at you for using mprisence, really appreciate it!