-
Notifications
You must be signed in to change notification settings - Fork 19
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
Show album art instead of player icon #19
Comments
It's not possible to use arbitrary icons with the Rich Presence API. All icons must be uploaded for the registered app first and can then be referenced by name. It may be possible for everyone to maintain a custom app and then have discordrp-mpris upload album art assets there, but I don't know how fast the images are updated (the website takes minutes to list newly added icons). Would also be quite a bit of work, although the feature is nice. |
Discord has recently added support for URL's as a rich presence asset, although I am not sure how many libraries are supporting that right now. I am the maintainer of MDRP, and I am in the process of using the ITunes api to get a url that refers to the art for a specific album, searchable by artist, album, and song. I unfortunately have to use an alpha build of the c# library, so this is probably not supported in python yet |
That sounds interesting. Can you point me to some documentation on this new feature or alternatively the code of this c# library? I fear it might be using a different IPC interface than what I am currently using since they did add another API after I wrote this. Note that it's not a high priority for me at the moment. |
It appears to be possible to use remote URLs of any file hosts as-is into both A bit more details over here TheQwertiest/foo_discord_rich#6 (comment) |
I ended up implementing this on my personal-use fork (BobbyWibowo@907949b ... BobbyWibowo@f88a7b5) Mostly by "stealing" our existing Linking them for references, and to hopefully kickstart FichteFoll early to implement it themselves, lmao
YouTube videos via plasma-browser-integration (as-is due to using YouTube thumb url directly) Strawberry Music Player (auto-upload local album cover to imgur)
|
Yeah? this addition seems to be good. There is a discord documentation available on this idea. The link from upper comment don't work. So, please, can you make it? |
I've just started making fork of this masterpiece, but with album arts. As I see, you can just pass http URLs and it will show the album art from metadata (I've just used ctrl+C ctrl+V and changed one condition with resulting activity for a bit). I'm now working on any other URLs because there's commonly rfc2397 URL, which discord (for some reason) can't use. Though, we can easily get image from there and use it. |
Since you seem to have made some investigations already, which application uses which scheme? For |
Getting image isn't a problem because |
I've just made a pull request #32 with solution to this issue |
Partially implements #19 for players that provide a world-accessible URL using HTTP(S). Automatic image upload for local files will be implemented later.
On the I'll see when I get around to thinking more about how I want the custom file upload to be structured & configured to allow for sufficient flexibility. |
Maybe s3 with a custom endpoint? That would be the most universal option, most hosting providers provide an s3 compatible storage for penies + can easily be self hosted with something like minio. A public image upload site is also fine as a default "may or might not work" alternative for people that can't/don't want to use s3. Another funny (free) way would be to have a discord bot upload them on some random channel and then just feed the discord cdn url back to discord 🤣 but that is a bit overkill imo |
I've done this in my fork already, but it's just too simple to be there. It's just for an example and a start point to go |
Perhaps musicbrainz integration? Pull metadata of the song to automatically find a URL to the album art? |
There is a MusicBee discord plugin which has working album art. I thought it might help y'all. |
Is anyone here actually interested in being able to choose the image hosting service or would you be fine with anything as long as it works? Not having to implement imgur uploading for example and only considering very simple pomf-like HTTP POST upload services would make the first iteration a lot easier to implement. Well, to be honest, I would do those implementations first anyway because they are so simple. Other upload services might then get added later on an on-demand basis. |
not having to rely on some random host that might break/rate limit you at any monet is definitely appreciated. Get the initial implementation on whatever is the most comfortable and just design it in a way where hosting providers can easily be swapped out. |
Bro my fork using host that is able to send http link after POST. |
I think that I have good solution - Host simple HTTP server on the users' computers. |
NAT/firewall would also be a problem, unless if Discord proxies the album art. |
discord proxies all images (and other embeds) on its platform. |
It proxies it from "outside"—ie some Discord server somewhere will grab the URL and proxy from there on. The client itself does not proxy the information. |
Hosting an HTTP server yourself is an interesting idea at first, but as already mentioned not applicable because of NAT/firewall. Instead of your own client locally resolving the URL (where we could even use a If this somehow proves to be wrong then that would simplify the implementation a lot indeed, but I highly doubt it. |
Instead of showing the player icon, show the embedded album art instead of the default icon. Looks like we can use the Metadata property and get the album art uri and embed that.
The text was updated successfully, but these errors were encountered: