Closed sergei-mironov closed 5 years ago
I was actually planning to add an option to fetch lyrics using a user-provided script: that could obviously serve your purpose (at least the "load lyrics from the local file" part) with a simple one-liner. However, I'm not sure when I'm ready to release it; as of now, I can suggest the following workarounds:
~/.cache/deadbeef/lyrics
, you can edit these files or make them symlinks to your *.txt
lyrics files. Not very convenient, but at least it's something.Both of your suggestions are helpful. I didn't know about beets, thanks. For me, beets seems to be a too complex approach, but I'll investigate how could one use it as a tool. FYI, I also managed to setup shell commands to open corresponding txt in external viewer. It works in general, but there are a number of deadbeef bugs, like not exiting until the viewer is closed. Going to report them soon.
Yes, I think that script-based lyrics loading would be nice! Then my wish is to support a kind of optional 'edit' button for editing text in a script-dependent way.
I believe that at the end user wants to control how their data is stored, so imo we more like tools which take our storage preferences into account..
I've implemented the external fetchers support; it can be configured inside the plugin configuration, the script execution command can use the whole power of DeaDBeeF title formatting. However, no updates on editing yet.
Looks great, thanks!
For reference: my script loads lyrics from local collection. The plugin is configured as getlyrics.sh "%artist%" "%title%"
and ~/.local/bin/getlyrics.sh
looks like follows:
#!/bin/sh
echo "$0: $@" >&2
LYRICSDIR="$HOME/doc/Music/Chords/"
ARTIST="`echo "$1" | sed 's@^[Tt]he @@'`"
TITLE="$2"
F="$LYRICSDIR/$ARTIST - $TITLE.txt"
if test -f "$F" ; then
cat "$F"
fi
Oh, just discovered, that plugin doesn't re-run script for cached lyrics. It may or may not be a problem, depending of requirements. In my eyes it is more a disadvantage because it is not clear how to update the cache if it happens to exist (but I can clean the cache with my script).
Maybe I found a problem. Load scripts dont work when deadbeef was run not from a terminal. If run from a terminal, everything is fine. Probably some stdin/stdout problem, could you please check?
I couldn't reproduce your issue, but I've rewritten the script spawning routine, please check if it helped.
About the caching part: you can right-click your track → Remove Lyrics From Cache.
Well, OK. 2 news:
terminate called after throwing an instance of 'Gio::Error'
Fixed in ad0de52.
A freature request from me: is it possible to support fetching lyrics from local file? Say, from the file named like the song file, but with 'txt' extension.
I believe that sometimes people need to modify the lyrics, for example:
So I imagine following modifications: