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

FR: use a custom fetch lyrics bash script #82

Open
eadmaster opened this issue Dec 17, 2020 · 5 comments
Open

FR: use a custom fetch lyrics bash script #82

eadmaster opened this issue Dec 17, 2020 · 5 comments
Labels
feature Missing feature request

Comments

@eadmaster
Copy link

eadmaster commented Dec 17, 2020

I'd like to use a custom bash script to fetch/select the lyrics file to load for each song.
For each invocation the script will receive the current song metadata as args and return an absolute lrc filepath on stdout.

This way i could easily add neat things like fuzzy file matching, searching in compressed archives, transliteration filters, etc.

EDIT: FR reworked as a more reusable one.

@PedroHLC PedroHLC added the feature Missing feature request label Dec 17, 2020
@eadmaster eadmaster changed the title FR: search lyrics in local compressed archives FR: use a custom fetch lyrics script Dec 21, 2020
@eadmaster eadmaster changed the title FR: use a custom fetch lyrics script FR: use a custom fetch lyrics bash script Dec 21, 2020
@eadmaster
Copy link
Author

After checking the code a bit, this seems doable implementing a custom lyricsource in python.

I've found the osdlyrics-create-lyricsource command and the /usr/local/lib/osdlyrics/lyricsources/ path for the current sources, but i still need some extra guidance.

Can you link me some docs on how to do it?

@PedroHLC
Copy link
Member

This is how I've added ViewLyrics back in 2013:
f39d3b6

@eadmaster
Copy link
Author

eadmaster commented Dec 21, 2020

ok, i was able to add my custom source by adding a service file in $HOME/.local/share/dbus-1/services/.

For easier debugging is there a way to log messages on stdout from the python script?

@PedroHLC
Copy link
Member

You can run the daemon with python /usr/lib/osdlyrics/daemon/main.py, but I'm not sure if that affects lyrics-sources as those are triggered through dbus...
(Sorry it's been ages since I last coded for this codebase)

@eadmaster
Copy link
Author

You can run the daemon with python /usr/lib/osdlyrics/daemon/main.py, but I'm not sure if that affects lyrics-sources as those are triggered through dbus...
(Sorry it's been ages since I last coded for this codebase)

ok i can start the daemon manually this way, but i do not see any line of logging coming from the lyrics source plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Missing feature request
Projects
None yet
Development

No branches or pull requests

2 participants