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

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Would it be possible to make a yml for AZLyrics.com? Very nice Plugin btw!
FYI: https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/azlyrics.com.yml

This is not included by default as there is a legal grey area to this one as to whether a music player can be considered a "third-party lyrics provider."

Naireem

  • Newbie
  • *
  • Posts: 4
Would it be possible to make a yml for AZLyrics.com? Very nice Plugin btw!
FYI: https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/azlyrics.com.yml

This is not included by default as there is a legal grey area to this one as to whether a music player can be considered a "third-party lyrics provider."

Thank you very much!

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1044
  • Heal The World
@lemon_yellow

Again, well done though on the provider. I will be adding it to the list of optional providers in the download link when I get to it.
Will also do some tests on it and revert with comments.
This is done now. No room for improvements in the yml. It's impressive how got everything perfect on your first try. Well done!
Favourite tune at the moment:   Dearly Beloved by Yoko Shimomura from the Kingdom Hearts soundtrack

lemon_yellow

  • Newbie
  • *
  • Posts: 8
Can you please post an example of what you described actually looks like in terms of returned results?  I haven't seen anything odd at all with what your original v2 code is producing.

there a special invisible character at the start of lyrics sometimes, that breaks the synced lyrics. The synced lyrics only work when they start with a '['
The character is invisible so it was a real headscratcher to find, if you copy the first two quote marks from the string that I'm replacing and paste in notepad, and select them, notepad++ says three characters are selected.

Google says it's a "ZERO WIDTH NO-BREAK SPACE" character.
Last Edit: May 16, 2023, 04:07:01 PM by lemon_yellow

lemon_yellow

  • Newbie
  • *
  • Posts: 8
Huge congrats to you lemon_yellow!
I'm a massive fan/collector of synchronized lyrics myself and was super excited when I cracked the "megalobiz" provider (synced lyrics).
Unfortunately, my happiness was short lived as I stopped using it after a few days.
Reason having been that synced lyrics from the internet turned out to always be in some way a few seconds off from my own tracks (some due to my extensive trimming of files).
Anyway, I ended up deciding on retrieving unsynced lyrics only and then syncing them manually to satisfy my need for perfect synchronization.

Again, well done though on the provider. I will be adding it to the list of optional providers in the download link when I get to it.
Will also do some tests on it and revert with comments.

I too love collecting those. Just a tip, instead of re-syncing you can always add a offset value to the lyrics from music bee itself like this:

[offset: +7000]
[ar: TOTO]
[ti: Africa]
[al: Toto IV]
[by: andie.lable]
[length: 04:20]
[id: 80042142]
[00:00.00]
[00:02.87]Africa
[00:05.66]TOTO
[00:09.47]Album: Toto IV
[00:13.30]
[00:31.65]I hear the drums echoing tonight,
[00:35.02]But she hears only whispers
[00:37.12]of some quiet conversation.

99% of the times the song speed and lyrics speed is same, only the starting point can be different for both. Now I have grown accustomed to it so I can just add the offset value by guessing.
It's in milliseconds, a positive value will cause lyrics to appear sooner and negative value will cause them to appear later in the song.

If there is a tempo/speed difference tho, you can just sync them yourself as offset wont fix it.

I have also found a python program called lyricsify that can download .LRC files these in bulk and got synced lyrics for ~60% of my library with it (there are some wrong matches too here and there but I fix them as I find those). It is from that program I found about lyricsify website. It also uses these as providers but I found lyricsify the easiest to start with:

"lyricsify.py"
"megalobiz.py"
"musixmatch.py"
"netease.py"
"spotify.py"
"deezer.py"
Last Edit: May 16, 2023, 04:07:39 PM by lemon_yellow

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
@Mayibongwe:  I would like to suggest the addition of Bandcamp to the lyrics sources if it can be adapted to a yml file.  This site gets lyrics right from the artists/labels, including lots of just-released material.  It is being done right now by another popular player via a user addition to its own lyrics retrieval code and under consideration by another.  Hate to see MusicBee miss out!  Of course whether it can be done at all is your call.  Thanks for thinking about it at least.

Edit:  The Bandcamp website lyrics appear next to the track listing of a band's album. For example, check https://deltasleep.bandcamp.com/album/spring-island?from=discover-top ; if you mouse down the track list halfway down the page, you see a "Lyrics" link appear to the right of the title, which when clicked displays the lyrics.
Last Edit: May 27, 2023, 07:25:45 PM by sveakul

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1044
  • Heal The World
Hey sveakul,

I did have a look over the weekend and it's definitely possible adding it as a provider.
I'd already began working on it, but had encountered a regex hurdle that I plan to re-tackle this coming Friday.

Will keep you posted👍
Favourite tune at the moment:   Dearly Beloved by Yoko Shimomura from the Kingdom Hearts soundtrack

