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

sveakul

  • Hero Member
  • *****
  • Posts: 2176
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: 2
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

  • Hero Member
  • *****
  • Posts: 632
@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!

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

  • Hero Member
  • *****
  • Posts: 2176
@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

  • Hero Member
  • *****
  • Posts: 632
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👍

sveakul

  • Hero Member
  • *****
  • Posts: 2176

Mayibongwe

  • Hero Member
  • *****
  • Posts: 632
...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

sveakul

  • Hero Member
  • *****
  • Posts: 2176
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: Today at 12:09:19 AM by sveakul

sveakul

  • Hero Member
  • *****
  • Posts: 2176
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

  • Hero Member
  • *****
  • Posts: 632
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.