Skip to content
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

covers (mpris) #310

Closed
Manix80 opened this issue Aug 30, 2023 · 13 comments
Closed

covers (mpris) #310

Manix80 opened this issue Aug 30, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@Manix80
Copy link

Manix80 commented Aug 30, 2023

as described in the title, I don't have the album covers in the mpris module, but they do appear in the notifications.
nothing similar found on the net or there: #157

I use this configuration: #183 @JannisPetschenka

Hyprland with arch and player ncspot. do I need a complement like uberzug++ or something else?
thank you for your work!

@Manix80 Manix80 added the bug Something isn't working label Aug 30, 2023
@ErikReider
Copy link
Owner

It's the applications responsibility to provide a cover art so this isn't a swaync issue. Spotify and Firefox works for me :)

@ErikReider ErikReider closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
@sharak
Copy link

sharak commented Nov 22, 2023

Hi!

I am having the same problem using Spotify. If I use playerctl to look at the player metadata I get this:
image

Running G_MESSAGES_DEBUG=all swaync I get the following log:
image

It's as if it's trying to download the cover but can't for some reason.

@ErikReider
Copy link
Owner

Hi!

I am having the same problem using Spotify. If I use playerctl to look at the player metadata I get this: image

Running G_MESSAGES_DEBUG=all swaync I get the following log: image

It's as if it's trying to download the cover but can't for some reason.

Could you copy&paste the url here?

@ErikReider ErikReider reopened this Nov 22, 2023
@sharak
Copy link

sharak commented Nov 22, 2023

Sure:
https://i.scdn.co/image/ab67616d0000b273968059c0bdab66e2b558e582

However, this happens with any URL.

@ErikReider
Copy link
Owner

Seems like I'm able to download that when manually changing the url variable...

@ErikReider
Copy link
Owner

Could you try using this patch, run it and send me the new error message?

diff --git a/src/controlCenter/widgets/mpris/mpris_player.vala b/src/controlCenter/widgets/mpris/mpris_player.vala
index cec2322..bc5df65 100644
--- a/src/controlCenter/widgets/mpris/mpris_player.vala
+++ b/src/controlCenter/widgets/mpris/mpris_player.vala
@@ -258,8 +258,8 @@ namespace SwayNotificationCenter.Widgets.Mpris {
                     pixbuf = yield new Gdk.Pixbuf.from_stream_async (
                         stream, album_art_cancellable);
                 } catch (Error e) {
-                    debug ("Could not download album art for %s. Using fallback...",
-                           source.media_player.identity);
+                    debug ("Could not download album art for %s. Using fallback...\n\tURL: %s\n\tError: %s",
+                           source.media_player.identity, url, e.message);
                 }
                 if (pixbuf != null) {
                     pixbuf = Functions.scale_round_pixbuf (pixbuf,

@Manix80
Copy link
Author

Manix80 commented Nov 22, 2023

as far as i'm concerned, it's working properly now. i didn't do any manipulations. just the system updates.
EDIT: i don't know if it's due to this but i modified the systemd unit :
WantedBy=default.target
starting hyprland from a tty,
and in the hyprland config :
exec-once = sleep 1 && notify-send "Coucou NICO !!!"

@sharak
Copy link

sharak commented Nov 22, 2023

Could you try using this patch, run it and send me the new error message?

diff --git a/src/controlCenter/widgets/mpris/mpris_player.vala b/src/controlCenter/widgets/mpris/mpris_player.vala
index cec2322..bc5df65 100644
--- a/src/controlCenter/widgets/mpris/mpris_player.vala
+++ b/src/controlCenter/widgets/mpris/mpris_player.vala
@@ -258,8 +258,8 @@ namespace SwayNotificationCenter.Widgets.Mpris {
                     pixbuf = yield new Gdk.Pixbuf.from_stream_async (
                         stream, album_art_cancellable);
                 } catch (Error e) {
-                    debug ("Could not download album art for %s. Using fallback...",
-                           source.media_player.identity);
+                    debug ("Could not download album art for %s. Using fallback...\n\tURL: %s\n\tError: %s",
+                           source.media_player.identity, url, e.message);
                 }
                 if (pixbuf != null) {
                     pixbuf = Functions.scale_round_pixbuf (pixbuf,

Error: Operation not supported (in my main language on the screenshot)
image

@ErikReider
Copy link
Owner

Do you have gvfs installed?

@sharak
Copy link

sharak commented Dec 15, 2023

No

@ErikReider
Copy link
Owner

No

Can you try with it installed?

@sharak
Copy link

sharak commented Dec 15, 2023

Yes, it's works.

Today I received an update from AUR and it included the gvfs dependency.

Thank you!

@carettt
Copy link

carettt commented Jun 12, 2024

Hi, I am having this same issue with gvfs installed. playerctl metadata shows an artUrl that does work, but I am still getting the following error:

** (swaync:33956): DEBUG: 18:41:58.093: mpris_player.vala:335: Could not download album art for ncspot. Using fallback...

The artUrl is: https://i.scdn.co/image/ab67616d0000b2733ebc5b9d8942069d3b920550 if that helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants