ungive / discord-music-presence

The Discord music status that works with any media player
https://musicpresence.app
Other
229 stars 2 forks source link

[Bug] Deezer does not show album title when hovering the cover #49

Closed hans-juergen closed 1 month ago

hans-juergen commented 1 month ago

Is there an existing issue for this?

Describe the bug

There is no popup info for the shown album when I hover or click on the cover in my Discord profile, only for the track and artist. Not sure if this is specific to the Deezer desktop app or maybe with all other media players as well.

Reproduction Steps

  1. Go to your Discord profile.
  2. Hover or click on the shown album artwork.
  3. See the error

Expected behavior

A popup with the album title when hovering or clicking on the artwork.

Screenshots

image

Additional context

Also the duration of the track is not shown as a progress bar like in the example screenshot, but only the played time, not the total time as well.

Is it correct that the app will neither work with the Discord browser interface nor the Deezer web player, but only with their desktop apps?

ungive commented 1 month ago

(I assume you're on Windows) That is because Deezer does not report any album title:

AppUserModelId: Deezer.exe
Title: A Bar Song (Tipsy)
Subtitle: <empty>
Artist: Shaboozey
AlbumTitle: <empty>
AlbumArtist: <empty>
PlaybackStatus: Playing
Position (live): 13372799808468ms
Position (fixed): 0ms
LastUpdatedTime: -11644473600000ms
EndTime - StartTime (duration): 0ms
MinSeekTime: 0ms
MaxSeekTime: 0ms
MaxSeekTime - MinSeekTime (duration): 0ms
PlaybackType: Music
TrackNumber: 0
AlbumTrackCount: 0
Genres:

You can verify this yourself using this little program (which generated the above output): https://github.com/ungive/media-session-dump/releases. It gets its information from the same source as Music Presence.

You should report this issue to Deezer. Deezer basically reports nothing useful to Windows (using "SystemMediaTransportControls"/"SMTC" via WinRT APIs) except the song title, artist and whether it's playing or not. The rest of the values are basically not set.

What I could do is use the Deezer API to guess the album name. That is what I do with TIDAL, which also doesn't report the album name on Windows. This wouldn't show the correct album in some cases though. Is that something you'd welcome as an addition?

hans-juergen commented 1 month ago

Thanks for the quick reply. Yes, I'm on Windows 10 Pro currently using the Deezer desktop app and would like to be able to see the album title either when hovering or clicking on it. Even better would be a direct link to the album page in Deezer, but that may be impossible or too much work. 😉

Usually I don't use the Deezer desktop app, as it does not provide gapless playback like their web player, but as far as I have understood the FAQs, web players of streaming services are not supportable by your app?

ungive commented 1 month ago

Thanks for the quick reply. Yes, I'm on Windows 10 Pro currently using the Deezer desktop app and would like to be able to see the album title either when hovering or clicking on it. Even better would be a direct link to the album page in Deezer, but that may be impossible or too much work. 😉

If it isn't too much work I'll add it with the next update, otherwise the update after that!

Usually I don't use the Deezer desktop app, as it does not provide gapless playback like their web player, but as far as I have understood the FAQs, web players of streaming services are not supportable by your app?

Technically Music Presence detects media from your browser as well and it would be possible to show it in your status. The problem is that there's no way to differentiate which website that media is coming from, so I can't reliably determine if it's e.g. music from Deezer that you wanna show in your status or e.g. a learning video from the university you're studying at which you definitely don't want to share in your status.

I have started working on a browser extension a few months ago which I'll pick up on at some point again when I find the time and it becomes a higher priority than other features I am working on. More info in issue #5.

hans-juergen commented 1 month ago

By the way, the shown album artwork always seems to be correct, I wonder from where your app gets them from if not available in the Deezer desktop app, maybe from the play queue view in the desktop app? If you click on the track title under the album artwork, Deezer will open the correct album page in the app: image

image

ungive commented 1 month ago

I forgot to mention Deezer also reports the album image, which is what is displayed in your status.

I've implemented the Deezer API yesterday to get the album title and song duration:

image

I'll also filter out ads, seems like they are always formatted this way:

image

ungive commented 1 month ago

Fixed in version 2.2.4

hans-juergen commented 1 month ago

Thank you for improving the Deezer handling in your app! I can see the album title all the time and when hovering the album artwork or title. Sometimes it is replaced by a question mark, not sure what the reason is. OK, just saw your new thread about that issue, switching the option for showing cover images off and on again seems to fix it: image

I cannot go directly to the song or album page in Deezer though, as there is no link to it, so other Deezer users on Discord could not listen to it as well.

Concerning blocking ads I have a Family account, so I don't see them anyhow, but a nice feature for free users, I guess. I don't listen to podcasts either, so cannot comment on your improvements there.

By the way, I posted about the new version in an internal Deezer Discord server and the Deezer subreddit yesterday, and the admin asked if there is a mobile version of Music Presence, as he mostly uses his phone for music listening like many people do nowadays. But I haven't seen plans for mobile support here yet, right?

ungive commented 1 month ago

Yes, the question mark is most likely caused by #52

There's a Discord bug that has been there for months where you can't see buttons in your status when you're looking at your own profile on your account. Ask a friend or use a second account to check if you can see the buttons, or maybe check on your phone. There should be a "Listen to this song" button whenever you see the progress bar.

There is no mobile version yet, but maybe in the future. This is difficult though because on mobile you can't use Discord RPC or the Discord Game SDK because of technical limitations on that platform. You'd have to either use the Discord API which is against Discord ToS last time I checked (called self-botting) or you'd have to connect a Music Presence mobile app to the desktop version, then send the song info from your phone to the Desktop and show that in your status. That's pretty impractical though.

The better solution would be to partner with Discord at some point, but that's probably out of reach for now. Something like Spotify x Discord, but instead Music Presence x Discord, if that makes sense. That could allow Music Presence to show a Discord status even when Discord is not running on the same device as Music Presence. Would be awesome. But I bet there might be legal caveats, the music industry is complicated.

Right now there are no plans for a mobile app because of this complication, no.

hans-juergen commented 1 month ago

Thanks again for your replies. Did not know about that Discord bug that will not show buttons and links on your own profile, I will ask someone on my main servers. By the way, do you know the inofficial Last.fm server? They have a #help-api-tools channel where Music Presence is discussed as well: https://discord.gg/zJpPfV3h

ungive commented 1 month ago

By the way, do you know the inofficial Last.fm server?

I'll be sure to check it out!

You and your friends are welcome to join our Discord too btw! https://discord.com/invite/7rc8dWD4ug

My goal is to reach 1000 members to be able to add Music Presence to Discord's server discovery, which will be a big step towards getting the word out for Music Presence.

hans-juergen commented 1 month ago

Just commented on your new message there and also joined your Discord server.

And as I just switched from Spotify to Deezer listening, I had another related idea to maybe embed the available infos in the Deezer play queue view in your app if possible, i.e. 1. the audio quality of the stream (HiFi for lossless FLAC, HQ for MP3 @ 320kbps or nothing for MP3 @ 128kbps) shown in the lower left corner of the album artwork and 2. which Mix is playing like e.g. Flow shown under the album artwork and on top of the queue:

image Maybe you can make a screenshot of my current Deezer listening how my Discord profile looks to other users? Or scratch that, just found another Deezer user on your server:

image

ungive commented 1 month ago

I'm afraid there is no way to get that information, as far as I am aware

If you find a way let me know!

hans-juergen commented 1 month ago

Thank you for checking. The currently used audio quality is only shown as a grey sticker in the lower left corner of the album artwork in the play queue, nowhere else in the Deezer desktop app. So I thought this info would be available somewhere in their API. I guess you use a free account which only delivers standard audio quality (SQ=128kbps MP3) which is not shown on the album artwork (only HiFi or HQ), so that might be the reason why you cannot find it in the API either.

And the name of the Flow mix is always "Flow", it doesn't change, so mentioning it in your app would be a bonus, as Deezer users would know then that I am playing this special Deezer mix. Another grey sticker available in the play queue and playbar at the bottom is "Mix" which is displayed e.g. when you start a found song from search which automatically generates a Track Mix then. Here is a screenshot of the playbar currently showing the grey "Flow" sticker as well:

image

ungive commented 1 month ago

When I checked the flow endpoint it only reported songs that finished playing, not the current ones. So there's no way of telling if the current song is playing from a Flow or not. One could guess, by checking if the last song in the flow is not more than e.g. 10 minutes ago, but that would be a hack imo.

I guess you use a free account which only delivers standard audio quality (SQ=128kbps MP3) which is not shown on the album artwork (only HiFi or HQ), so that might be the reason why you cannot find it in the API either.

The flow endpoint's results are not documented anywhere, so you might be right, but I have no way of testing it because I'm on a free plan. It's probably a long shot anyway though, the info the API reports is pretty basic from what I've seen so far.

Another grey sticker available in the play queue and playbar at the bottom is "Mix" which is displayed e.g. when you start a found song from search which automatically generates a Track Mix then.

I don't know of a way to detect that either, sorry.