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

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
I couldn't recreate the issue.
@phred, neither could I unfortunately. The selection in that dropdown didn't change when I installed the upnp plugin.


Thanks for looking at the Genius config, Lucid, Naireem and sveakul. I'll sort that out.
This is done for the 'normal' Genius. However, not for the equivalent fuzzy version. For some reason, the google search isn't playing along.
Possibly related to what catalonia reported two posts above. I will have to take a look at that again later - it's nothing obvious at the moment.
For this reason, I have also temporarily removed Bing from the built-in providers as a Bing search is also returning coded content it didn't use to.
Strength and Honour (2025)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
could someone help me to remove the letters from the page https://lyrics.lyricfind.com/ thanks for everything!
I will have to take a closer look tomorrow.
I'm getting nothing at the moment - I think I'm a little out of practice with these yml's because nothing's working at first try at the moment.
This pattern below is supposed to be returning everything on a page like this, but it's saying it found nothing.

Code
name: Lyric Find
loader: static

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

headers:
    user-agent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0' # Firefox 30 Win x64 user agent

config:
    url: "https://lyrics.lyricfind.com/lyrics/{artist}-{title}"
    pattern: ['(?<lyrics>[\s\S]*?)', 's']

post-filters:
Strength and Honour (2025)

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10263
I couldn't recreate the issue.
@phred, neither could I unfortunately. The selection in that dropdown didn't change when I installed the upnp plugin.
Thanks for looking at it.
I've reinstalled the DLNA plugin and a few random plugins and have not been able to reproduce the issue either. Consider the non-issue resolved and I'll blame it on too many late night adult beverages.
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

sveakul

  • Hero Member
  • *****
  • Posts: 3260
For those struggling with these 3rd-tier sites like LyricFind and the gamut of html scrapers that face site changes at the provider's whim.  I think most users have not heard of, don't "understand," or don't setup correctly the slonopot API plugin sources Beenius, Museexmatch, and LRCLIBee.  They are NOT additional ymls, or even components of the separate LyricsReloaded plugin, but plugins that ride on the same code/interface that Steven built in to MB to allow lyrics searching in general.  You can completely uninstall Lyricsreloaded, and still have full access to the slonopots.  Likewise, even the latter can be removed and you will still get a few lonesome lyrics hits from the 2-3 sources Steven himself built-in unseen to MusicBee.exe.

Of the lyric hits I get (some of course just are not available) from radio streams, 95% are from the following 6 plugin sources:

Beenius, Museexmatch, LRCLIBee--from slonopot, all API-based not scrapers, all have their own forum threads here;

Mayibongwe's MB Lyrics_Reloaded's separate yml file souces for Metal Archives. Song Lyrics, and Bandcamp yml files from its "providers" subfolder.

Move those 6 first on your search list and you'll see what I mean.

FYI, people looking for "synced" lyrics are never going to be happy, because most sites simply do not provide them.  However see this post:  https://getmusicbee.com/forum/index.php?topic=42098.0

catalonia

  • Jr. Member
  • **
  • Posts: 64
I have tried the LyricFind one and it doesn't work either, also the Genius and Google ones have stopped working.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Man the fixed Genius yml's from Naireem were posted by me over a week ago and work FINE:  https://getmusicbee.com/forum/index.php?topic=36952.msg232204#msg232204.

If you don't know how to use them follow these instructions:

1.  First un-check the "Built-in" Genius selections from the source list--THOSE don't work anymore.
2.  From the two code entries I posted, copy each one into empty text files, and save them with the *.yml extension.
3.  Exit MB and place both of the new yml files into the "providers" subdirectory of the mb_LyricsReloaded folder in AppData.  Start MusicBee, find "Genius headers 1" and "Genius headers 2" in the source list and check the one(s) you want to use--#1 shows the internal lyrics headers if available, #2 does not.
4.  Start MB and enjoy the Genius searching.

If you don't know enough about Windows file operations to do the above, you have two choices for Genius:

1.  Wait for Mayibongwe to put the fixed ones back in his DLL.
2.  Install the Beenius plugin, which has never STOPPED working and works even better than the LR ones: https://getmusicbee.com/forum/index.php?topic=36605.0 .

Forget about Google, totally unneeded (see my post that was just before yours) .  If you're interested in LyricFind you'll have to wait for Mayibongwe on that one

catalonia

  • Jr. Member
  • **
  • Posts: 64
