Closed mogorman closed 3 years ago
I don't understand what you are trying to do.
my goal was to be able to search any lyrics. but the versuri library seems to only work if i already have the lyrics in my local db
That is a reasonable goal and one that I was also thinking about, though I don't get that from the code you've linked above.
Yes, versuri
only searches in your local db.
vuiet
searches in your local db for the vuiet-play-track-by-lyrics
command and searches online for the vuiet-playing-track-lyrics
command, which also saves the lyrics in your db and displays them in a lyrics buffer.
my code is just using advice to inject a call to go save the lyrics before your 'vuiet--scrobble-track is called. I think it would be better to have this as an option or expose some hooks in the library so that people wouldnt need to hack it up like i did.
vuiet--scrobble-track
just notifies last.fm the fact that you've listened to this particular track.
It has nothing to do with lyrics.
The versuri-save
saves the lyrics to the db, but you've said "I don't want to build a lyrics db".
i know that the code i posted is doing this.
so advice-add function is a way of saying wrap function X with my fuction. in this case its saying inject function my_scrobble before your vuiet--scrobble-track is called and then call your vuiet--scrobble-track function.
my_scrobble takes that same track information thats about to be fed into the scrobbler and calls versuri-save for me.
when i said "I don't want to build a lyrics db", I meant I don't want to manually call versuri-save on all the songs I like.
what i have implemented will take care of that for me over time with no work from me.
So you want the option to add the lyrics of all the tracks you're listening to automatically to the db?
If so, then yes, I think your code does that. And yes, I think that would be a nice feature to have. And yes, I do think you're mixing up scrobbling and lyrics, which have nothing to do with each other.
You might run into troubles if you listen randomly for tracks and you get a lot of tracks that you don't like and don't want to ever listen to again. They will end up in your lyrics db nonetheless.
My best bet at the moment would be something in the vuiet--play
, with interactive functions vuiet-enable-automatic-lyrics
and vuiet-disable-automatic-lyrics
(or some nicer names) so that you can enable/disable this functionality while listening.
If you want to look into that and create a PR, I would definitely consider it for merging.
Sounds good, thanks for feedback. also love vuiet. so much nicer than having a tab open doing this for me.
Implemented.
awesome. thank you
I don't want to build a lyrics db because I am so lazy. Instead I think it would be cool to have it capture the lyrics as I play them.
is how im doing it now. but would be cool if mode provided hooks, or if it had option to do this.
I had to wrap unidecode because lastfm kept throwing errors on some bands, and thought this was easy work around.