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

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Hi I noticed that this plugin uses the "lyrics" tag to embed the lyrics into files, is there any way to make it use "unsyncedlyrics" instead? I am using genius as a source, I am also using FLAC and m4a files.
I'm not using synced lyrics much, and I don't have a good understanding of this 'unsyncedlyrics' tag. (or even if/that it exists)
But, since the overwhelming percentage of lyrics will be just what it says: the lyrics, wouldn't it be preferred to have the less-common synced lyrics to be written in some 'synced lyrics' tag?
Last Edit: March 01, 2025, 06:57:31 PM by hiccup

slonopot

  • Jr. Member
  • **
  • Posts: 94
@slonopot:  I started drawing zero lyrics from Metal Archives--here or from the Foobar plugins.  Went to the website and found out they have added a damn captcha that is stopping searches (can they do that even from API?):
Perhaps you could contact Metal Archives about this?
If they are sympathetic towards MusicBee users being able to retrieve their lyrics, perhaps they can make some adjustments to their API or something?
Or maybe they can clarify what they have setup for limiting queries per hour or something? Maybe they have IP ban time periods?

edit:
hmm, isn't this off-topic?
Wouldn't this better be discussed in slonopot's plugin thread?

The issue references this yaml and setup so it belongs here service-wise, but I agree that the cloudflare challenge should be discussed with Metal Archives directly since only they can whitelist certain requests. If anybody will actually contact them, I can suggest to make a rule that will whitelist cloudflare integrity checks and disable security for a certain user-agent (for example, make it "MusicBee"), and then we'll add this user-agent into the yaml, at least I've seen it's possible. You can also preset a browser user-agent the same way and see if it gets better.

Anyway, it's a per-user complication that comes and goes with requests amount and it's not something we can control, thus any further discussion is just a waste of time.

Hi I noticed that this plugin uses the "lyrics" tag to embed the lyrics into files, is there any way to make it use "unsyncedlyrics" instead? I am using genius as a source, I am also using FLAC and m4a files.

Any lyrics plugin will use "lyrics" tag, it's just how it works here. It's not like the plugins are asked which tag to put the result into, it's more like if there's a result, the plugin just returns the text and the rest is managed by musicbee. You can either just copy them to the other tag once they're filled in using the tagging tools plugin and overwrite "lyrics" with synced ones where possible, or you can build your own plugin that will do the same when an event triggers, a track change for example.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
@slonopot:  I started drawing zero lyrics from Metal Archives--here or from the Foobar plugins.  Went to the website and found out they have added a damn captcha that is stopping searches (can they do that even from API?):
Perhaps you could contact Metal Archives about this?
If they are sympathetic towards MusicBee users being able to retrieve their lyrics, perhaps they can make some adjustments to their API or something?
Or maybe they can clarify what they have setup for limiting queries per hour or something? Maybe they have IP ban time periods?

edit:
hmm, isn't this off-topic?
Wouldn't this better be discussed in slonopot's plugin thread?
I'm a bit confused over what thread to use for this one--we're not talking about a "slonopot site plugin" like Beenius with no YML and its own DLL/config/setup, yet although a YML is being used it's accompanied by a modified "mb_LyricsReloaded.dll" that REPLACES the existing Mayibongwe mb_LyricsReloaded.dll,  After this post though I'll move things to another whole topic to keep the two apart as hiccup mentioned.  Maybe something generic like "Lyrics Plugins--Miscellaneous."  I'm open to suggestions!

My hope was that slonopot was already using the Metal Archives API and today would show hits again--from his comments, seems he already was, to no avail.  I'm going to try what hiccup suggests, and approach the MA people on the basis of using a searcher constructed so that their own API would bypass the captchas by default, if "MusicBee" appeared in a user-id.  I'll say right now that my own knowledge of coding falls to "zero" in about as many seconds.  So I hope I can count on "a little help, here," when needed.

One thing I have to mention, the "traditional" lyrics databases have grown so complete (Genius, LRCLIB, Musixmatch, SongLyrics) that hardly anyone would even notice Metal Archives was gone.  Very noticeable from years past.
Last Edit: March 02, 2025, 12:12:38 AM by sveakul

slonopot

  • Jr. Member
  • **
  • Posts: 94
My hope was that slonopot was already using the Metal Archives API

Not interested.

Try this for me please:

Code
name: Metal Archives
loader: search

variables:
    artist:
        type: artist
        filters:
        - [regex, '\s([\[\(].*?[\)\]])*$', '']
    title:
        type: title
        filters:
        - [regex, '\s([\[\(].*?[\)\]])*$', '']

headers:
    user-agent: 'curl/8.9.1'

config:
    identity url: "https://www.metal-archives.com/search/ajax-advanced/searching/songs?songTitle={title}&bandName={artist}"
    identity pattern: ['\[.*?"(<.*?>)*\s*({artist})\s*([\[\(].*?[\)\]])*(<.*?>)*".*?"(<.*?>)*\s*(?<album>.*?)\s*(<.*?>)*".*?"(<.*?>)*\s*(?<type>.*?)\s*(<.*?>)*".*?"(<.*?>)*\s*({title})\s*([\[\(].*?[\)\]])*(<.*?>)*".*?"(lyricsLink_(?<identity>.*?)\\".*?)?".*?\]', 'is']
    lyrics url: "https://www.metal-archives.com/release/ajax-view-lyrics/id/"
    lyrics pattern: ['(?<lyrics>.*)', 's']
   
post-filters:
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- trim

It's just adding the headers section, you can apply the same for any version. I'm getting the challenge in the browser too at the moment, but it's bypassed for curl. Let's see if it fixes it.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Thanks slonopot.  I've been trying the latest YML (with Curl headers)/modified DLL you sent, and unfortunately I haven't seen a Metal Archives sourced metal lyrics song happen in an hour.  I will try again later.  Really had me going there for a while!!

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Where things stand so far on restoring Metal Archives lyrics:

I've been in contact with the coder on the Foobar forum (TT) who authored the javascript based Metallum searcher script for the ESLyric plugin, which also failed when the captcha came out (but escaped the round of problems before that).  By actually using the "alpha" Metal Archives API provided at https://metal-api.dev/index.html he was able to make a WORKING SEARCHER SCRIPT again, tested today by me.  Unfortunately it suffers the setback of being unable to function for radio stream searches due to the current API being unable to bypass the expectation of an album name for the search.  It does however work great for music files that have an album name but need lyrics.

TT said that their alpha API is already being worked on to include all the search methods available on the website, with V3 due out soon.  Hopefully, that will enable bypassing an album name--hopefully!

My head is swimming so that's it for now.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Just to provide a readable summary of this:

1.  There currently is NO WORKING LRC script for the Metal Archive site since the captcha arrived

2.  Using the new alpha level API published on the site, a javascript based script for the Foobar ESLyric plugin was written by TT that bypasses the captcha but due to the limited nature of the API does require an album name be present to perform a search.  The metallum people say coming updates of the API will extend its search abilities to others already available on the website.

3.  Slonopot suggested why not ask them to white-list their API from any Cloudflare challenges  This is a good idea and I will try it after their developing API brings back the searches available before;  hopefully then a LRC script can be produced that doesn't require album name.  How the TT javascript searcher bypasses captcha already I don't have a clue (I'm no coder) but it doesn't do MusicBee much good at this point.

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
Apologies for the inactivity here. Duty calls off the forum are keeping me extremely busy of late.
It will be a little while before I can join the party (there sounds to be a bit of investigation required to see what's been what and who's not been behaving on the list of providers).
I can't make up that time at the moment, but in due course, I will have a look.
Thanks a lot for the work that's been going on in the meantime.
Strength and Honour (2025)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
Just to provide a readable summary of this:
1.  There currently is NO WORKING LRC script for the Metal Archive site since the captcha arrived
I haven't read the latest correspondence on this thread, but on the above:
A quick test on my side shows that the .yml in the link below still picks up something like:
https://www.metal-archives.com/albums/Anger/Chaos

But yes, it requires the album tag to function. To have it work otherwise is part of the things I plan to look at when I get proper time.
So it won't do any good for your radio streams at the moment. Other users with album defined tags should still be able to retrieve lyrics on this.

For metal archives, this works when it queries the website directly:
Strength and Honour (2025)

sveakul

  • Hero Member
  • *****
  • Posts: 3260
I'm almost afraid to say anything, but Metal Archives is working again--no captchas, and working normally via separate YML file, using the modified mb_LyricsReloaded.dll linked to at the Gofile upload site by slonopot (ain't there anymore though!) and the second modified YML posted by him (https://getmusicbee.com/forum/index.php?topic=36952.msg233069#msg233069).

I didn't try doing any testing with Mayibongwe's version 1.27 of MBLR and its built-in Metal Archives, can't recall if that was posted before or after the excitement began.

Anyone who had any interest in the database would have held on to the slonopot mod the of the DLL, and the working (requires the mod DLL) with that YML file available from his forum post.  So I'm not going to try to re-host that unless there is some "outcry" here or something.

We'll see how long this lasts.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
You could hit the faint "correct this lyric" link on top and fix 'em all yourself for future users!
That indeed seems very easy to do.
Let's see if catalonia is willing to put some effort into this himself.
Looks like he isn't.

http://www.chartlyrics.com/auOPE4gI0kCTkD2b4NdPBw/El+amor+de+mi+vida.aspxs

still showing the 'unknown' symbols for accented characters that he complained about and asked for others to solve.
Last Edit: March 07, 2025, 09:25:31 PM by hiccup

catalonia

  • Jr. Member
  • **
  • Posts: 64
I didn't complain about something not working in the first place because I don't even use chartlyrics, so if you think it was a complaint for my own benefit the answer is that it was not. The only thing I did was to test all the lyrics providers, quite a few, most of them I don't even use to complete the post I made about the providers that work.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
Mayibongwe and Naireem:  Genius is once again producing no hits with the current code, can you please put that on your list somewhere?  Beenius is still going strong as always with its API-based searching.

wavedash

  • Newbie
  • *
  • Posts: 7
I'm trying to get a config working with a provider and I'm not sure what I'm doing wrong. Here's the yaml:

Code
name: Uta-Net

loader: search

variables:
  title:
    type: title
    filters:
      - [replace, ' ', '%20']
      - [replace, '"', '']

config:
  identity url: "https://www.uta-net.com/search/?Aselect=2&Bselect=3&Keyword={title}&sort=4"
  identity pattern: ['href="(?<identity>/song/\d+/)"', 's']
  lyrics url: "https://www.uta-net.com"
  lyrics pattern: ['<div id="kashi_area" itemprop="text">(?<lyrics>.*?)</div>', 's']

post-filters:
  - strip_html
  - trim

Log.log seems to say it's working:

Code
14/03/2025 04:38:39 [DEBUG] Lyrics request: Hanazawa Kana - 恋愛サーキュレーション - 恋愛サーキュレーション - Uta-Net
14/03/2025 04:38:39 [INFO] Uta-Net tries to load the lyrics...
14/03/2025 04:38:39 [DEBUG] The constructed identity URL: https://www.uta-net.com/search/?Aselect=2&Bselect=3&Keyword=恋愛サーキュレーション&sort=4
14/03/2025 04:38:41 [DEBUG] The constructed lyrics URL: https://www.uta-net.com/song/90291/
14/03/2025 04:38:41 [SUCCESS] lyrics found from Uta-Net!

But MusicBee itself says "No lyrics found". What's going on here?

slonopot

  • Jr. Member
  • **
  • Posts: 94
What's going on here?

I've looked into LyricsReloaded side of things, your script is working properly (but you better convert <br /> into line breaks instead of just removing them in post). You'll need to make a bug report and mention this message somewhere in the forum since the plugin does properly return the parsed lyrics, but musicbee itself is unable to handle the result.

Plugin's RetrieveLyrics with your script ultimately returns this string:
Code
でも そんなんじゃ だめもう そんなんじゃ ほら心は進化するよもっと もっと言葉にすれば消えちゃう関係なら言葉を消せばいいやって思ってた 恐れてただけど あれ? なんかちがうかも..せんりのみちもいっぽから!石のようにかたい そんな意志でちりもつもればやまとなでしこ?「し」抜きで いや 死ぬ気で!ふわふわり ふわふわるあなたが名前を呼ぶそれだけで宙へ浮かぶふわふわる ふわふわりあなたが笑っているそれだけで笑顔になる神様 ありがとう運命のいたずらでもめぐり逢えたことがしあわせなのでも そんなんじゃ だめもう そんなんじゃ ほら心は進化するよもっと もっとそう そんなんじゃ やだねぇ そんなんじゃ まだ私のこと 見ててねずっと ずっと私の中のあなたほどあなたの中の私の存在はまだまだ 大きくないこともわかってるけれど今この同じ 瞬間共有してる 実感ちりもつもればやまとなでしこ!略して?ちりつもやまとなでこ!くらくらり くらくらるあなたを見上げたらそれだけでまぶしすぎてくらくらる くらくらりあなたを想っているそれだけでとけてしまう神様 ありがとう運命のいたずらでもめぐり逢えたことがしあわせなのコイスル キセツハ ヨクバリ circulationコイスル キモチハ ヨクバリ circulationコイスル ヒトミハ ヨクバリ circulationコイスル オトメハ ヨクバリ circulationふわふわり ふわふわるあなたが名前を呼ぶそれだけで宙へ浮かぶふわふわる ふわふわりあなたが笑っているそれだけで笑顔になる神様 ありがとう運命のいたずらでもめぐり逢えたことがしあわせなのでも そんなんじゃ だめもう そんなんじゃ ほら心は進化するよもっと もっとそう そんなんじゃ やだねぇ そんなんじゃ まだ私のこと 見ててねずっと ずっと

Could be an encoding issue, in my experience the Japanese websites don't respect anyone and anything and mix all possible Japanese encodings into one, and there are at least JIS, Shift-JIS, ISO-JP, EUC and Unicode. The native Japanese encodings are not compatible with Unicode, and there are practices when the page itself claims to be in Unicode, but the content itself is actually not. The browsers are used to dealing with this garbage somehow, but it's a mess if you do it manually like in this plugin. Doesn't seem to be the case though since the log is not a complete garbage and it's Unicode after all.

Also the service is not available in GDPR countries, like the most major services from Japan, so debugging in Europe could be an issue.