Exle / aimp-discord-presence

Plugin for AIMP that changes the status of Discord, depending on what you are listening to.
http://www.aimp.ru/?do=catalog&rec_id=970
97 stars 20 forks source link

This plugin seems abandoned, anyone mind updating it? #31

Closed prototype464 closed 3 months ago

prototype464 commented 8 months ago

I tried MusicBee at some point and its Discord Rich Presence plugin is a lot better, showing album covers and the current timestamp, among other things. This plugin is missing those, any chance someone smarter than me could fork it and make those updates? That would be awesome.

Thank you!

FatalFit commented 8 months ago

Tried the plugin today then saw this, what a coincidence, it would be amazing if someone tried to bring this back to life

Chris3461 commented 7 months ago

I hope someone can show the album cover :(

iBowie commented 7 months ago

I hope someone can show the album cover :(

image

I may have some advances in that regard!

Note: this is a dynamic link, not discord asset. So it's not limited by this.

kwotaq commented 7 months ago

I hope someone can show the album cover :(

image

I may have some advances in that regard!

Note: this is a dynamic link, not discord asset. So it's not limited by this.

Please keep us updated! Would love to see this feature implemented

iBowie commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters.

I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this?

For the proof-of-concept I used my own VPS, just to make sure it will work.

kwotaq commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters.

I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this?

For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

iBowie commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters. I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this? For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

Unfortunately, Discord requires direct image link, otherwise it wouldn't work.

kwotaq commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters. I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this? For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

Unfortunately, Discord requires direct image link, otherwise it wouldn't work.

Have you tried Spotify or Youtube Music as a source for album covers? Also personally I have all my music downloaded with the covers in its metadata, is your implementation parsing local files or only searching the web for them?

iBowie commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters. I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this? For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

Unfortunately, Discord requires direct image link, otherwise it wouldn't work.

Have you tried Spotify or Youtube Music as a source for album covers? Also personally I have all my music downloaded with the covers in its metadata, is your implementation parsing local files or only searching the web for them?

Spotify has closed API, so does YouTube, and their links are most certainly longer than 128 characters (due to CDN and a lot of parameters and long names). You can't just send image to Discord as cover, since you can only use either pre-loaded Asset on Discord Developer Portal, or direct image link that is no longer than 128 characters. So yes, I used the web to search for images. However, I am still in search of a music service that would work well with Discord's limitations.

kwotaq commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters. I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this? For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

Unfortunately, Discord requires direct image link, otherwise it wouldn't work.

Have you tried Spotify or Youtube Music as a source for album covers? Also personally I have all my music downloaded with the covers in its metadata, is your implementation parsing local files or only searching the web for them?

Spotify has closed API, so does YouTube, and their links are most certainly longer than 128 characters (due to CDN and a lot of parameters and long names). You can't just send image to Discord as cover, since you can only use either pre-loaded Asset on Discord Developer Portal, or direct image link that is no longer than 128 characters. So yes, I used the web to search for images. However, I am still in search of a music service that would work well with Discord's limitations.

Well my point is that maybe the best solution is doing what you did as a proof of concept and using a localhost to send the image links to discord instead of finding such a service. That way you can use images already in local files as well as populating the host with images you find from the web without the link limitations. Unless I'm completely misunderstanding things of course, if so sorry I couldn't be of any help!

iBowie commented 7 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters. I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this? For the proof-of-concept I used my own VPS, just to make sure it will work.

Does the largeimagekey accept any link? If the character size itself is the issue couldn't you use a link shortener? That would be even more web requests I guess but it may solve the problem. Does it only accept links? Could you perhaps index the queries into a local database and parse it from there? Not really familiar with the limitations of the Discord rich presence stuff but I'm just throwing out ideas to see if I could help in some way, sorry if my suggestions are uninformed.

Unfortunately, Discord requires direct image link, otherwise it wouldn't work.

Have you tried Spotify or Youtube Music as a source for album covers? Also personally I have all my music downloaded with the covers in its metadata, is your implementation parsing local files or only searching the web for them?

Spotify has closed API, so does YouTube, and their links are most certainly longer than 128 characters (due to CDN and a lot of parameters and long names). You can't just send image to Discord as cover, since you can only use either pre-loaded Asset on Discord Developer Portal, or direct image link that is no longer than 128 characters. So yes, I used the web to search for images. However, I am still in search of a music service that would work well with Discord's limitations.

Well my point is that maybe the best solution is doing what you did as a proof of concept and using a localhost to send the image links to discord instead of finding such a service. That way you can use images already in local files as well as populating the host with images you find from the web without the link limitations. Unless I'm completely misunderstanding things of course, if so sorry I couldn't be of any help!

In that case you would need to boot a web-server each time you start AIMP, and also use port-forwarding, which would be a security issue. Best case scenario would be hosting a web-server that would do required requests for you on some VPS hosting. Doesn't require much CPU time, just quite cumbersome to setup, and not very user-friendly.

Even better scenario would be finding some open API that gives you album cover when you provide them with artist and album name.

iBowie commented 7 months ago

Or, you know, you could always do this, but be limited by 297 album covers (+3 for play, pause and default logo)

image

Which is absurd

Chris3461 commented 7 months ago

Or, you know, you could always do this, but be limited by 297 album covers (+3 for play, pause and default logo)

image

Which is absurd

I hope you make it, good luck

prototype464 commented 6 months ago

Currently my main roadblock is that I can't find a cover art service which URL will not be longer than 128 characters.

I tried MusicBrainz with CovertArchive, but it requires THREE separate web requests and resulting link is too long for Discord to handle. Maybe someone could lend me a hand with this and help me find a service like this?

For the proof-of-concept I used my own VPS, just to make sure it will work.

What about providing the current file's metadata? Paired with something like MP3Tag for changing cover art that would be a decent compromise, doesn't have to use an online service for the time being

iBowie commented 6 months ago

What about providing the current file's metadata?

You HAVE to provide Discord with either image URL or image asset ID. You CAN'T send just raw image data to Discord.

Zeninari commented 5 months ago

does anyone know how MusicBee does their album art sending? maybe that is a hint to getting this working. i assume it caches the image somewhere then sends the URL.

is there any hope iBowie of getting this working at all?

Zeninari commented 5 months ago

im still impressed by the plugin even if it never happens but there has to be a way to do it right? if musicbee was able to make it work, then it must be possible to make AIMP also have it somehow.

its an intresting issue indeed . . .

i decided to look into discord bee the plugin for musicbee:

Album Covers: "If the cover upload feature is enabled your album covers will be uploaded to an anonymous Imgur album. This album is unique to every instance of the plugin, so nothing is shared between users of the plugin. You don't need an Imgur account for this feature to work."

this is interesting to me as i never thought about that. the links from imgur is normally short i believe. have you tried doing anything similar as a concept?

if we did something like this i would actually prefer if the bot we choose uploads them to our own imgur album (req account) if we chose to do that. mainly because that would make me feel better since some of my music has my own art on it.

just trying to think about if there is any way to save this discord presence since its VERY good in my opinion. it shows the most stuff live from what i can see. i havent found another discord presence maker that is better than this, - the album art of course xP

iBowie commented 5 months ago

im still impressed by the plugin even if it never happens but there has to be a way to do it right? if musicbee was able to make it work, then it must be possible to make AIMP also have it somehow.

its an intresting issue indeed . . .

i decided to look into discord bee the plugin for musicbee:

Album Covers: "If the cover upload feature is enabled your album covers will be uploaded to an anonymous Imgur album. This album is unique to every instance of the plugin, so nothing is shared between users of the plugin. You don't need an Imgur account for this feature to work."

this is interesting to me as i never thought about that. the links from imgur is normally short i believe. have you tried doing anything similar as a concept?

if we did something like this i would actually prefer if the bot we choose uploads them to our own imgur album (req account) if we chose to do that. mainly because that would make me feel better since some of my music has my own art on it.

just trying to think about if there is any way to save this discord presence since its VERY good in my opinion. it shows the most stuff live from what i can see. i havent found another discord presence maker that is better than this, - the album art of course xP

Sounds like an idea, will try

iBowie commented 5 months ago

Tried it - it works! At least with limited testing that I did. image

iBowie commented 5 months ago

It works, however, there are few caveats I have to fix before it's ready for use.

Zeninari commented 5 months ago

It works, however, there are few caveats I have to fix before it's ready for use.

* It tries to upload multiple times, all because of not async nature of the plugin

* I tried to implement a persistent cache, however it crashed the player during save (player kept playing, UI froze)

good to see that it did work at all, if you can't get it fully working that's alright. the fact that you attempted and tried, that's the important part.

i also never mentioned what i use on mobile though i have no idea how it works. its called Kizzy (though i think it uses android features to push the album art and other info to discord. however it does use a PC to push it to discord . . . shown by the red desktop icon that appears when using kizzy(if also not on PC that is))

either way ty for your contributions. and sorry that i missed the response i think you can tell im not an avid github user. (@blackswordsmankirito was my old acc. im starting over as well my actual username i go by so don't say i'm new here im not) its also kind of funny how i barely did anything on that account XD

ill also say again i do not mind if we need an imugur account as that is something i would want to keep the art i made SAFE. ik it probably would be either way, but thats just a preference of mine.

Zeninari commented 5 months ago

It works, however, there are few caveats I have to fix before it's ready for use.

i tried to wait from a response from you but ill ask now, do you have any ETA of when it might be done or in a somewhat operable state? or did an issue arise? i don't like rushing people but its more sad when there's no response.

nicowinnerballs commented 4 months ago

It works, however, there are few caveats I have to fix before it's ready for use.

take your time dude, i attempted to do something like this a while back and as a complete amateur it crushed me. youre doing some great work, cant wait for a public release

Zeninari commented 4 months ago

It works, however, there are few caveats I have to fix before it's ready for use.

take your time dude, i attempted to do something like this a while back and as a complete amateur it crushed me. youre doing some great work, cant wait for a public release

indeed couldnt agree more. just wish they would give at least some sort of update. mainly because i'm getting a bit paranoid that this was dropped again which would be sad but id like to know that. either way i see ibowie did heart your comment and thats good enough for me!

i wish you luck ibowie you are doing a godsend for all of us that love aimp ^^

Zeninari commented 3 months ago

hope its going well, a new update from the original author kind of added album art but i really do not like how it is implemented. if you get it working from the tags (as well as keeping the original functions intact, like the play/pause status and the how much is left instead of how long the plugin has been active) then i will be 100% using this version of the plugin no questions asked.

i am so glad it renames the plugins to NAME.dll_old instead of overwriting it. i do not recommend updating the plugin if it still works for you as it does for me.

iBowie commented 1 week ago

hope its going well, a new update from the original author kind of added album art but i really do not like how it is implemented. if you get it working from the tags (as well as keeping the original functions intact, like the play/pause status and the how much is left instead of how long the plugin has been active) then i will be 100% using this version of the plugin no questions asked.

i am so glad it renames the plugins to NAME.dll_old instead of overwriting it. i do not recommend updating the plugin if it still works for you as it does for me.

I did have some progress, and I'm pleased to say it's working quite well. All this time I was ironing some of the lesser issues, and implementing a lot of features. Here's how it looks now. image

Hope to get it as soon as possible, with guides how to setup album covers (it requires some one-time setup, hope it's worth it)