-
Notifications
You must be signed in to change notification settings - Fork 9
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
Artwork/cover showing in discord(?) + title format #4
Comments
Hey there, Regarding artwork and covers, I unfortunately have to tell you that this is not quite possible. :( If my plugin should be able to show artwork or a cover, I would need to upload them to the Discord application registration as assets for the Presence App to use. For the second thing, I havent figured out yet how to register a configuration/settings page inside of the foobar2000 preferences window. I could however try to store some sort of config inside of a file that could be edited. I'll gonna try to implement that! |
Thank you again for answering so fast, so far i love this component for Discord Rich Presence. |
I've been thinking about this too. Each user would need to create their own Discord "app" and set the ID accordingly, but you could probably easily automate the act of uploading a picture with an HTTP library. I'm not a C++ guy, but I want to try and get a proof of concept working of this. |
def change_album_art(f_name):
with open(f_name, "rb") as f:
album_cover_base64 = base64.b64encode(f.read())
requests.post(
"https://discordapp.com/api/oauth2/applications/YOUR APP ID/assets",
headers={"Authorization": "YOUR AUTH HEADER HERE"},
json={
"name": "album",
"image": "data:image/jpeg;base64,{}".format(
album_cover_base64.decode("ascii")
),
"type": "1",
},
) This above method will upload a JPG to the app assets list, given the users app id and authorization header. Unfortunately, I couldn't get the proof of concept to work that uploads album art and sets the activity on the fly. I think it's an issue with caching or something like that. |
is it possible to make so the foo_drpc component show the artwork/cover? (if the file ur playing have it)
instead of foobar2000 logo in discord?
maybe a option to turn that off and on for people that wants it in components preference.
(idunno if u want to do it, sound like alot of work to do. but would be a nice option to have)
if u dont want to do the thing above, is it possible to make so we can change how the songs are being showed atleast? (i dont like how it shows artist-title, i like it like "title" by artist)
if we could add our own title format script it would be nice. since i like using this:
$if($and(%artist%,%title%), "%title%" By %artist% )
$if($and(%title%,$not(%artist%)), %title% )
(and some may like to use their own)
The text was updated successfully, but these errors were encountered: