Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get cover from url, not only file #97

Open
prietus opened this issue Oct 1, 2017 · 7 comments
Open

get cover from url, not only file #97

prietus opened this issue Oct 1, 2017 · 7 comments

Comments

@prietus
Copy link

prietus commented Oct 1, 2017

it seems like mpDris2 fetches covers only from files (or it looks to me), so when the url is e.g current song = {'file': 'http://192.168.1.128:9999/get_song?id=Tqoxmtzickfk33l22pl5hcy2t64' it does not grab cover, even when it is possible the same way it does for files.
I also tried recreating the album structure in the music_dir and putting a cover/front.jpg there with no success.
I'm I right supposing the latter approach won't work?
may you consider being able to grab the covers from http:// too?
thanks in advance.

@grawity
Copy link
Collaborator

grawity commented Oct 1, 2017

Wouldn't this mean mpDris has to download the whole song – which may be quite large and possibly even an infinite radio stream... Not sure if that's doable unless mpd itself learns how to export the cover image.

@prietus
Copy link
Author

prietus commented Oct 2, 2017

I made some tests and it looks like first 128 bytes are enough, something like http://ix.io/ADd/py .
what about recreating album folder structure at music_dir? I tried doing it with a cover/front.jpg inside and it seems mpDris2 does not pick it, maybe I did it wrong. with the latter, mpdris2 shouldn't need to download tracks.

@koflesinge
Copy link

What about using something like this ?
https://github.com/abarisain/dmix/wiki/Album-Art-on-your-LAN
This is fairly current for mpd and mpdroid, and could be simpler to implement.

1 similar comment
@koflesinge
Copy link

What about using something like this ?
https://github.com/abarisain/dmix/wiki/Album-Art-on-your-LAN
This is fairly current for mpd and mpdroid, and could be simpler to implement.

@eonpatapon
Copy link
Owner

If you set the music_dir, mpDris will try to find covers in it.
This is the regex that its using: r'^(album|cover|\.?folder|front).*\.(gif|jpeg|jpg|png)$'
It expects the cover to be in the song directory.

@wvengen
Copy link

wvengen commented Mar 13, 2018

I've been using these changes in the past, allowing one to specify a remote cover url.

@kastdeur
Copy link
Contributor

@wvengen, I'm a big fan of your solution so I've rebased your work on the latest master in my branch remote-art. Care to make it a PR?

I do think this solves a different problem from @prietus , though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants