Closed jernejmarcic closed 9 months ago
vlc and amberol should be fixed now.
Can you update following the update instructions in the README and try again?
kew is broken by itself, as it doesn't report track length.
Look at:
❯ playerctl --player kew542518 metadata
kew542518 xesam:title Symphony No. 5: I. Allegro con brio
kew542518 xesam:artist Ludwig van Beethoven
kew542518 xesam:album Beethoven, L. van: Symphonies Nos. 5 and 6, "Pastoral"
kew542518 xesam:contentCreated
kew542518 mpris:artUrl /tmp/kew/raffaele/coverokrsgf.jpg
kew542518 mpris:trackid '/org/kew/tracklist/track1'
And compare it with vlc:
➜ playerctl --player vlc metadata
vlc mpris:trackid '/org/videolan/vlc/playlist/3'
vlc xesam:url file:///home/USERNAME/Music/MUSICFILE.mp3
vlc xesam:title Symphony No. 5: I. Allegro con brio
vlc xesam:artist Ludwig van Beethoven
vlc xesam:album Beethoven, L. van: Symphonies Nos. 5 and 6, "Pastoral"
vlc vlc:time 419
vlc mpris:length 419474306
vlc xesam:genre Classical
vlc mpris:artUrl file:///home/USERNAME/.cache/vlc/art/artistalbum/FILE.jpg
vlc vlc:length 419474
vlc vlc:publisher 3
If we don't have track length we can't calculate the progress for the progress bar.
You should report a bug to kew linking this issue.
waybar-mediaplayer should no longer crash in case the downstream player doesn't report song's length back to us.
However the progress bar won't work (see note in README).
firefox is fixed too.
I apologize for including programs that wouldn't work in the first place, I will check the metadata from now on.
I set the player_name
to io.bassi.Amberol
, however I still get the same error as before (the scond one I included)
Traceback (most recent call last):
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 489, in <module>
main()
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 462, in main
init_player(manager, player)
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 373, in init_player
update_metadata(player, player.props.metadata, manager)
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 236, in update_metadata
updated = update_progressbar(manager, player)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 318, in update_progressbar
perc = (pos / (length / config["length_factor"])) * 100
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'str' and 'int'
Fixed again (it got fixed a first time, but than that fix got lost when we fixed for kew not reporting length).
Now Amberol should work. Try to update.
Amberol work, save for cover image as expected. I still get an error message however the track lenght and title work flawlessly.
Traceback (most recent call last):
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 44, in on_player_appeared
init_player(manager, player)
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 375, in init_player
update_metadata(player, player.props.metadata, manager)
File "/home/jernej/.config/waybar/waybar-mediaplayer/src/mediaplayer", line 254, in update_metadata
len(player.get_title()) + len(icons["stop"]) > config["widget_length"]
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Update again. (I don't understand how your song doesn't have a title BTW :))
Other than the cover art support and the porblem with kew
, everything works.
Testing with Firefox (with plasma-browser-integration
installed and set as player_title
) shows the title and progress bar.
Testing with Amberol, displays the title and progress bar without trouble.
I appose for the confusion, the screenshot I provided was how it appeared at the time. From further testing I concluded the mediaplayer looks like this: When there are no players found, which leads me to believe I did something wrong at the time.
I did report the bug to kew: https://github.com/ravachol/kew/issues/112
We have to wait they fix it on their side. They are not reporting the song's length back to us, so we cannot compute the progress to display on the progress bar.
For the cover art, let's continue in the other thread!
I apologize if this report is of poor quaoity I am still very new to this.
Same as before, I am using Endevour OS, running Hyprland. I am running the script as instructed in the README, I changed nothing and to my knowledge followed the instructions precisely.
I have downloaded music saved in the .flac format. I know that it has all the necessary metadata (such as cover art). However the script does function properly.
I have decided to test several different music players, and since they all produced the same error I have decided to group them together. So far I have tested
amberol
,kew
.There is only minor variation,
kew
did not get the second error received inamberol
Testing using
amberol
Firstly I used the
playerctl --list-all
to get theamberol
player_name
and set it then I re-ran waybar. Upon launching it mediaplayer looked as such: (reusing the same image since it looks the same)After waybar was up and running I launched
amberol
immediately after I got the following error:While playing song I receive this error every second or so at regular intervals:
Setting a different
player_name
and then playing music withamberol
does not fix the issue unlike withvlc
.Testing using
kew
I follow the same procedure with kew, copy and pasting the output of
playerctl --list-all
toplayer_name
and restarting waybar.I get the following error, the same as the error running
amberol
:However the mediaplayers appearance is different appearing as such: (reusing the same image since it looks the same)