Webget Synced Lyrics from lrclib stopped working

Hey all!

I was using webget with the following formulas to pull lyrics from lrclib.

Gv(url) = https://lrclib.net/api/get?artist_name=$mi(artist)$&track_name=$mi(title)$

$wg(gv(url), json, .syncedLyrics)$

It was working beautifully, but then all of a sudden yesterday it was not.

My app did update to the latest version recently and I did update all permissions

Any ideas on what might be going on?

Thanks for the help!

It’s probably an issue with the latest version. Try installing an earlier one.

I actually downloaded the app from April 3.82b610016 and still the same

Hi @Mfreund21 ,

AFAIK, retrieving data through $wg(…)$ need some time, even just a split second. And we have to wait for the response to be available, before processing it. That’s why we need a Flow to do those sequential tasks. It is the best practice.

Here’s my tutorial video on how to get the song info from LrcLib.net , it is applicable to KLWP, KWGT, and KLCK.

I include a link to the tutorial video as well as a KLWP preset as an example.

I hope this would help.

:smiling_face::+1:

Thank you for sending. I followed the steps and it’s still not working for me unfortunately. I also get a 404 error when trying to view your preset

Try to download the preset rather than opening it from Google Drive.

@Mfreund21 :

Would you like me to help you investigating your KWGT preset and troubleshooting it?

If so, you could message me to share this KWGT preset.

I hope this would help.

:smiling_face::+1:

Screenshots for Step-by-step Guide

01. Global variables

  • lyrics: used as the container for the API response
  • toggle: used for running the Flow

02. Flow trigger: Formula

  • Formula: $gv(toggle)$
  • Trigger mode: When not 0 or empty

03. Flow action #1: Web Get

  • URL: $"https://lrclub.net/api/get?artist_name="+mi(artist)+"&track_name="+mi(title)$
  • Headers: X-User-Agent
  • Method: GET

04. Flow action #2: Set Global Var

  • Global: lyrics
  • Store mode: As text

05. Script for the Text element

  • Get the syncedLyrics value from the JSON data of the API response: $tc(json, gv(lyrics), ".syncedLyrics")$

I hope this would help.

:smiling_face::+1:

Ok I’m getting closer. The lyrics are now pulling into the lyric global variable, but when I add the text element I get this error

Hi @Mfreund21 ,

That’s okay, it happens when the lyrics variable has not been filled with the data yet. You can see the same error message in my tutorial video. But once the variable has its value, that error would be gone.

TIPS

To avoid such error, set an initial value for the lyrics variable: enter a single space character (for example).

I hope this would help.

:smiling_face::+1:

Got it to work. Thank you!

So I used the trigger as when the song changes. Is there a way to add a conditional in the flow to clear the lyrics global if lyrics are not found?

Currently if it does not find the lyrics the previous songs lyrics remain

Hi @Mfreund21 ,

Would you mind sharing the preset with me? I could help you adjusting it to your need.

I hope this would help.

:smiling_face::+1:

Matt_media_player_Texture.kwgt (675.2 KB)

Hi @Mfreund21 ,

Thank you for sharing the preset.

I have explored the preset and it seems like you created it with a nested Komponents. IMO this might be the cause of the issue, but I’ll look into it further to find anything solution to the issue you have with the lyrics retrieval.

:folded_hands::smiling_face:

Thank you! Yea I used komponents to make them easier to use between kwgt and klwp. I can remake it without them if that makes things work easier

This was working great and now just stopped working. I did a test run of the flow and am getting this error now.

Hi @Mfreund21 ,

It looks like the API reject the request and response.

Try to enable both of these:

  • ignore SSL Errors
  • Ignore HTTP Errors

And try to change the header, to either of these:

  • User-Agent
  • Lrclib-Client

I hope this would help.

:smiling_face::+1:

Hi @Mfreund21 ,

I have tried to add the lyrics into your KWGT preset but it seems that it cannot be done in a nested Komponents.

However, I just created a KWGT preset, it’s a simple Media Player. Hopefully it matches to your need and you could use it as you like.

Here’s my KWGT preset for Simple Media Player:

I hope this would help.

:smiling_face::+1: