applemusicrp
applemusicrp copied to clipboard
Crashes on song title >128 characters
Hello, I've noticed the app sometimes crashing on certain musics. It has happened on some of the Apple Music Music Mix lists so I don't know if it's related to the musics not being in my library (but it doesn't seem to be the case as I'm listening to non library music without the app crashing) but that brings me to the second type of crash: titles. I don't know if it's the special character of the title ( called "¿") or the length of the album title Music to listen to~dance to~blaze to~pray to~feed to~sleep to~talk to~grind to~trip to~breathe to~help to~hurt to~scroll to~roll to~love to~hate to~learn Too~plot to~play to~be to~feel to~breed to~sweat to~dream to~hide to~live to~die to~GO TO but something in this music is definitely breaking the app (or Discord limitations maybe). I don't think it's the author as all the other Bring Me The Horizon songs seem to work fine
Are you using Windows or macOS?
Using Windows 10, Build 19044
I figured out the issue, the state has to be <128 characters. I will fix this as soon as I can :)
pypresence.exceptions.ServerError: Child "activity" fails because child "state" fails because "state" length must be less than or equal to 128 characters long
To be honest that's an edge case XD Nice figuring it out tho !
Hi, absolutely love the work! Any updates on this bug?
@@ -67,10 +67,10 @@ def get_rp(info, statuses):
formatting_args = {
"status": "Playing" if info[0] == "PLAYING" else "Paused",
"state": info[0][:125] + "..." if len(info[0]) > 128 else info[0],
"song": info[1][:125] + "..." if len(info[1]) > 128 else info[1],
"artist": info[2][:125] + "..." if len(info[2]) > 128 else info[2],
"album": info[3][:125] + "..." if len(info[3]) > 128 else info[3],
}
# Format arguments
I wonder if this code would help solve your code, and you could push out a new release? I tried to make my own pull and compile it but it was missing a lot of the necessary libraries
@@ -67,10 +67,10 @@ def get_rp(info, statuses): formatting_args = { "status": "Playing" if info[0] == "PLAYING" else "Paused", "state": info[0][:125] + "..." if len(info[0]) > 128 else info[0], "song": info[1][:125] + "..." if len(info[1]) > 128 else info[1], "artist": info[2][:125] + "..." if len(info[2]) > 128 else info[2], "album": info[3][:125] + "..." if len(info[3]) > 128 else info[3], } # Format arguments
I wonder if this code would help solve your code, and you could push out a new release? I tried to make my own pull and compile it but it was missing a lot of the necessary libraries
hmm that probably would fix it!
Awesome, let me know if that works! Looking forward to the next release because this bug is single-handedly driving me the most crazy lol.