sveakul

  • Sr. Member
  • ****
  • Posts: 2460

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1044
  • Heal The World
...but had encountered a regex hurdle that I plan to re-tackle this coming Friday.
For some reason, I can't get my head around this minor snag. For now, we'll have to work with the below:
It should be good enough as is, but you'll let me know of any edge cases from your side that need fine-tuning.

Code
name: Bandcamp
loader: static

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

config:
    url: "https://{artist}.bandcamp.com/track/{title}"
    pattern: ['<meta.*?\d{4}.*?(?<lyrics>\w.*?)">', 's']

post-filters:
- utf8_encode
- entity_decode
Favourite tune at the moment:   Dearly Beloved by Yoko Shimomura from the Kingdom Hearts soundtrack

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Thanks for the test Bandcamp yml!  Before I test more here is a rather big problem I found right away: the script is placing a "-" in the artist name part of the URL when a space exists in the name, but since the URL from Bandcamp does not use either a space or a "-" (it just runs the name together) a failed search results.  Note:  the TRACK name is NOT run together but uses (and needs!) the "-" for spaces there as sent by the script.

Example #1:  If the artist name is Mike Kershaw, and the track title is Inside The Frame, the yml constructs the search URL as https://mike-kershaw.bandcamp.com/track/inside-the-frame and the search fails.  If only the spaces in the artist's name are run together, the URL is constructed properly and THIS search succeeds: https://mikekershaw.bandcamp.com/track/inside-the-frame.

Example #2:  the existing code works as-is if the artist name is one word: https://koenjihyakkei.bandcamp.com/track/aramidda-horva.  The search succeeds and the lyrics are displayed in the panel.

Example #3:  Like the first example, the existing code sends a search out for Opus VII - Dead End Situation as https://opus-vii.bandcamp.com/track/dead-end-situation and it fails;  remove the "-" from the artist name (but not from the track name), remove space, and it will work:  https://opusvii.bandcamp.com/track/dead-end-situation.  Once again, note that the track title does need the "-" between words as supplied by the script.

I'll wait to test more until you supply a new yml with the above issue fixed, so my eyes don't get too crossed!  Of course, use your own timetable no rush intended.
Last Edit: June 03, 2023, 12:09:19 AM by sveakul

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Tried my hand at some regex;  replacing the "Variables" section of the posted yml with the following fixes the search problem I described above:

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

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1044
  • Heal The World
Tried my hand at some regex;  replacing the "Variables" section of the posted yml with the following fixes the search problem I described above:
Love to hear it!
My test pool must not have been wide enough.
I will add it to the optional providers zip when I log on to my pc later on.
Favourite tune at the moment:   Dearly Beloved by Yoko Shimomura from the Kingdom Hearts soundtrack

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
New problem found in Bandcamp yml that affects when a search is performed with a band name shared by others on the site:

Bandcamp alters its URL construction to allow for the multiple bands with the same name.  For example, there is more than one band named "MMXX" on Bandcamp, but only one uses mmxx.bandcamp.com in the URL; others use an added genre to differentiate them, like mmxxdoom.bandcamp.com.  With the plugin's current yml script, if the track title being searched (in this case it was "Der Nukleus") isn't by the band with the initial mmxx URL construction, the song is not found.  I'm not sure if this is a way to allow for this in the yml script.  The other player I have access to with Bandcamp lyrics ability (AIMP 5.11) was able to find the track lyrics.

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Another Bandcamp yml issue:  when a band name has an ampersand in it, it needs to be changed to "and" for the search to work.  Example:

Song is Powder Pink & Sweet - Dreaming of Leaving.  YML sends out as powderpink&sweet.bandcamp.com/track/dreaming-of-leaving and search fails; needs to be sent out as powderpinkandsweet.bandcamp.com/track/dreaming-of-leaving.

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Playing with the Bandcamp YML again, I found some info that may be worth a re-write of the whole thing:  a search statement that will bring you to the track REGARDLESS of the bandcamp root URL construction beling used now for the band name.

In an example posted previously, I showed how searching for the track MMXX - Der Nukleus would fail if more than one band was named "MMXX" and so the current mmxx.bandcamp.com construction could not be used to find the track if the first one chosen with that URL was not the correct band.  The following search statement will get you directly to that track, regardless of what name the URL leads with:

https://bandcamp.com/search?q={artist}%20{title}&item_type=t

Using the example track:  https://bandcamp.com/search?q={mmxx}%20{der+nukleus}&item_type=t

Notice that the two results are correct, and one of the URLs doesn't even HAVE the name "mmxx" in the URL!



If you are up to it, I would advise a re-write of the YML based on this new search statement to find the track, and whatever else is needed to locate and format the lyrics.  BTW, in this statement band names with more than one word should not be run together but constructed like the track name.  If any of you Regex experts, which I am not, could try to help out with this I'm sure Mayibongwe would appreciate it!