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

sveakul

  • Hero Member
  • *****
  • Posts: 3275
Mayibongwe:  is hope dwindling for that cleaned-up version of mb_LyricsReloaded?

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Mayibongwe:  is hope dwindling for that cleaned-up version of mb_LyricsReloaded?
I gently support this question.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
I will squeeze this in tomorrow evening or the morning after.
My day job's been busy of late (little to no time during the week).
Moved houses too, so past few weekends have been reserved for projects on the property.
This will keep on for a lil while longer, but it's a fleeting phase.
Strength and Honour (2025)

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
My day job's been busy of late (little to no time during the week).
Moved houses too, so past few weekends have been reserved for projects on the property.
This will keep on for a lil while longer, but it's a fleeting phase.
In that case, I withdraw my request for sooner rather than later. We all know what happens when life rears its ugly head. As far as I'm concerned, so long as the update is still on your radar, take your time. Get your house squared away. And tell your supervisor to lighten up. :-)
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

hiccup

  • Hero Member
  • *****
  • Posts: 9122
Get your house squared away.
Yeah, just take a break from the forum for a couple of months until you can breathe again?

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
'Months' off would do damage. If I stayed away that long, I'd come back not remembering how to work the simplest of regex challenges (and that'd be a nightmare).
Should be a couple more weeks, then I'll be back at full capacity.
But the changes discussed a few replies above should be done as early as tomorrow night.
Strength and Honour (2025)

GermanKiwi

  • Jr. Member
  • **
  • Posts: 21
Hi Mayibongwe, I just installed LR 1.2.3 from your Google Drive (clean install - I haven't had LR installed on this computer before).

I installed it via Preferences > Plugins, and it correctly created this folder for me:
C:\Users\MyUsername\AppData\Roaming\MusicBee\mb_LyricsReloaded

The I copied the additional provider files to the \providers subfolder.

When I restarted MusicBee and went to Preferences > Tags (2), it shows all of the additional lyric providers there, from A-Z Lyrics Universe to Song Lyrics, except SongTexte, which ironically is the one I want to use. I have no idea why though.

Songtexte.yml is definitely inside the \providers subfolder, but it's simply not there in the Lyrics Providers dialog.

Any idea why? Can you check that it's still showing up on your own Lyrics Providers dialog, using the latest Songtexte.yml file?

sveakul

  • Hero Member
  • *****
  • Posts: 3275
GermanKiwi:  I checked the LR log file and Songtexte.yml is not loading, which is why it does not appear in the Providers selection list.  This message appears in the log:

Code
17/08/2024 01:36:17 [DEBUG] Loading config from file: C:\MusicBee\AppData\mb_LyricsReloaded\providers\Songtexte.yml
17/08/2024 01:36:17 [ERROR] Failed to load a configuration:
17/08/2024 01:36:17 [ERROR] (Lin: 8, Col: 0, Chr: 121) - (Lin: 8, Col: 0, Chr: 121): While scanning a simple key, could not find expected ':'.
17/08/2024 01:36:17 [ERROR] YamlDotNet.Core.SyntaxErrorException: (Lin: 8, Col: 0, Chr: 121) - (Lin: 8, Col: 0, Chr: 121): While scanning a simple key, could not find expected ':'.

I took a look at the file in Notepad++, and unlike the other yml files it's full of "NBSP" symbols which I believe refer to"normal blank space".  None of the others show this.  I tried removing the NBSP but I'm no Notepad++ expert and it still doesn't load.  FWIW, it didn't seem like any ':' symbols were missing.

I'm sure Mayibongwe can fix this quick--or a Notepad++ guru out there.  BTW, that was an excellent find, I never noticed this until now.

hiccup

  • Hero Member
  • *****
  • Posts: 9122
I took a look at the file in Notepad++, and unlike the other yml files it's full of "NBSP" symbols which I believe refer to"normal blank space".  None of the others show this.
Good work Sherlock!
I think removing those indeed fixed the issue.

@GermanKiwi, open the existing yml and replace its content with this:

Code
name: Songtexte
loader: search

variables:
    artist:
        type: artist
        filters:
        - lowercase
        - [regex, '\s', "-"]

    title:
        type: title
        filters: artist
        
config:
    identity url: "https://www.songtexte.com/search?q={title}+{artist}&c=all"
    identity pattern: ['(?<identity>songtext/{artist}/{title}-.*?\.html)', 's']
    lyrics url: "https://www.songtexte.com/"
    lyrics pattern: ['<div id="lyrics">(?<lyrics>.*)<p id="artistCopyright', 's']
    
post-filters:
- [regex, '<br />[\s\S]<div id=[\s\S]*?</script>[\s\S]<br />', '']
- strip_html
- utf8_encode
- entity_decode
- [regex, '\n\n\n+(?!\w)', '']


edit:
@sveakul, it's pretty simple with notepad++
Just select one instance of such a NBSP, open find > replace, and type a regular space in the 'replace with' field.

Last Edit: August 17, 2024, 07:27:56 PM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3275
Thanks hiccup!!  How did you remove the symbols?  I tried backspacing over them and then hitting "tab", which removed them visually but obviously messed something else up.

Edit:  just saw your edit, gotcha!

hiccup

  • Hero Member
  • *****
  • Posts: 9122
Thanks hiccup!!  How did you remove the symbols?
I explained it just seconds ago by an edit in my previous post ;-)