I had not seen your corrections! I will try them now. So if the google one is no longer useful I will delete it as you told me. The genius fuzzy I'll delete them too?, I see they don't work either but I never knew the difference with the genius without the fuzzy.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
I had not seen your corrections! I will try them now. So if the google one is no longer useful I will delete it as you told me. The genius fuzzy I'll delete them too?, I see they don't work either but I never knew the difference with the genius without the fuzzy.
IMHO, whether the "google" source works or not is not important when only 6 other sources produce over 95% of the hits (see my previous posts).

I am not a fan of "fuzzies" if there are non-fuzzy alternatives that nail the correct lyrics consistently, like the posted revised Genius code from Mayibongwe/Naireem and the killer "Beenius" plugin that seems to "mute" everyone (yes, you need to carefully follow the setup directions, don't be afraid of learning something new).  Sure, you CAN keep the fuzzies if you want--just put them at the bottom of the list, so if they start drawing wrong lyrics you don't need to keep constantly hitting "Search next provider."

catalonia

  • Jr. Member
  • **
  • Posts: 64
I have been testing these provides:

Genius: It works, included in mb_LyricsReloaded_v1.2.7

Genius Headers: it works, thanks to Naireem and Sveakul for sharing it, I have also added the line - [regex, 'LLetra de &quot.*?<br/><br/>', ""] because sometimes instead of "Letra de" of it "Lletra de". This change only affects spanish users.
Code
name: Genius headers 

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '\.+|,+|(\W+(?=$))|(^\W+)', ""]
        - [regex, "'", ""]
        - [regex, '(?<=[a-z0-9%])[^\sa-z0-9%]+(?=[a-z0-9%]+)', "-"]
        - [regex, '((?<=\s)([^a-z0-9\s-])+(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
        - [strip_nonascii, -]
    title:
        type: title
        filters: artist

config:
    url: "https://genius.com/{artist}-{title}-lyrics"
    pattern: ['<div data-lyrics-container="true" class="Lyrics-sc-.*?\-\d.*?">(?<lyrics>.*)<div class="LyricsFooter-sc-.*?\-\d.*?">', 's']

post-filters:
- [regex, 'You might also like</div>', "\n"]
- [regex, '<div class="PrimisPlayer.*?>', "\n"]
- [regex, 'Letra de &quot.*?<br/><br/>', ""]
- [regex, 'LLetra de &quot.*?<br/><br/>', ""]
- [regex, '<inread-ad></inread-ad>', ""]
- [regex, '<div class="StubhubLink.*?</div>', ""]
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\n{2,}',"\n\n", 's']
- [regex, '\[(\[)',"$1", 's']
- trim

Bandcamp: It works.

ChartLyrics: It works.

Cušpajz: It works.

Letras: It works.

Lyrics Freak: It works.

Lyrics Mania: It works.

Lyrics Mode: It works.

Lyrics.ovh: It works.

Lyricsify: It works.

Oldie Lyrics: It works.

Pesni Guru: It works.

Song Lyrics: It works.

Songtexte: It works.

Versos Perfectos: It works.

Google: Not Working.

Lyrics: Not Working.

Lyric Find: Not Working.

Viasona: Not Working.
Last Edit: March 08, 2025, 08:45:41 PM by catalonia

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Thanks catalonia.  BTW, nothing has changed in the LRC "providers" folder linked to on the first post in the thread since 12/22/2024 (Bandcamp), so any "new" changes were all made to the built-in ones in the DLL.

I would like to suggest that an indicator be added to the sources that are built-in so they are easy to distinguish on the sources list.  Just something simple like "(source)--DLL."

Now that the Genius in the DLL is fixed there is no reason to use the "Headers" versions I put up, unless the DLL doesn't include headers and you want them (then use Genius headers 1). or visa-versa.

Chartlyrics and lyricsovh.com are the two "archaic" sources that Steven built to the lyrics panel.  There is also a Lyrics_ovh.yml supplied by Mayibongwe.  I have seen one find something when the other would not.

Mayibongwe has not posted a change log for MBLR 1.2.7, if he has changed anything besides fixing the DLL Genius sources I would appreciate hearing what it was.  Thanks!

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Mayibongwe:  sorry to bother you yet again, but the Metal Archives source YML is broken.  Could you take a look at it please?  I'm sorry but I don't have it in me tonight to be grabbing log files and whatnot.

I have the YML placed first, yet it is consistently skipped over when Metal Archives lyrics are returned by other sources.

If you can't spot it let me know and I'll try to do the "log thing."  Thanks.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I am not a fan of "fuzzies" if there are non-fuzzy alternatives that nail the correct lyrics consistently…
I am.
Using LyricsReloaded using 'Genius (fuzzy)' additional to 'Genius' have been given me (slightly) better results than using only 'Genius' or the Beenius plugin.

But for more popular and English (titled) music the fuzzy version probably won't be adding much.
The non-fuzzy version, or Beenius is probably good enough for less-eclectic, more popular music and set-and-forget users.
Last Edit: February 09, 2025, 07:28:53 PM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Updated pattern for Genius
Code
pattern: ['<div data-lyrics-container="true" class="Lyrics-sc-.*?\-\d.*?">(?<lyrics>.*)<div class="LyricsFooter-sc-.*?\-\d.*?">', 's']
Hi Naireem,  while Genius works fine now thanks to you, now it's Metal Archives that's broken.  Is it is possible you could do one of your fixes on its yml?  Thanks for taking a look.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
Mayibongwe:  sorry to bother you yet again, but the Metal Archives source YML is broken.
Metal Archives makes use of the google search engine, which is currently failing for some reason.
(same problem occurring with the "Google" and "Genius (fuzzy)" sources - maybe the others as well that are also said not to be working by catalonia).
I will get a closer look towards the end of the week.
Strength and Honour (2025)

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Mayibongwe:  sorry to bother you yet again, but the Metal Archives source YML is broken.
Metal Archives makes use of the google search engine, which is currently failing for some reason.
(same problem occurring with the "Google" and "Genius (fuzzy)" sources - maybe the others as well that are also said not to be working by catalonia).
I will get a closer look towards the end of the week.
Thanks Mayibongwe.  In case it helps, ESLyric continues to search Metal Archives successfully.  While of course the engine is different, the *.js script file in use is:

Code
import { parse } from 'himalaya/src/index.js';

export function getConfig(cfg) {
cfg.name = 'Metallum (Unsynced/No Album)';
cfg.version = '0.1';
cfg.author = 'TT/mod MK';
cfg.useRawMeta = false;
}

export function getLyrics(meta, man) {
const Clean = (text) => text
.replace(/\(.*\)|{.*}|\[.*\]|【.*】/g, '').normalize().trim().toLowerCase()
.replace(/[^a-z0-9\- ]/g, '')
.replace(/@/g, 'at')
.replace(/&/g, 'and');

let lyricsId;
const artist = Clean(meta.artist).replaceAll('the ', ''); // Metallum formatting
const title = Clean(meta.title);
const url = `https://www.metal-archives.com/search/ajax-advanced/searching/songs/?bandName=${artist}&songTitle=${title}`;
const settings = { url, timeout: 5000 };

if (artist === '' || title === '') return;

// Get the lyrics id from the search results
request(settings, (err, res, body) => {
const jsonElement = JSON.parse(body);

if (err || res.statusCode !== 200 || jsonElement.aaData.length === 0) return;
const lyricsIdLink = jsonElement.aaData[0][4];
const match = lyricsIdLink.match(/id="lyricsLink_(\d+)"/);

lyricsId = match ? match[1] : null;
});

if (!lyricsId) return;

// Construct the new url with the lyrics id
const lyricsUrl = `https://www.metal-archives.com/release/ajax-view-lyrics/id/${lyricsId}`;
const newSettings = { url: lyricsUrl, timeout: 5000 };

// Get the lyrics
request(newSettings, (err, res, body) => {
if (err || res.statusCode !== 200) return;

let lyricText = findLyrics(body);
lyricText = parseLyrics(lyricText);

const lyricMeta = man.createLyric();
lyricMeta.title = meta.title;
lyricMeta.artist = meta.artist;
lyricMeta.lyricText = lyricText;
lyricMeta.location = url;
man.addLyric(lyricMeta);
});
}

function findLyrics(content) {
return content.trim();
}

function parseLyrics(lyricText) {
const Clean = (rawString) => rawString.trim()
.replace(/&#x([0-9a-f]+);/gi, (_, code) => String.fromCharCode(parseInt(code, 16))) // HTML characters decode
.replace(/&amp(;|)/gi, '&')
.replace(/&gt(;|)/gi, '>')
.replace(/&lt(;|)/gi, '<')
.replace(/&nbsp(;|)/gi, '')
.replace(/&quot(;|)/gi, '"')
.replace(/<br>/gi, '')
.replace(/\uFF1A/gi, ':')
.replace(/\uFF08/gi, '(')
.replace(/\uFF09/gi, ')')
.replace(/\u00E2\u20AC\u2122|\u2019|\uFF07|[\u0060\u00B4]|’(;|)|‘(;|)|&apos(;|)|&#39(;|)|(&#(?:039|8216|8217|8220|8221|8222|8223|x27);)/gi, "'") // Apostrophe variants
.replace(/[\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\uFEFF]/gi, ' ') // Whitespace variants
.replace(/<br \/>/gi, ''); // Metallum formatting

return Clean(lyricText);
}