Author Topic: LyricsReloaded (Latest)  (Read 65760 times)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9391
Ah yes, that's indeed a different song.
...
I'll have to remember that…
You're forgiven. :-)
But if it makes you feel any better, I've made the same mistake when testing.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Is there any way you can keep providers persistent?
If I untick, update, and save and then go back, I'd like the provider to still be in the same order they were before I unticked them.
Afraid not. Plugins do not have any control over that.
The behaviour is completely controlled by MusicBee.

I got 15 our of 15 incorrect lyrics returned from 'fuzzy' providers so I disabled them and tried again. This time I got no lyrics returned.
What -did- surprise me was that on the first run, I got lyrics for all the tracks.
There are times or days where I also randomly get this odd behaviour. I've never figured out exactly why it happens. One minute the search for a specific song on a specific provider would be failing and the next minute or MB session, a research of that same song from the same provider would yield results. I truly have no idea what would be going on there.

Just recently Letras de musicas has been dumping some crap into the beginning and end of the returned lyrics.  
Should be fixed now.
Get the latest yml from the add-on providers folder.
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Hi
Really love your plugin ♫
may I ask a  question ?
can't download and save synch lyrics because it's a musicbee limit or the plugin limit?
thanks
Thanks - not my plugin though, I'm just maintaining it.
LyricsReloaded was written by forum member quick wango around 8 years ago I believe.

Regarding synced lyrics, it's neither a MusicBee nor a plugin limitation.
There are just not a lot of websites offering synced lyrics that I know of.
Megalobiz is the only site from the optional providers listed on the second post of this thread that offers synced lyrics.
If you know of any others, you can shout them here and something can be done about getting them to work with this plugin.
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
I noticed songs not getting matched using Deezer (build-in) that are available at Deezer.
The cause seems to be that my track titles use curly apostrophes, while Deezer seems to expect straight ones.

I tried to edit the yml, but as soon as I only add:
Code
        - [regex, "’", "'"]
under 'title:'  the yml is not recognised/accepted by MB any more.
I have no clue why that is?
Had no luck either trying to replace those using regex, but it did work when using the normal replace:
Code
- [replace, "’", "'"]

New plugin version (v1.2.0.3)

- includes the change above that addresses the curly apostrophe in the Deezer provider.
- resets the log file again after 10 MB sessions (I had noticed this was no longer working as of v1.2.0.0)
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
Had no luck either trying to replace those using regex, but it did work when using the normal replace:
Code
- [replace, "’", "'"]
That's strange.
I had tried the exact same thing, and the yml then also refuses to load in MusicBee.
Are you aware of any particularities that can break a yml like this?

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Yeah, any invalid syntax (be it in the regular expression or an incorrect spelling to any of the keywords like "config" or "variables") to a yml file will cause the plugin not to register the provider to MusicBee. When trying it out now, does it also fail to recognize the provider when using the [replace] line instead of [regex]?
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
It fails with 1.2.0.2, but I'll try again with 1.2.0.3
I notice that the source.zip is not yet updated, could you post the code of the new Deezer yml so I can compare it to my edited yml?
Perhaps that will show if I am doing something wrong.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Will update the source code zip just now.

Code
name: Deezer
loader: search

variables:
    artist:
        type: artist
        filters:
        - lowercase
        - [replace, "’", "'"]

    title:
        type: title
        filters: artist
       
config:
    identity url: "https://www.deezer.com/search/{title}+{artist}/track"
    identity pattern: ['"SNG_ID":"(?<identity>\d+)","PRODUCT_TRACK_ID":"\d+","UPLOAD_ID":\d+,"SNG_TITLE":"{title}","ART_ID":"\d+","PROVIDER_ID":"\d+","ART_NAME":"{artist}"', 's']
    lyrics url: "https://www.deezer.com/en/track/"
    lyrics pattern: ['<div>Lyrics</div>(?<lyrics>.*?)</div>', 's']
   
post-filters:
- strip_html
- utf8_encode
- entity_decode
- trim
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
Thanks, shouldn't be the replace (also) be under title: ?

And do you know if the encoding is important?
(UTF-8 UTF-8-BOM etc.)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Code
    title:
        type: title
        filters: artist
The line filters: artist tells the plugin to apply the same filters used in the artist on the title.

Edit:

And do you know if the encoding is important?
(UTF-8 UTF-8-BOM etc.)
Tbh, no I do not.
While I've never tested the effects of removing the utf8_encode line, I also do not have any knowledge on encoding that would make me give a definitive answer as to whether its presence or absence would affect the retrieved lyrics. It was in the example.yml created by quick wango, so I always included it thinking that it must have some kind of importance in there.
Last Edit: November 04, 2022, 09:35:12 PM by Mayibongwe
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
Succes!

What seems to have been the case is that the blank line you see above title: here:

Code
variables:
    artist:
        type: artist
        filters:
        - lowercase
        - [regex, "’", "'"]

    title:
        type: title
        filters: artist

was not actually blank, but somehow contained 2 tabulations. (that are obviously invisible to the eyes)

I removed them, and now the yml is accepted.
And... [regex, "’", "'"] now works too!

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1098
  • Heal The World
Thanks for figuring that out.

I have in the past also struggled with getting a provider to load.
I'd end up giving up and sleeping it off with the belief that tech-related stuff usually fixes itself overnight.
On the next day, I'd start writing it from scratch and it would magically work (with the same content as before).
So it must always have been the blank line (that was in fact not blank) tripping things up.

I'll be sure to remember and recheck this if ever I'm in this situation again.
Looking at some of the other providers, they do have tab spaces in the "blank line", but they surprisingly work.
(probably because it's just the "lowercase" line above them)
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9391
Should be fixed now.
Get the latest yml from the add-on providers folder.
It is indeed. Thanks for taking care of the gobbledygook. Letras de musicas is now returning results without the garbage code.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
Thanks for figuring that out.
I now also figured out what caused it in the first place. (for me)

I am using notepad++, and what happened was that when you are at the end of a line that begins with an indent (e.g. 8 spaces), and you press [Enter], notepad++ 'copies' the indent from the line before. (but changing the spaces for tabs)
I can understand many coders may prefer that behaviour, but that functionality would break the yml if it was done to a blank line.

The tabs themselves weren't the problem.
Under Settings > Preferences I ticked 'Replace by space' so that the new indent wouldn't be (2) tabs but (8 ) spaces, but the yml would then still not work.
So the problem is the indentation itself.
To avoid notepad++ doing this, you can go to Settings > Preferences > Auto-Completion, and un-tick that.

edit:
If you prefer to have that feature active, you could also clean up these possibly problematic blank indented lines by performing:
Edit > Blank Operations > Trim Trailing Space
after you are done editing the yml.
Last Edit: November 05, 2022, 08:42:36 AM by hiccup

hiccup

  • Sr. Member
  • ****
  • Posts: 7936
For some Portuguese songs, Genius (both internal and fuzzy) will begin the lyrics with: Letra de "..." com ...
(lyrics of 'song' by 'artist')

This happens with e.g.:

Chico Buarque - A moça do sonho
Ivan Lins - Iluminados
Simone - Mal acostumado

I tried to create a filter for this in the yml myself, but failed miserably. (again ;-)

It's not a big issue, but it would still be nice if it could be dealt with?