Closed henrikbeck95 closed 3 years ago
Glad to hear that you liked this project.
I've tested VLC in various distribution packages (including snap and flatpak) and should be working fine.
Have you tried updating the application from pip?
pip install -U lyrics-in-terminal
If still not working then can you provide full output of following while vlc is playing
$ qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata
Thank you by the reply!
Between your last messange and this one I've formatted my laptop and I've also decided to test this software again in the newest operating system but it is not working with VLC too.
I'm using the lyrics-in-terminal 1.2.1 version. If it matters my current operating system is Ubuntu 20.04.1 and the shell is Bash. In the previous messenge I was using Pop_OS! 20.04 and the shell was ZSH.
In both sittuations I've used VLC as .deb distribution package and I've installed lyrics-in-terminal from pip3.
Following your suggest I've also tried these things:
VLC installed by Snap package it returns vlc is not running!
on Ubuntu.
VLC installed by Flatpak package it also returns vlc is not running!
on Ubuntu.
The command $ pip3 install -U lyrics-in-terminal
returns:
Requirement already up-to-date: lyrics-in-terminal in ./.local/lib/python3.8/site-packages (1.2.1) Requirement already satisfied, skipping upgrade: dbus-python in /usr/lib/python3/dist-packages (from lyrics-in-terminal) (1.2.16)
The following screenshot can show you better what is happening.
I think I understand what's happening here.
I use dbus to get Metadata of track playing in a mpris media player. If no Metadata is found is shows as player is not running. This functionality was made to stop searching for tracks without any proper Metadata or Advertisement tracks in case of spotify free account.
You are playing a video file in VLC which may not have Title and Artist info in its metadata. You can check for those fields in the output of following
$ qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata
You can edit such file's metadata through vlc from Tools -> Media information
First of all congratulations to the application development. It's simply awesome!
I've read the documentation and it says the supported applications so far are: Spotify (default), VLC, Rhythmbox and Audacious. It can search very well the lyrics I want when I'm using Spotify but when I try to run the vlc or cvlc (command line for VLC) it returns "vlc is not running!" or "cvlc is not running!".
The steps I've done are: $
cvlc /the/path/of/the/song/song.mp3
$lyrics cvlc
And when I run the command below it returns me the current song playing. $
qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "vlc:nowplaying:" | cut -c 16-
Reading the source code I've found this function which is basically what the command above does:
I've also found the variable player_name gets the arguments which should mean it would take any player. But the VLC and cvlc are not.
And also been testing the commands below: $
vlc /the/path/of/the/song/song.mp3
$lyrics vlc
And (these ones just to be sure even it was excepted not to be worked): $
lyrics org.mpris.MediaPlayer2.vlc
$lyrics org.mpris.MediaPlayer2.cvlc
$lyrics dbus
$lyrics mpris
$lyrics MediaPlayer2
I hope this project lives long and prosper.