boroda

  • Hero Member
  • *****
  • Posts: 5224
I took a look at the file in Notepad++, and unlike the other yml files it's full of "NBSP" symbols which I believe refer to"normal blank space".

actually not. NBSP stands for "non-breaking space", i.e. text lines can't be wrapped at them.

hiccup

  • Hero Member
  • *****
  • Posts: 9122
NBSP stands for "non-breaking space", i.e. text lines can't be wrapped at them.
Yeah, it is useful when you don't want a combined word that contains a space to be broken up into a next line.
I've been using it for my genre hierarchy scripts and virtual tags, since I don't want to get a genre such as 'Rock and roll' ending up as
Rock
and roll

Using non breaking spaces instead of regular spaces will prevent that.
Not sure how these ended up in the Songtexte.yml though. Doesn't make much sense.
The plugin probably could be made to consider all different sorts of spaces (there are many) the same, but making that effort just to accommodate for some exceptional abnormalities is probably not worth it.
Last Edit: August 17, 2024, 08:50:08 PM by hiccup

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
- the addition of a Letras source that searched English lyrics instead of Brazilian,
- and perhaps a Bing general searcher as suggested by phred.  Thanks.
On v1.2.4 now up for download, these 2 requests have been introduced.
Thanks for the fantastic suggestions guys. Bing appears to be a direct substitute of Google (which wants to play hide-and-seek with the lyrics in html format).

Edit 1: Will be updating Songtexte with hiccup's fix above. Thanks y'all.

Edit 2: Deezer and Musixmatch are still not coming to the party - nothing to worry about.
            The excellent suggestion of Bing has ensured that we still have results from both LyricsFind (where Deezer gets its lyric data) and Musixmatch.
Last Edit: August 17, 2024, 10:21:50 PM by Mayibongwe
Strength and Honour (2025)

sveakul

  • Hero Member
  • *****
  • Posts: 3275
On v1.2.4 now up for download, these 2 requests have been introduced.
Thanks for the fantastic suggestions guys. Bing appears to be a direct substitute of Google (which wants to play hide-and-seek with the lyrics in html format).

Edit 1: Will be updating Songtexte with hiccup's fix above. Thanks y'all.
Thanks for 1.24 Mayibongwe, it's been operating FAST and smooth.  Already have seen results from Bing and Songtexte--and Letras, although due to a poor design on their end it OFTEN will return bogus results (does so from Foobar's ESLyric plugin also, not to worry).

One minor thing I had to bring up though.  Normal behavior was that when manually cycling through all site hits, when you reached the start-over point, the "Retrieving lyrics.." message will quickly be replaced by "No Lyrics Found."  With 1.24, when the cycled list end is reached, "Retrieving lyrics.." will continue to hang in the window, with the Windows "working" circle still active--although if you right-click the panel the message "No Lyrics Found" appears at the top of the menu.:



This type of thing happened in 1.22 when the bad scripts for Musixmatch and Deezer were still built-in to the DLL.  However, this time there is no crashing behavior or increase in memory consumption/processor usage.  Therefore, no biggie, just FYI.
Last Edit: August 18, 2024, 09:31:43 AM by sveakul