Author Topic: LyricsReloaded (Updated)  (Read 164081 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Great. A-Z is there now.

Here is an ocd remark as a reward to annoy you ;-) :
The lyrics selection currently says: A-Z Lyrics Universe
The website I looked at just says: A-Z Lyrics
Is 'Universe' something that they have dropped some time ago, or are there maybe two A-Z Lyrics branches?
Last Edit: June 01, 2022, 09:09:06 PM by hiccup

frankz

  • Sr. Member
  • ****
  • Posts: 3834
That I don't know.  It's been A-Z Lyrics Universe in the plug-in so I kept it that way.

HexxTheSwagger

  • Newbie
  • *
  • Posts: 2
Hello Frankz, I wanted to add www.lyricsify.com to the providers because they have a lot of synced lyrics that the included providers dont.
The problem is that the site uses {artist}/{song}/ url with a string of random characters at the end, making it impossible to create a url pattern in the .yml file.

But then i noticed that you can choose between static/search/api loaders, but i havent found a single word about what the search one does and how.
To me it sounds like you can make the plugin search the site instead of creating an exact url.

How can I make it work? If thats what it does ofc.
Last Edit: June 03, 2022, 07:14:02 PM by HexxTheSwagger

rgujiohgrwuio

  • Newbie
  • *
  • Posts: 17
Many thanks for updating the script! It's working fantastically!

Quick question, is it possible to also include the bracketed portions of Genius lyrics? For example when it says "[Verse X]" or "[Chorus]" ? Not a big deal, but I'd appreciate it if its possible! I have Genius (2022-1-27) at the top of the list if that helps. Thanks  :D

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
Quick question, is it possible to also include the bracketed portions of Genius lyrics?
Personally I don't want to see them. And from what I recall neither do most other folks who are using this plugin.

But there is a way if you read through the thread you can probably find the yml that shows the brackets and compare it with the latest, that does not. Then just edit the current one.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

frankz

  • Sr. Member
  • ****
  • Posts: 3834
This is the line that removes the bracketed (i.e. non-lyrical) content.
Code
- [regex, '\[.{1,75}\]', ""]
You can create a yml that does not include this line.

frankz

  • Sr. Member
  • ****
  • Posts: 3834
Hello Frankz, I wanted to add www.lyricsify.com to the providers because they have a lot of synced lyrics that the included providers dont.
The problem is that the site uses {artist}/{song}/ url with a string of random characters at the end, making it impossible to create a url pattern in the .yml file.

But then i noticed that you can choose between static/search/api loaders, but i havent found a single word about what the search one does and how.
To me it sounds like you can make the plugin search the site instead of creating an exact url.

How can I make it work? If thats what it does ofc.
I don't know. I didn't create the plugin and have no idea about those loaders, what they are, or how they might work. Your guess would probably be better than mine because I don't even see those things.

Are you talking about this?
Code
Lrc123.com                              requires search
LYRDB                                   uses an API
chartLyrics.com                         uses an API
AZ Lyrics                               working
Dark Lyrics                             required title for search
Lyrics Time                             broken
SongMeanings.net                        required search
LoloLyrics                              required search
RapGenius                               working
PLyrics.com                             working
UrbanLyrics.com                         working
http://www.oldielyrics.com              working
http://www.tekstowo.pl/                 working mostly, needs parameterized filters
http://www.teksciory.pl/                requires search
http://teksty.org/                      working
http://www.jpopasia.com                 requires search
http://lyrics.wikia.com/Lyrics_Wiki     requires entity decoder
http://www.maxilyrics.com               requires search
http://letras.mus.br/                   working
musica.com                              requires search
http://www.metrolyrics.com              working
www.songlyrics.com                      working
tunewiki.com                            possible
viewlyrics.com                          possible
If so, I think that's just the original author's notes to himself about different providers that existed at the time when he wrote the plugin.

HexxTheSwagger

  • Newbie
  • *
  • Posts: 2
No, I found it in the example.yml.

Code
# the name of the provider. this will be shown in MusicBee's settings
name: 'Example'

# the loader for this provider: static, search, api
loader: static

But if you dont know then thats it I guess. Thanks for the fast response!

rgujiohgrwuio

  • Newbie
  • *
  • Posts: 17
This is the line that removes the bracketed (i.e. non-lyrical) content.
Code
- [regex, '\[.{1,75}\]', ""]
You can create a yml that does not include this line.

Thank you very much!  :)

frankuaku

  • Newbie
  • *
  • Posts: 13
  • MusicBee lover
Using Musixmatch, only after the third line of lyrics there is no new line character.

MusicBee:


MusixMatch:


EDIT: the culprit resides in the webpage's structure, which has 2 distinct paragraphs for the first 3 lines and the rest of the lyrics. I would like to edit the yml config but I don't know how to do that correctly.
Last Edit: June 14, 2022, 05:17:09 PM by frankuaku

crisp

  • Newbie
  • *
  • Posts: 5
Using Musixmatch, only after the third line of lyrics there is no new line character.

EDIT: the culprit resides in the webpage's structure, which has 2 distinct paragraphs for the first 3 lines and the rest of the lyrics. I would like to edit the yml config but I don't know how to do that correctly.

You can download the Musixmatch yml from the repo, put it in %APPDATA%\MusicBee\mb_LyricsReloaded\providers, change the name inside the yml (as per usual), and add this line before strip_html in the post-filters:
- [regex, '<div class="inline_video_ad_container_container">', "\n", s]
There's a div for ads after the first 3 lines, but it's going to be stripped out anyways, so you can replace it with a newline.

frankz

  • Sr. Member
  • ****
  • Posts: 3834
Using Musixmatch, only after the third line of lyrics there is no new line character.

EDIT: the culprit resides in the webpage's structure, which has 2 distinct paragraphs for the first 3 lines and the rest of the lyrics. I would like to edit the yml config but I don't know how to do that correctly.

Using Musixmatch, only after the third line of lyrics there is no new line character.

EDIT: the culprit resides in the webpage's structure, which has 2 distinct paragraphs for the first 3 lines and the rest of the lyrics. I would like to edit the yml config but I don't know how to do that correctly.

You can download the Musixmatch yml from the repo, put it in %APPDATA%\MusicBee\mb_LyricsReloaded\providers, change the name inside the yml (as per usual), and add this line before strip_html in the post-filters:
- [regex, '<div class="inline_video_ad_container_container">', "\n", s]
There's a div for ads after the first 3 lines, but it's going to be stripped out anyways, so you can replace it with a newline.

There's no need.  This seems like such an integral and uncontroversial formatting fix that I created a new version and integrated this fix into it.  If they change it and "inline_video_ad_container_container" no longer matches anything, having it there won't break anything.

Thanks for the code, crisp.

https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.13
Last Edit: June 18, 2022, 05:27:56 AM by frankz

Tybot

  • Sr. Member
  • ****
  • Posts: 336
Using Musixmatch, only after the third line of lyrics there is no new line character.

EDIT: the culprit resides in the webpage's structure, which has 2 distinct paragraphs for the first 3 lines and the rest of the lyrics. I would like to edit the yml config but I don't know how to do that correctly.

You can download the Musixmatch yml from the repo, put it in %APPDATA%\MusicBee\mb_LyricsReloaded\providers, change the name inside the yml (as per usual), and add this line before strip_html in the post-filters:
- [regex, '<div class="inline_video_ad_container_container">', "\n", s]
There's a div for ads after the first 3 lines, but it's going to be stripped out anyways, so you can replace it with a newline.

Any chance of modifying this to be used at Genius as well? As far as I can tell their div contains hashes which of course aren't static. Here's an example of the div class I would like to replace with a new line:

InreadContainer__Container-sc-19040w5-0 cujBpY PrimisPlayer__InreadContainer-sc-1tvdtf7-0 juOVWZ

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312

LazR

  • Jr. Member
  • **
  • Posts: 20
Fuck Genius for this, but they literally changed 6 letters where the lyrics start and now old provider script is broken. No clue why they did that.

Attached is my fixed version or you can just change
Code
class="Lyrics__Container-sc-1ynbvzw-6 jYfhrf">
to
Code
class="Lyrics__Container-sc-1ynbvzw-6 YYrds">
in the pattern subsection under config

Code
name: Genius (2022-7-1)

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&(?=\s)', " and"]
        - [strip_nonascii, -]
    title:
        type: title
        filters: artist

config:
    url: "https://genius.com/{artist}-{title}-lyrics"
    pattern: ['<div data-lyrics-container="true" class="Lyrics__Container-sc-1ynbvzw-6 YYrds">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[',"\n["]
- [regex, '\n{2,}',"\n\n", 's']
- trim

(Mine includes the [Chorus] sections, and has the regex fix for '&')