getmusicbee.com

MusicBee & Add-Ons => Customizations => Plugins => Topic started by: frankz on May 19, 2018, 05:42:50 AM

Title: LyricsReloaded (Updated)
Post by: frankz on May 19, 2018, 05:42:50 AM
NOTE: Use this instead: https://getmusicbee.com/forum/index.php?topic=36952

I've updated the long-abandoned LyricsReloaded plugin with new providers that individual users scripted in the original plugin's thread.  I've also deleted outdated providers that no longer worked and did other miscellaneous cleanup on it.

Current Providers
Cušpajz
Genius
Letras de músicas
Metrolyrics
Musixmatch_Asian
Musixmatch
Oldies Lyrics
Smriti
Song Lyrics
Teksty
Urban Lyrics
Hindi Lyrics

NOTE: If you have custom yml files in your \providers\ folders for any of the above, that provider will show up twice in Edit->Edit Preferences->Tags(2).  Make sure you select the appropriate one to meet your needs (built in or custom yml). To avoid duplicates, delete unneeded yml files from your \providers\ folder.

Changelog


1.1.14 Changes
Fixed Genius. Thanks LazR
Updated revision from 1.1.13 to 1.1.14

1.1.13 Changes
Integrated forum user crisp's formatting fix for Musixmatch
Updated revision from 1.1.12 to 1.1.13

1.1.12 Changes
Actually added A-Z Lyrics Universe this time
Updated revision from 1.1.11 to 1.1.12

1.1.11 Changes
Updated Genius, A-Z Lyrics Universe and MusixMatch with user-submitted scripts
Updated revision from 1.1.10 to 1.1.11

1.1.10 Changes
Fixed provider Genius (I hope)
Updated revision from 1.1.9 to 1.1.10

1.1.9 Changes
Removed provider A to Z Lyrics Universe
Updated revision from 1.1.8 to 1.1.9

1.1.8 Changes
Fixed missing field reference in the log
Added Provider Name to log messages so people will know where lyrics were and weren't found
Removed provider LyricWiki Reloaded as it no longer provides lyrics in plain text
Removed provider LyricWiki Gracenote Reloaded as it no longer provides lyrics in plain text
Updated revision from 1.1.7 to 1.1.8

1.1.7 Changes
Updated Genius to include user-provided code (https://getmusicbee.com/forum/index.php?topic=25406.msg174093#msg174093) that strips extraneous line breaks.  Thanks ShotgunStev3!
Updated revision from 1.1.6 to 1.1.7

1.1.6 Changes:
Added LyricWiki back in as API used by native was providing incomplete results
Renamed LyricWiki to LyricWiki Reloaded and LyricWiki Gracenote to LyricWiki Gracenote Reloaded to avoid confusion
Updated revision from 1.1.5 to 1.1.6

1.1.5 Changes:
Added Metrolyrics back in
Added LyricWiki (Gracenote) back in as I was getting better results here than with native MB Gracenote (YMMV)
Updated revision from 1.1.4 to 1.1.5

1.1.4 Changes:
Removed provider Rapgenius, which was the original name of Genius.
Removed provider LyricWiki, which is now native to MB
Removed provider LyricWiki (Gracenote), as Gracenote is now native to MB
Updated revision from 1.1.3 to 1.1.4

1.1.3 Changes:
Got rid of the "Configure" button that didn't do anything (besides confuse a lot of people, me included)
And added a message on the Plugins page about where to configure the plug-in
Removed non-functioning provider PinkRadio
Removed non-functioning provider Tesktowo
Added provider Genius based on forum-provided script
Added provider MusixMatch based on forum-provided script
Changed the description to something a little less confrontational sounding
Updated copyright to -2018
Added myself as maintainer while retaining plugin's original author's credit
Updated revision from 1.1.2 to 1.1.3

Install guidance, a link to the source and changelog on Github, and, of course, the download link for the plugin can be found on the plugin page (https://getmusicbee.com/addons/plugins/166/lyrics-reloaded-updated/).

Documentation about how to create YML files is here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/README.md).

All credit for the functionality of the plugin goes to Steven (I think) and quick_wango, who conceived and wrote it.  I'm just maintaining it.  If something doesn't work right, I can try to fix it, but I can't guarantee quick turnaround as I'm still pretty novice at C#.  

Feel free to script new plugin sites that you find and post them to this thread.  I will add them into the plugin as needed.

Latest Version and Source: https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14
Title: Re: LyricsReloaded (Updated)
Post by: Sizzlinol on May 19, 2018, 04:20:57 PM
Awesome, thank you. (:
Title: Re: LyricsReloaded (Updated)
Post by: Boile on May 19, 2018, 04:55:19 PM
Super!
Thanks! :)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 19, 2018, 06:14:53 PM
Documentation
================
Regular expressions
This plugin relies heavily on Microsoft-flavored regular expression for its functionality. Tutorials and tools to write these expressions are all over the internet, for example RegExr which is a greate tool to write and test regular expressions.

Using these regexes is usually done in 2 ways:

1. a single string, which specifies only the regex
2. an array of 2 strings that specifies the regex in its first element and regex options as its second element. Example: ["regex", is]

There are 2 things to watch out for:

1. backslashes (\) must be escaped when using double quotes ("), as it is a meta character in the YAML format: \s -> \\s
2. named capturing groups are defined like this: (?<lyrics>.*?) with "lyrics" being the name of the group


Regex options
The regex options are specified as a string that contains the characters for the options. A lowercase character enables the options, an uppercase character disables the options.

The options:

i: the regex is case insensitive
s: the input string is seen as a single line
m: the input is seen as multiple lines
c: the regex will be compiled (improves execution performance, but slows startup)
x: whitespace in the regex will be ignored (nice for complex regexes)
d: the regex will go from right to left though the string
e: only named capturing groups will be used
j: the regex will be ECMA script compatible
l: the regex will be culture invariant

==============================================================

Filter
Filters are small functions that can modify the given content. Filters can currently be applied to variable values and the lyrics content.

Important: The filters are executed in the specified order, so stripping HTML-tags before converting <br> tags to newlines won't get you far.

strip_html
This filter removes all HTML tags from the content.

entity_decode
This filter decodes HTML entities like &copy; -> ©.

strip_links
This filter removes links from the lyrics.

utf8_encode
This filter converts the content's encoding to UTF-8 (without BOM).

br2ln
This filter converts <br> tags to newlines (\n).

p2break
This filter converts </p> tags to 2 newlines (\n) indicating a new paragraph.

clean_spaces
This filter cleans up the whitespace of the content by normalizing line endings, converting tabs to spaces, vertical tabs to newlines and removing unnecessary newlines and spaces.

trim
This filter removes whitespace from the beginning and the end of the content.

lowercase
This filter converts the whole content to lower case. Optionally you can provide a culture name as the first argument.

By default the conversion is culture unaware.

uppercase
This filter converts the while content to upper case Optionally you can provide a culture name as the first argument.

By default the conversion is culture unaware.

diacritics2ascii
This filter removes diacritics from the content, so "äöüß" becomes "aous".

umlauts2ascii
This filter is specialized version of diacritics2ascii that handles only the german umlauts and replaces them with their two character representation, so "äöüß" becomes "aeoeuess".

urlencode
This filter URL-encodes the content where necessary, so a space becomes +.

urlencode
This filter URL-encodes the content where necessary, so a space becomes %20.

regex
This filter does a regex replace, the first argument is the regex (which will be cached) and the second argument is the replacement which may contain backreferences. Optionally a third argument can be given which specifies regex options

Example usage: [regex, '\s+?', " "]

strip_nonascii
This filter removes all non-ASCII characters. The filter has 2 optional arguments: The first is a replacement for the removed character and the second one specifies whether the replacement can be inserted multiple times in a row.

Examples:

1. strip_nonascii -> "test *** test" -> "testtest"
2. [strip_nonascii, -] -> "test *** test" -> "test-test"
3. [strip_nonascii, -, duplicate] -> "test *** test" -> "test-----test"

replace
This filter replaces the given search string (first argument) with the replacment (second argument).

Example usage: [replace, search, replace]

===============================================================

Validators
Validators are meant to verify the loaded lyrics. An example where this would be necessary: A website that doesn't return an error 404 when lyrics were not found, but instead show a page with the exact same format, but a "not found"-message instead of lyrics. The result of validators can be inverted by prefixing their name with "not ".

Examples:

- [contains, lyrics]
- [not contains, not found]

contains
This validator checks whether the content contains a given string (first argument).

matches
This validator checks whether the given regex matches something in the content. It takes a regular expression (first argument) and options for it (second argument)

======================================================

Example Configuration YML File

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

# prepare the input
variables:
# filters to apply to the artist
artist:
type: artist # the source of the value
filters:
- strip_diacritics
- [stripdown, _]
- urlencode

# filters to apply to the album
# album: skip entry omitted as it isn't needed

# filters to apply to the title
title:
type: title
filters: artist # reference the filters of artist    

post-filters:
- strip_html
- utf8_encode
- trim

validations:
- [not contains, Click here to submit these lyrics]

config:
# the URL to request. {artist}, {album} and {title} are placeholders for the values from the song.
url: "http://www.azlyrics.com/lyrics/{artist}/{title}.html"
    
# The regular expression to apply to the content of the website. The pattern must contain a named capturing group called "lyrics" like: (?<lyrics>.+?)
# variables are allowed as well
pattern: '<!-- start of lyrics -->(?<lyrics>.+?)<!-- end of lyrics -->'

# The options for the pattern:
# - i: case insensitive
#
# more to come
pattern-options: 'i'
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 21, 2018, 02:49:42 AM
Terrific stuff, thanks for the new update!  Using it regularly to check lyrics on playing radio stations.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2018, 06:11:22 AM
Terrific stuff, thanks for the new update!  Using it regularly to check lyrics on playing radio stations.
Just happy to be part of something that people seem to enjoy.
Title: Re: LyricsReloaded (Updated)
Post by: Freddy Barker on May 21, 2018, 10:37:15 AM
Hey frankz,

I came across this old post showing what looks like scrolling lyrics in Theatre Mode, would be a great alternative to using Miniyrics...

https://getmusicbee.com/forum/index.php?topic=20396.msg121087#msg121087

Is this something that could work by using your new LyricsReloaded plugin?

Regards: Freddy
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2018, 12:22:45 PM
Hey frankz,

I came across this old post showing what looks like scrolling lyrics in Theatre Mode, would be a great alternative to using Miniyrics...

https://getmusicbee.com/forum/index.php?topic=20396.msg121087#msg121087

Is this something that could work by using your new LyricsReloaded plugin?

Regards: Freddy
It just retrieves lyrics from public sites. If you find a public site that displays synchronized lyrics with the information necessary to display them in MB, the plugin can be made to retrieve those and display them in MB by creating a YML script as described in the Documentation post above.
Title: Re: LyricsReloaded (Updated)
Post by: Freddy Barker on May 21, 2018, 03:40:55 PM
It just retrieves lyrics from public sites. If you find a public site that displays synchronized lyrics with the information necessary to display them in MB, the plugin can be made to retrieve those and display them in MB by creating a YML script as described in the Documentation post above.

Much obliged frankz - all looks rather complex  :-X
Title: Re: LyricsReloaded (Updated)
Post by: phred on May 21, 2018, 04:12:07 PM
...scrolling lyrics...
There is only one place remaining that offers 'synced' lyrics and that's MiniLyrics. For which you need to install the MiniLyrics app alsong with its plugin for MB.
https://getmusicbee.com/forum/index.php?topic=1864.msg66983#msg66983
Title: Re: LyricsReloaded (Updated)
Post by: Freddy Barker on May 21, 2018, 04:34:53 PM
...scrolling lyrics...
There is only one place remaining that offers 'synced' lyrics and that's MiniLyrics. For which you need to install the MiniLyrics app alsong with its plugin for MB.
https://getmusicbee.com/forum/index.php?topic=1864.msg66983#msg66983

Hi phred and thanks for the 'heads-up'.
I am using MiniLyrics sometimes, however when using Theatre Mode (which is most of the time), Theatre Mode full-screen takes precedence over MiniLyrics, thus the lyrics are not displayed. So was hoping it could be done using this TM I found that looks like it could display scrolling lyrics....
Synchronised Lyrics Theatre Mode (https://getmusicbee.com/forum/index.php?topic=20396.msg121087#msg121087)

Not sure or about or skilled enough to work through the functionality required to provide such a feature...

Best regards: Freddy

Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2018, 04:55:44 PM
I am using MiniLyrics sometimes, however when using Theatre Mode (which is most of the time), Theatre Mode full-screen takes precedence over MiniLyrics, thus the lyrics are not displayed. So was hoping it could be done using this TM I found that looks like it could display scrolling lyrics....
Synchronised Lyrics Theatre Mode (https://getmusicbee.com/forum/index.php?topic=20396.msg121087#msg121087)

Not sure or about or skilled enough to work through the functionality required to provide such a feature...

Best regards: Freddy


Probably a good question to ask in a Theater Mode thread.  This plugin does lyric retrieval only.
Title: Re: LyricsReloaded (Updated)
Post by: quick_wango on May 21, 2018, 07:53:33 PM
I, as the original auther, request you to comply with the license terms of the GPLv3.

Generally I'm also open for Pull Requests (https://github.com/pschichtel/LyricsReloaded/pulls), I will build new releases when changes come in.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2018, 07:56:35 PM
Plugin deleted.  All yours.  You can even have the thread.

In the future, you may wish to monitor the thread about your plug-in, so that when people ask things like "is this abandoned?" or "I'd like to update this but don't want to step on anyone's toes, what's the protocol?" there won't be misunderstandings.
Title: Re: LyricsReloaded (Updated)
Post by: Freddy Barker on May 21, 2018, 08:09:43 PM
Plugin deleted.  All yours.  You can even have the thread..

What a shame  :'(
Title: Re: LyricsReloaded (Updated)
Post by: quick_wango on May 21, 2018, 08:17:11 PM
Plugin deleted.  All yours.  You can even have the thread.

In the future, you may wish to monitor the thread about your plug-in, so that when people ask things like "is this abandoned?" or "I'd like to update this but don't want to step on anyone's toes, what's the protocol?" there won't be misunderstandings.

This reaction was definetly not what I intended. I will not actively develop the plugin anymore, but if someone (you in this case) would submit changes to my repository I would happly merge them in and build a new release. You are also free to create a fork of the code base, but you have to do it in compliance with the code's license: GPLv3. The obvious violation was the missing source distribution. The full license text can be seen here together with Github's short summary: https://github.com/pschichtel/LyricsReloaded/blob/master/COPYING
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2018, 08:20:44 PM
OK.  Lesson learned.  Like I said, all yours and my sincere apologies for having violated you.  It's kind of why I asked what to do before doing anything.

It was a learning experience in more ways than one.
Title: Re: LyricsReloaded (Updated)
Post by: quick_wango on May 21, 2018, 08:25:48 PM
If you need/want, I can assist you in properly forking the project or merging your changes back into my repository.

Feel free to contact me privately.
Title: Re: LyricsReloaded (Updated)
Post by: phred on May 21, 2018, 08:36:14 PM
@franz - it would be a shame to let this project disappear. quick_wango has stated that he won't be developing the plugin any longer, so it seems to make sense for you to take it over. Throw in the source code, or whatever it is that the GPL requires, and keep it going. I certainly appreciate the attention you gave it bringing it back to life, and I know there are others who also appreciate your time.

Just my two cents.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 22, 2018, 04:27:03 PM
Just an update.  I completely misunderstood the tone and nature of quick_wango's post and completely overreacted. That's on me.  His request was reasonable and normal and I took it in a very wrong way and reacted very negatively when I shouldn't have.

I am going to get it together over here to comply with what he has asked and republish the plugin at such a time when I am able to do so correctly.

Sorry to quick_wango for my snark, and to the rest of you as well for having to witness it.
Title: Re: LyricsReloaded (Updated)
Post by: Bee-liever on May 27, 2018, 08:15:52 AM
Just an update.  I completely misunderstood the tone and nature of quick_wango's post and completely overreacted. That's on me.  His request was reasonable and normal and I took it in a very wrong way and reacted very negatively when I shouldn't have.

Although quite an understandable reaction considering your efforts to update this plugin  ;)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 27, 2018, 07:42:48 PM
FWIW I've gone ahead and put the updated plugin (source and release) up on Github (https://github.com/mbfrankz/LyricsReloaded).

If you already have the version that was on the Add Ons page(1.1.4), you don't need to re-download.  Nothing has changed with it since then. You can check your version by right-clicking the plugin in Windows and checking the Details tab.  Or, if you feel better about being able to get it from where you can see the source, then you can redownload it. Either way.  

If anyone has an example of a song page on metrolyrics that doesn't have a lyrics but instead displays an "oops...We don't have lyrics for that song" type message, I could use a link.  I'm having trouble finding one. I figured out how to avoid pulling those, and I'd like to add metrolyrics back in but I need the exact text of what they say when a page exists but there are no lyrics on it.  Thanks.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 27, 2018, 07:54:04 PM
Nice job on the GitHub site, thanks frankz!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 27, 2018, 08:15:27 PM
Thanks. In the end, the cost was one Saturday morning of self-doubt and frustration, but it's done now and at least it's something I now know how to do (sort of).  :)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 28, 2018, 01:35:20 PM
I've updated the OP with valid links and info.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 29, 2018, 05:54:12 AM
I use this plugin a LOT, especially for checking lyrics for intriguing tracks playing on radio streams  :)   As such, the log file it creates grows and grows, as it adds to vs. replaces itself as the plugin is used.  I use this simple script in a batch file to delete it, placing a shortcut to the .bat in my Windows startup folder for set-it-and-forget-it mode:

Code
cd C:\MusicBee\AppData\mb_LyricsReloaded
del mb_LyricsReloaded.log
The path reflects the Portable install options for MusicBee I have chosen, change it to reflect yours.

Likewise, the lyrics themselves add up in a series of numbered subfolders and .dat files in the MusicBee\Appdata\InternalCache\Lyrics folder.  A batch (.bat) file with this code takes care of that in the same way as the log:

Code
@ECHO OFF

Set dir="c:\MusicBee\AppData\InternalCache\Lyrics"

Echo Deleting all files from %dir%
del %dir%\* /F /Q

Echo Deleting all folders from %dir%
for /d %%p in (%dir%\*) Do rd /Q /S "%%p"
@echo Folder deleted.

exit
As with the log file example, change the "Set dir=" path to match yours.  Now get back to grabbing lyrics!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 29, 2018, 06:04:47 AM
Great tip @sveakul!  Keep 'em coming.

PS - My log since inception is about the size of one 1990s floppy disc: 1.4mb.  I don't know that it's a huge issue, but nice work!
Title: Re: LyricsReloaded (Updated)
Post by: Nokiaman on June 06, 2018, 10:47:38 AM
Glad to see this plugin updated again! :)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 09, 2018, 06:35:01 PM
FYI - I've updated the plugin to version 1.1.5.  Changes are:

Added Metrolyrics back in (I wasn't seeing significant errors or weird data.  If you get messages about missing lyrics with Metrolyrics, please post the artist and title to the song as well as the message that showed up in place of lyrics so I can investigate)


Added LyricWiki (Gracenote) back in as I was getting better results here than with native MB Gracenote for some reason (YMMV).  Figured it was better to have the choice if they're going to give different results and let each user decide which iteration to use.


Updated revision from 1.1.4 to 1.1.5

Updated the first post with the new info. Plugin page seems to take a while to update, but you can grab the latest version from the first post of this thread.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on June 10, 2018, 03:20:30 AM
Thanks for the update frankz, I grabbed that one at light speed  :)
Title: Fetching URL from a Google search
Post by: tharindu on June 14, 2018, 05:18:32 PM
Instead of setting url of provider, by using song title or artist directly, Is there a way to do a google search of the artist, title, lyric, provider and get the results urls.

eg:
If provider is musixmatch, assume we need to get lyrics of song "Greedy" of "Ariana" of use the following url.
Code
url: "https://www.musixmatch.com/lyrics/{artist}/{title}"

Here we get;
http://www.musixmatch.com/lyrics/ariana/greedy

Here this url gives nothing as the musixmatch url for above song is,
https://www.musixmatch.com/lyrics/ariana-grande/greedy
.

But if we can get the url from a simple google search, we can fetch lyrics easily (e.g: even if have misspelled a artist name in tags, the google will correct it for us)
https://www.google.lk/search?q=ariana+greedy+musixmatch+lyrics  

Here we get the first result as the correct result.
https://www.musixmatch.com/lyrics/ariana-grande/greedy
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 14, 2018, 05:21:05 PM
You can do this in MB by adding a custom web link under Edit->Edit Preferences->Internet.  This is not related to this plugin.  The plugin works using direct URLs, not searching.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on June 14, 2018, 08:09:53 PM
tharindu:  frankz answered your question, but believe me, spare yourself the hassle of constructing your own web links and just use this plugin, the obvious advantage being that several lyrics providers can be searched simultaneously, the lyrics then viewed and/or edited in Now Playing while you're listening to the song in MusicBee (or NOT playing it), and then you still have the OPTION to either embed into the music file before or after editing (or autosave depending on your Tags(2) settings), or just copy them and stick them in a text file, or nod and pass.  Everything covered!  Why waltz when you can rock-n-roll? :)
Title: Re: LyricsReloaded (Updated)
Post by: Kasionz on June 14, 2018, 09:33:24 PM
Brilliant brilliant work! Just what I was looking for thank you @frankz !
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 14, 2018, 10:29:47 PM
None of the brilliance is mine, I assure you.  :)
Title: Re: LyricsReloaded (Updated)
Post by: tharindu on June 15, 2018, 05:34:39 AM
You can do this in MB by adding a custom web link under Edit->Edit Preferences->Internet.  This is not related to this plugin.  The plugin works using direct URLs, not searching.

Yes, this one gives the search results in the browser. But this is not what I need. I need the things the plugging already does even, and I need an additional step. Okay, I will explain my question a bit.

Instead of setting url of provider, by using song title or artist directly, Is there a way to do a google search of the artist, title, lyric, provider and get the results urls.

eg:
If provider is musixmatch, assume we need to get lyrics of song "Greedy" of "Ariana" of use the following url.
Code
url: "https://www.musixmatch.com/lyrics/{artist}/{title}"

Here we get;
http://www.musixmatch.com/lyrics/ariana/greedy

Here this url gives nothing as the musixmatch url for above song is,
https://www.musixmatch.com/lyrics/ariana-grande/greedy
.

But if we can get the url from a simple google search, we can fetch lyrics easily (e.g: even if have misspelled a artist name in tags, the google will correct it for us)
https://www.google.lk/search?q=ariana+greedy+musixmatch+lyrics  

Here we get the first result as the correct result.
https://www.musixmatch.com/lyrics/ariana-grande/greedy

In this example, I do not want to get the result on the browser, I need the pluggin grab the first search result url only. Then the fetching lyric of that url shoud be done using the same method as it does now.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 15, 2018, 05:46:34 AM
Sorry, but that's not the way the plugin works.  It works off of direct URLs without the additional step in between.

For your example, the artist name is Ariana Grande.  You'll want to have your files tagged accurately to get accurate results from the plug in.  It is not built to account for mistagged files.  With the correct artist name, the correct lyrics are pulled as you have shown.

If you want to pull lyrics for songs with inaccurate tags, you'll need to do it through the browser and copy/paste them.
Title: Re: LyricsReloaded (Updated)
Post by: tharindu on June 15, 2018, 05:49:59 AM
Is there any suggestion to implement this, in yml file.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 15, 2018, 05:56:42 AM
The YML files control how the site in question (be it Genius, MusixMatch, etc) is accessed through a direct URL, what is pulled down once it's accessed, and how it's formatted.  

Again, the plugin is not built for an intermediate step in between, so what you're looking to do is, therefore, not possible with the plugin.  It cannot add steps in between, follow links, etc.  It's just not what it does.

Tag your files accurately to use the plugin.  A file tagged as Artist:Ariana Grande / Title: Greedy will retrieve the exact correct lyrics from the site.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 18, 2018, 04:12:06 PM
Updated to 1.1.6.  See first post for link and details.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on August 19, 2018, 12:21:35 AM
Hi frankz,

First, thanks for adding the non-API search version of LyricWiki!  Is there any possiblity you could add https://www.metal-archives.com to the sources that mb_LyricsReloaded can search?  I've found lyrics there via a 3rd-party lyrics plugin in Foobar that were not available from any MusicBee search source for the same song, e.g. "Siren's Call" by Phantom Elite.

On the website itself, the lyrics appear (if available) once you are at a album's track listing and click a separate "Show Lyrics" link to the right ( for an example see https://www.metal-archives.com/albums/Sad_Alice_Said/Clock_of_Eternity/313163 (https://www.metal-archives.com/albums/Sad_Alice_Said/Clock_of_Eternity/313163)).

If you can add this source, fantastic, if not, thanks for the great job your plugin already does.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 19, 2018, 12:56:32 AM
Hi frankz,

First, thanks for adding the non-API search version of LyricWiki!  Is there any possiblity you could add https://www.metal-archives.com to the sources that mb_LyricsReloaded can search?  I've found lyrics there via a 3rd-party lyrics plugin in Foobar that were not available from any MusicBee search source for the same song, e.g. "Siren's Call" by Phantom Elite.

On the website itself, the lyrics appear (if available) once you are at a album's track listing and click a separate "Show Lyrics" link to the right ( for an example see https://www.metal-archives.com/albums/Sad_Alice_Said/Clock_of_Eternity/313163 (https://www.metal-archives.com/albums/Sad_Alice_Said/Clock_of_Eternity/313163)).

If you can add this source, fantastic, if not, thanks for the great job your plugin already does.
Looking at it really quickly, I don't think so because there don't seem to be individual URLs / pages for each song.  It just lists by album and then does some kind of internal script to pull up song by song on that same page.

That said, Steven sent me a handful of of other sites that may provide some more obscure or hard to find lyrics.  It will take me a while to get around to integrating them into the plug in, but it's a great start and I will add what I can.

If you find a way to get each song on its own page with a unique URL from the site you've referenced, let me know and I'll take another look.  If you do that and create a YML for it, even better. ;)
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on August 19, 2018, 03:42:55 AM
frankz:  the best I can do is a search url based on artist and title (https://www.metal-archives.com/search/advanced/searching/songs?songTitle=siren%27s+call&bandName=phantom+elite&releaseTitle=&lyrics=&genre=#songs (https://www.metal-archives.com/search/advanced/searching/songs?songTitle=siren%27s+call&bandName=phantom+elite&releaseTitle=&lyrics=&genre=#songs)) that leads to a page which has the song result displayed and a "toggle lyrics display" button that when pushed shows the lyrics;  the button specs out as a javascript element (<a href="javascript:;" id="lyricsLink_4562478" title="Toggle lyrics display" class="viewLyrics iconContainer ui-state-default"><span class="ui-icon ui-icon-script">).  Yeah--YIKES, haha!  Not exactly a YML candidate.

Cool on the new possibilities from Steven, please add to that http://www.darklyrics.com (http://www.darklyrics.com) which has a lot of obscure stuff and uses the friendly " .../search?q=a+b" format.  Thanks for your work that helps so many.
Title: Re: LyricsReloaded (Updated)
Post by: FudgePoly on September 03, 2018, 07:25:20 PM
Thanks for updating the plugin! Much appreciated and works really well.
Title: Re: LyricsReloaded (Updated)
Post by: waydown on September 09, 2018, 02:12:49 PM
Hi there, I've been trying to make LyricsReloaded work for a while now without much success.
The problem is that Musicbee sometimes shows no lyrics at all or lyrics from a whole different song of the artist/band other than the one played (and we're talking no obscure stuff now, Morrissey for example). So in that case I am trying to "search next lyrics provider" but this never seems to work. Even when correct lyrics do appear (lyrics source seem to be either the Musicbee plugin or Lyricwiki only) "search next provider" still doesn't work. Any ideas?

Things I've tried:
* Reordering my lyrics sources in "Tags (2)/Auto-tagging" as the plugin suggests.
* Uninstalling and reinstalling the plugin (latest version as well).
* Uninstalling and reinstalling Musicbee (latest version as well, tried the portable version too).
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 09, 2018, 02:23:48 PM
I've not experienced that at all.  The combo of sources I'm using here (below) finds the correct lyrics, even for surprisingly offbeat songs, more often than not.

Either way, "Search Next Provider" is a native MB function, not part of the plugin, so you'll probably have better luck posting that aspect of the issue in the "Questions" section.

Here are my providers in order. Like I said, I get the correct lyrics a large majority of the time.

LyricWiki
Genius
chartlyrics.com
MusixMatch
Gracenote
MetroLyrics
LyricWiki Reloaded
Title: Re: LyricsReloaded (Updated)
Post by: waydown on September 09, 2018, 02:38:06 PM
Thanks for your reply Franz.

I understand your point. The idea is that a good way to test the plugin is using the "Search Next Provider" function and if everything was working as intended, one would retrieve lyrics results in the order provided in the plugin setting. Does the ""Search Next Provider"" work for you at all, by the way?
I seem to get the correct lyrics most of the time too, what happens is that when I don't (seemingly by these two sources mentioned) nothing gets automatically fetched by the other sources and nothing happens when I manually "search next provider" either, even when I know lyrics are available in the site.
Also, I've got "Metro Lyrics" as my number one source in the plugin settings but I never seem to get lyrics from that one at all.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 09, 2018, 03:08:44 PM
Yes, "Search Next Provider" works for me.  The thing to remember is that "MusicBee Plugin" will appear for all Lyrics Reloaded sources.  MB sees all Lyrics Reloaded as one source. Only native sources will show the individual sources.  "Search Next Provider" does not step through all of the plugin sources.  All the plugin sources are searched in order until lyrics are found. 

You can see all plugin activity under your Windows user folder at AppData\Roaming\MusicBee\mb_LyricsReloaded\mb_LyricsReloaded.log

It takes some experimentation to get the order right so that you get good lyrics most of the time. The results of my experimentation are above.  YMMV.

I just tested MetroLyrics and the URL structure has not changed from what the plugin constructs, so if MetroLyrics isn't returning lyrics it's because Metrolyrics doesn't have any what whatever you're looking for.

All lyrics retrieval, native or plugin, are at the mercy of the sites that provide lyrics, which are generally at the mercy of that site's users who upload the lyrics.  If a source isn't working for your type of music or their library seems thin, move it down or disable it.  LyricWiki and Genius are fantastic IMO.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on September 13, 2018, 10:44:58 AM
Thanks for maintaining this plugin.
Working very smoothly with great results.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 13, 2018, 12:32:03 PM
Thanks for maintaining this plugin.
Working very smoothly with great results.
You are very welcome.  My pleasure.
Title: Re: LyricsReloaded (Updated)
Post by: phred on September 13, 2018, 07:41:02 PM
Thanks for maintaining this plugin.
Working very smoothly with great results.
I'll second this with a plus-one. (Does that make my second a third?)

I never thanked you for bringing this plugin back to life. I use it almost daily and at this point couldn't live without it.

THANKS!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 13, 2018, 10:34:06 PM
Thanks for maintaining this plugin.
Working very smoothly with great results.
I'll second this with a plus-one. (Does that make my second a third?)

I never thanked you for bringing this plugin back to life. I use it almost daily and at this point couldn't live without it.

THANKS!
I appreciate the kind words.  I'm glad people are using it and enjoying it.
Title: Re: LyricsReloaded (Updated)
Post by: netuno125 on September 14, 2018, 09:39:17 PM
I would also like to thank everyone involved in the project of this plugin as it has been very useful through the years. Unfortunately I have just updated to Music Bee 3.2.6827.32939, and everytime I start it, it sends me this error message and then closes:

'MusicBee v3.2.6827.32939 (Win10.0), 14 set 2018 17:37:

System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
   em CubeIsland.LyricsReloaded.LyricsReloaded.shutdown()
   em CubeIsland.LyricsReloaded.LyricsReloaded.Finalize()'

(yes, a part of the error message is in portuguese as it's my system's language, I'll try to translate that part: 'object reference not defined for an object instance')

I removed Lyrics Reloaded from the plugins folder and it started fine, I wonder why it suddenly is a problem.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 15, 2018, 05:31:58 AM
I updated to that version of MB and have opened and closed the program with the plugin enabled multiple times now with no troubles.  Were you running the most recent plugin version (1.1.6) from the first post of this thread?
Title: Re: LyricsReloaded (Updated)
Post by: netuno125 on September 15, 2018, 07:12:40 AM
Well, I don't quite remember what was the last version I had installed, but I downloaded the latest version from here (https://getmusicbee.com/addons/plugins/166/lyrics-reloaded-updated/) and it still gets me the same error message.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 15, 2018, 01:36:22 PM
Is there any further information from those times in your MusicBee error log (you can access it at <User Account>\AppData\MusicBee\Roaming\ErrorLog.dat since you can't open the program) or in the plugin's log (<User Account>\AppData\MusicBee\Roaming\mb_LyricsReloaded\mb_LyricsReloaded.txt)?
Title: Re: LyricsReloaded (Updated)
Post by: netuno125 on September 16, 2018, 05:34:31 AM
Alright, I think I'm dumb. (cue Nirvana)

I went to check the logs you mentioned and halfway in I noticed something off. Apparently, considering I have two different MusicBee folders in different drives (the main program is installed on the main SSD drive, and the library is located in another HDD drive), there are two plugin folders, and one of them (the one in the HDD) already had mb_LyricsReloaded.dll installed. So what I was doing was trying to install the plugin twice by installing it on the SSD folder, that's the reason for the error message.
I wonder why LyricsReloaded didn't show up in the 'Plugins' list before though. I guess this will teach me to look deeper in the problem before asking for help lol. At least someone who reads this won't do the same mistake as I did.

Thanks for the help, frankz.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 16, 2018, 05:36:22 AM
No problem.  Glad you got it sorted.
Title: Re: LyricsReloaded (Updated)
Post by: xkiter on October 05, 2018, 04:12:33 PM
A thank you for frankz for the outstanding plugin.

To make clear my questions, my main interest is to have synchronized lyrics embedded in the MP3 files.

Two main questions:
1) Do "time synced"/synchronized lyrics take priority over the unsynchronized ones in Internet search?
2) If no synced is found (and unsynced is found and written to file), does the search keeps going each time one plays the file, ie,. until the "synced" field of the file is filled?
3) Is there a way (any "hint" at least) to know if a lyric in a given internet source is synced or not?
4) (suppose is related to the MusicBee and not to the plugin but here it goes) During playback of MP3 file, MusicBee never shows the source and always reports the lyrics is from the file itself. Any way to solve this?
5) The option on playback: "Correct lyrics on Website" seems to allow to upload lyrics amended in the MusicBee screen, but is never active. Any way to fix this?

Thanks for your time looking at this issues and again, cheers for the great work.

Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 05, 2018, 04:34:57 PM
Hi,

Unfortunately, none of these questions have anything to do with the plugin.  The plugin does not search for synchronized lyrics.  As far as I know, there is only one source for synchronized lyrics, which is MiniLyrics, which uses a proprietary system to deliver them.

Everything to do with the display of lyrics, how they're embedded, "Correct lyrics on website," etc. is handed by MB, not the plug in.  The plug in simply adds additional sources to MB's built in sources.
Title: Re: LyricsReloaded (Updated)
Post by: Nokiaman on October 07, 2018, 04:09:47 PM
LyricWiki has synchronized lyrics too under /lrc/
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 07, 2018, 04:50:57 PM
LyricWiki has synchronized lyrics too under /lrc/
Can you post a link to a page from the site with synchronized lyrics?  Maybe I can figure something out.
Title: Re: LyricsReloaded (Updated)
Post by: Nokiaman on October 07, 2018, 07:39:27 PM
LyricWiki has synchronized lyrics too under /lrc/
Can you post a link to a page from the site with synchronized lyrics?  Maybe I can figure something out.

Sure
https://lyrics.wikia.com/wiki/Orphei_Dr%C3%A4ngar_And_Myrra_Malmberg:Portal_2_-_Cara_Mia_Addio
I only know of it because I started adding my own
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 07, 2018, 08:06:25 PM
OK.  I'll look at it when I get time.  If it's just adding /lrc to the end of the URL it shouldn't be too off the wall to attempt.  It looks like there are only 380 songs on the entire site with timed lyrics at this point, though, so I don't know how effective it'll wind up being.

FYI, the plugin offers the ability for users to add their own custom providers via yml files.  There's a template here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/example.yml).  The original LyricWiki config is here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/lyrics.wikia.com.yml).  You may want to try downloading the original as a new yml in the plugin's "providers" folder.  Name it something distinctive.  Then in a text editor put something like Lyric Wiki Reloaded (Timed) at the top after name, add /lrc to the end of the url in the config section at the bottom and see if it works after you add it to your sources in MB.  It may or it may not, but this will get you up and running if it does faster than waiting for me to find time will.

If it does let me know.
Title: Re: LyricsReloaded (Updated)
Post by: NetherKing1357 on November 03, 2018, 11:33:25 AM
Is there any way to figure out what are the 'leaders' and 'artist filters'? Sorry, but I don't have much experience in either regex or coding.

Edit: Alternatively, could you please add the site https://www.tamil2lyrics.com? Format is "https://www.tamil2lyrics.com/lyrics/{songname}-song-lyrics/". eg. "https://www.tamil2lyrics.com/lyrics/po-nee-po-song-lyrics/".

Nether
Title: Re: LyricsReloaded (Updated)
Post by: frankz on November 03, 2018, 11:09:54 PM
I'm not sure what you're asking exactly.  If you're trying to set up a yaml for this site, you only use the filters that it's going to use in the URL so looking at it real fast something like this:

    title:
        type: title
        filters:
        - lowercase
        - [strip_nonascii, -]

and then

config:
    url: "http://www.tamil2lyrics.com/lyrics/{title}-song-lyrics/"

It's the "pattern" part where I lose it. I'm for sure worse at regex than everyone else on the internet for some reason.  I can look at adding the site to the plugin, but It'll go much faster if you can come up with a working YAML and then I can roll it in permanently.
Title: Re: LyricsReloaded (Updated)
Post by: brandonluciano824 on November 28, 2018, 01:36:38 AM
I downloaded the dll and have the Genius set to the first source but

I get the following in the lyric field

<!--sse-->

Lyrics

<!--/sse-->


Anyway to have it not display the /sse part?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on November 28, 2018, 05:34:19 AM
I downloaded the dll and have the Genius set to the first source but

I get the following in the lyric field

<!--sse-->

Lyrics

<!--/sse-->


Anyway to have it not display the /sse part?
Your best bet would be for you or some other helpful thread reader to develop some regex that would filter this out and post it here so I can add it to the plugin.  This post (https://getmusicbee.com/forum/index.php?topic=25406.msg145769#msg145769) gives an overview of the options. Unfortunately, RegEx is not in my skill set.

FYI, though, Genius is high in my priority list and I never see this.  For what it's worth, the built-in LyricWiki is my first source, and it's superior to Genius or any other source for the most part.
Title: Re: LyricsReloaded (Updated)
Post by: Scoobydog on December 06, 2018, 03:57:46 PM
This is probably going to sound really dumb but.................................
I'm missing something here I think.  I've just set up as per the OP but where exactly am I supposed to see the lyrics?  I play a song from my album but I see no lyrics anywhere.
Are they supposed to show as per Media Monkey (sorry) in the 'now playing' panel with the album cover picture?
If there is a preference or display item I need to change can somebody please explain, in VERY simple steps, how I achieve this. I would very much appreciate the assistance.
TIA.
Title: Re: LyricsReloaded (Updated)
Post by: Scoobydog on December 06, 2018, 04:06:29 PM
Further to the above I just restarted MB and received an error I'm requested to report.............  Now I can't use MB. I click on OK to acknowledge the error message and it shuts down.  I seem unable to edit the above post.

MusicBee v3.2.6902.32258 (Win10.0), 6 Dec 2018 16:04:

System.NullReferenceException: Object reference not set to an instance of an object.
   at CubeIsland.LyricsReloaded.LyricsReloaded.shutdown()
   at CubeIsland.LyricsReloaded.LyricsReloaded.Finalize()
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 06, 2018, 04:19:42 PM
For the error, you need to go into your task manager and close out whatever instance of MB is running there.  It seems you have one in the background that crashed and you'll get that error when trying to open another one.


As far as where the lyrics show up, that's not really a plugin thing, but if you're not seeing them in your Now Playing screen you can go to View->Arrange Panels and add them to your Now Playing Sidebar from there.
Title: Re: LyricsReloaded (Updated)
Post by: Scoobydog on December 06, 2018, 05:51:57 PM
Hi frankz,
I shall look into the task manager suggestion although couldn’t see anything obvious there earlier.  If I remove the plug in from the plug in folder MB works.  Put it back and it doesn’t.
I shall also take a look because they aren’t showing in the now playing screen and I don’t see an obvious option to make that happen.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 06, 2018, 05:56:27 PM
The other possibility is that you have two copies of the plugin floating around - one in the user plugin folder (users\<USERNAME>\AppData\Roaming\MusicBee\Plugins) and one in the MusicBee program plugin folder (Program Files (x86)\MusicBee\plugins) .  That will also cause this error.
Title: Re: LyricsReloaded (Updated)
Post by: Scoobydog on December 07, 2018, 07:06:48 AM
The other possibility is that you have two copies of the plugin floating around - one in the user plugin folder (users\<USERNAME>\AppData\Roaming\MusicBee\Plugins) and one in the MusicBee program plugin folder (Program Files (x86)\MusicBee\plugins) .  That will also cause this error.
Hi frankz,
There is nothing still running in Task Manager when MusicBee isn't running.
The error message I'm getting is:
the process cannot access the file 'users\<USERNAME>\AppData\Roaming\MusicBee\mb_LyricsReloaded\mb_LyricsReloaded.log' because it is being used by another process.

On inspection I have a mb_LyricsReloaded.dll file in two locations. One is in the user\appdata\roaming\musicbee\plugins and the other in C\Program Files > MusicBee > Plugins

From what you have said I assume one is unnecessary and should be deleted?  Delete the one in Program Files?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 07, 2018, 12:24:45 PM
Delete one or the other.  Doesn't matter which, but you only need one. 
Title: Re: LyricsReloaded (Updated)
Post by: Scoobydog on December 07, 2018, 12:40:02 PM
Delete one or the other.  Doesn't matter which, but you only need one. 
Hi frankz,
Sir you are a star. Deleted the one from the Program files and all now works superbly.  Many, many thanks to you.  Appreciate the time and effort you spent on my behalf.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 07, 2018, 01:09:18 PM
Ah, thank you, but think nothing of it.  As you become more familiar with MB, just pay it forward on the forum when others have questions you can answer.
Title: Re: LyricsReloaded (Updated)
Post by: supersonic on January 03, 2019, 02:42:11 PM
Just been trying this plugin out and it is amazing for Genius however it seems to be stripping the [Verse 1], [Chorus] ect. that is on many lyrics and leaving a line break in it's place, is it possible to leave the [Verse 1], [Chorus] ect. in the downloaded lyrics?

Many thanks
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 03, 2019, 02:48:42 PM
Just been trying this plugin out and it is amazing for Genius however it seems to be stripping the [Verse 1], [Chorus] ect. that is on many lyrics and leaving a line break in it's place, is it possible to leave the [Verse 1], [Chorus] ect. in the downloaded lyrics?

Many thanks
Sorry, no.  The plugin specifically strips those out because they're not lyrics.  

You can, of course, create a custom YAML based on the publicly posted code for the plugin and take out the part that does that for your own use.  The OP of this thread gives links to all the details.

The specific line you'll want to take out of the built-in Genius YML to create a custom YML that doesn't strip these is:
- [regex, '\[.{1,75}\]', ""]
Title: Re: LyricsReloaded (Updated)
Post by: supersonic on January 03, 2019, 04:33:34 PM
Just been trying this plugin out and it is amazing for Genius however it seems to be stripping the [Verse 1], [Chorus] ect. that is on many lyrics and leaving a line break in it's place, is it possible to leave the [Verse 1], [Chorus] ect. in the downloaded lyrics?

Many thanks
Sorry, no.  The plugin specifically strips those out because they're not lyrics.  

You can, of course, create a custom YAML based on the publicly posted code for the plugin and take out the part that does that for your own use.  The OP of this thread gives links to all the details.

The specific line you'll want to take out of the built-in Genius YML to create a custom YML that doesn't strip these is:
- [regex, '\[.{1,75}\]', ""]

Thank you so much  ::)  I've been on RegExr trying to figure what the various expressions mean and then I was trying trial and error deleting some things from the "pattern:" line using a fresh copy of the  mb_LyricsReloaded.dll each time to undo my changes and I don't think I would've ever realised that was the one controlling it.

Quick question, what program should I use to remove the - [regex, '\[.{1,75}\]', ""] line from the .dll? 
I've tried Notepad, Notepad++ and a hex editor HxD 2.0 and every time after it's saved MusicBee deactivates the plugin and gives an error "Unable to initialise the plugin" when I try to re-enable it. (Replacing it with a new clean mb_LyricsReloaded.dll fixes it to try again)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 03, 2019, 04:57:51 PM
You don't have to edit or remake the DLL at all.  It's set up to be much easier to customize than that (not my doing, but nice anyway).

First, download the Genius YML file from github (https://github.com/mbfrankz/LyricsReloaded).  It's in the "Configs" folder.

Then, I guess, rename it to whatever you want (don't know if this is necessary).

Then open it in any text editor.

Change the name field from "Genius" to something like "Genius (with pointless non-standard section headers)"  ;)  so you'll know it is different when you see it in MB.

Delete that line from above from the "post-filter" section and save the file.

Put the YML file in \%AppData%\Roaming\MusicBee\mb_LyricsReloaded\providers

Relaunch MB, and you're set.  Deselect the built-in Genius and activate your custom version.
Title: Re: LyricsReloaded (Updated)
Post by: supersonic on January 03, 2019, 06:09:27 PM
You don't have to edit or remake the DLL at all.  It's set up to be much easier to customize than that (not my doing, but nice anyway).

First, download the Genius YML file from github (https://github.com/mbfrankz/LyricsReloaded).  It's in the "Configs" folder.

Then, I guess, rename it to whatever you want (don't know if this is necessary).

Then open it in any text editor.

Change the name field from "Genius" to something like "Genius (with pointless non-standard section headers)"  ;)  so you'll know it is different when you see it in MB.

Delete that line from above from the "post-filter" section and save the file.

Put the YML file in \%AppData%\Roaming\MusicBee\mb_LyricsReloaded\providers

Relaunch MB, and you're set.  Deselect the built-in Genius and activate your custom version.

You are amazing! I've followed all that and it's working perfectly now, for the record you don't have to rename the YML file, it's working without doing that. Many many thanks for your help you've gone above and beyond!!  ::)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 03, 2019, 06:13:02 PM
Glad to help.  Enjoy!
Title: Re: LyricsReloaded (Updated)
Post by: Thalion Korvhas on January 05, 2019, 07:06:16 PM
I am unfamiliar with how to implement these types of plugins into Musicbee. Where do I place this .dll? I do not seem to have a /providers folder in my Musicbee installation to drop it into.

To activate this plugin after I have it in the correct location, will it automatically be used, or do I have to choose additional providers in the Tags (2) area of Musicbee?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 05, 2019, 07:23:46 PM
I am unfamiliar with how to implement these types of plugins into Musicbee. Where do I place this .dll? I do not seem to have a /providers folder in my Musicbee installation to drop it into.
The /providers folder is for customized lyrics providers as described above after installation.

The plugin installs like any other plugin.  Download and unzip it, and then in MB go to Edit->Edit Preferences->Plugins->Add Plugin and install and activate it.

To activate this plugin after I have it in the correct location, will it automatically be used, or do I have to choose additional providers in the Tags (2) area of Musicbee?
You activate it on the plugins page and choose the providers in Tags(2).
Title: Re: LyricsReloaded (Updated)
Post by: Thalion Korvhas on January 05, 2019, 08:22:53 PM
I am unfamiliar with how to implement these types of plugins into Musicbee. Where do I place this .dll? I do not seem to have a /providers folder in my Musicbee installation to drop it into.
The /providers folder is for customized lyrics providers as described above after installation.

The plugin installs like any other plugin.  Download and unzip it, and then in MB go to Edit->Edit Preferences->Plugins->Add Plugin and install and activate it.

To activate this plugin after I have it in the correct location, will it automatically be used, or do I have to choose additional providers in the Tags (2) area of Musicbee?
You activate it on the plugins page and choose the providers in Tags(2).

That worked, thanks! At last I can add lyrics for many more songs. The default ones were lacking a lot for my personal library.

The only plugins I have tinkered with are adding to the existing ones (visualizer, theater mode) that already had installed functionality. Now I know where to add plugins that add additional functionality.
Title: Re: LyricsReloaded (Updated)
Post by: Wormmy on March 08, 2019, 12:55:23 AM
Could someone possibly make a youtube video detailing the install process with the latest script? That would really help.
Title: Re: LyricsReloaded (Updated)
Post by: ilikecats on March 11, 2019, 07:18:51 PM
After fetching a lot of lyrics, AZlyrics began returning an err_empty_response in the browser. Resetting my IP fixed this, so I guess it was blacklisted for hammering the site too fast. For now I've disabled it as a provider, but perhaps adding a longer/more random delay would help?
Title: Re: LyricsReloaded (Updated)
Post by: diljitdosanjh on March 12, 2019, 02:03:43 PM
Especially thanks for Hindi Lyrics. Love from India.  :)
Title: Re: LyricsReloaded (Updated)
Post by: Synner on March 25, 2019, 08:05:47 PM
Hello, I'm having a problem with Musixmatch.  It refuses to work for some reason.  Log file:

25/03/2019 02:48:30 [DEBUG] Lyrics request:  - Six Feet Under - Midnight In Hell - Unburied - Musixmatch
25/03/2019 02:48:30 [INFO] Musixmatch tries to load the lyrics...
25/03/2019 02:48:30 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/six-feet-under/midnight-in-hell
25/03/2019 02:48:34 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)</span> didn't match!
25/03/2019 02:48:34 [INFO] No lyrics found.
25/03/2019 02:48:34 [DEBUG] no lyrics found

This is just one file for an example but it's not working at all.  The part I don't understand is that if I go to that exact URL there are lyrics available.  Ideas?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on March 25, 2019, 10:29:47 PM
Musixmatch is working fine for lyrics through the plugin here.  When I pull up the lyrics to that song and look at the site code in Chrome's Developer Tools->Sources, the tag that proceeds the lyrics is <p class="mxm-lyrics__content "><span class="lyrics__content__ok"> and ends with </span>, which matches fine.  

Maybe it's some regional difference. The only idea I'd have is to look at the site's coding as it comes up for you and create a custom YML to use in the plugin that matches the code as it's shown for you.  Instructions are here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/README.md).  You'd create the YML and put it in the "providers" folder in the plugin directory.  Name it something different so you can tell the difference between it and the original in the list.

The original MusixMatch YML that you can use as a template/starting point can be found here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/musixmatch.com.yml).
Title: Re: LyricsReloaded (Updated)
Post by: redwing on March 26, 2019, 05:08:01 AM
Hello, I'm having a problem with Musixmatch.  It refuses to work for some reason.

Musixmatch has been using rate limiting per IP for years for security reasons.
So if your access to that site via MB exceeds a certain limit, it redirects to CAPTCHA. And if you fail to solve it, your IP gets blocked for a couple of days. Since it's MB, not your browser, that accesses the site while using the plugin, no way to see the CAPTCHA unless such feature is implemented to the plugin.
But that only applies to your access via MB and you can still access the site if you use a regular browser. That's why you observed this:

The part I don't understand is that if I go to that exact URL there are lyrics available.  Ideas?

Personally I don't include the site into my lyrics providers list since I often fetches lyrics for lots of songs at once, and only include it when I search lyrics manually for songs one by one.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on March 26, 2019, 05:52:25 AM
That's good information to know.  Something to remember when using the plugin is that sites don't want you using plugins like this. They get nothing out of it.  It's a hacked solution.

The plugin is designed to bring up lyrics for songs as you listen to them and then utilize what's built into MB to view or save them.  Like, one song every three or four minutes or so.  That's a reasonable use and not something, I think, that sites would spend much time objecting to or caring much about.  It is not designed (as near as I can tell - I didn't design it) to be a bulk downloading tool. There is some code written for rate limiting, but I don't know how it was meant to work or if it was actually implemented anywhere.
Title: Re: LyricsReloaded (Updated)
Post by: ozzyzak on May 09, 2019, 12:18:48 AM
You don't have to edit or remake the DLL at all.  It's set up to be much easier to customize than that (not my doing, but nice anyway).

First, download the Genius YML file from github (https://github.com/mbfrankz/LyricsReloaded).  It's in the "Configs" folder.

Then, I guess, rename it to whatever you want (don't know if this is necessary).

Then open it in any text editor.

Change the name field from "Genius" to something like "Genius (with pointless non-standard section headers)"  ;)  so you'll know it is different when you see it in MB.

Delete that line from above from the "post-filter" section and save the file.

Put the YML file in \%AppData%\Roaming\MusicBee\mb_LyricsReloaded\providers

Relaunch MB, and you're set.  Deselect the built-in Genius and activate your custom version.

I am currently trying to do this but according to mb_LyricsReloaded.log:

08/05/2019 04:16:29 [DEBUG] Loading config from file: C:\Users\Scott\AppData\Roaming\MusicBee\mb_LyricsReloaded\providers\oldielyrics2.yml
08/05/2019 04:16:29 [ERROR] Failed to load a configuration:
08/05/2019 04:16:29 [ERROR] (Lin: 591, Col: 25, Chr: 48473) - (Lin: 591, Col: 25, Chr: 48473): Mapping values are not allowed in this context.
08/05/2019 04:16:29 [ERROR] YamlDotNet.Core.SyntaxErrorException: (Lin: 591, Col: 25, Chr: 48473) - (Lin: 591, Col: 25, Chr: 48473): Mapping values are not allowed in this context.
   at YamlDotNet.Core.Scanner.FetchValue()
   at YamlDotNet.Core.Scanner.FetchNextToken()
   at YamlDotNet.Core.Scanner.FetchMoreTokens()
   at YamlDotNet.Core.Scanner.InternalMoveNext()
   at YamlDotNet.Core.Parser.GetCurrentToken()
   at YamlDotNet.Core.Parser.ParseDocumentEnd()
   at YamlDotNet.Core.Parser.StateMachine()
   at YamlDotNet.Core.Parser.MoveNext()
   at YamlDotNet.Core.EventReader.Allow[T]()
   at YamlDotNet.Core.EventReader.Expect[T]()
   at YamlDotNet.RepresentationModel.YamlScalarNode..ctor(EventReader events, DocumentLoadingState state)
   at YamlDotNet.RepresentationModel.YamlNode.ParseNode(EventReader events, DocumentLoadingState state)
   at YamlDotNet.RepresentationModel.YamlDocument..ctor(EventReader events)
   at YamlDotNet.RepresentationModel.YamlStream.Load(TextReader input)
   at CubeIsland.LyricsReloaded.Provider.ProviderManager.loadProvider(TextReader configReader)
08/05/2019 04:16:29 [DEBUG] Received a notification of type PluginStartup
08/05/2019 04:16:29 [DEBUG] Received a notification of type 34
08/05/2019 04:16:30 [DEBUG] gzip compression detected
-----------------------------------------------------------------------------------------------------------------------------------
I get this for any yml file that I add into the providers folder. I know I must be missing something obvious. These files are being added as downloaded from github with no modifications whatsoever. Any ideas?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 09, 2019, 12:30:32 AM
Why are you trying to load yml files as downloaded from github?  These are already built into the plugin.

EDIT: I think I know what you're doing wrong.  You're downloading it as a web page and it's coming in like this, right?

Code





<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">



  <link crossorigin="anonymous" media="all" integrity="sha512-3+HOqCwtQal5hOJQ+mdxiq5zmGOTjF6RhjDsPLxbKDYgGlLFeCwzoIanb7j5IiCuXKUqyC2q8FdkC4nmx2P2rA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-a2fba223d5af91496cac70d4ec3624df.css" />
  
    <link crossorigin="anonymous" media="all" integrity="sha512-K1ZDcMAScrII4AIfkC9/MFPu46xORn2/Da/1QlFn28ti4WRM7VyDJsU8A+1HFS1EGl7djTNxgwr3eullJpwm9Q==" rel="stylesheet" href="https://github.githubassets.com/assets/github-391e36018f842d7a4844c9492593e63c.css" />
    
    
  
{Truncated for Space}


Better instructions would be to click the file you want, click "RAW" at the top, and then save the resulting page or copy and paste what's there into a text editor.  Should wind up looking like this.
Code
name: Oldies Lyrics

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [regex, '[^\sa-z0-9]\s*', ""]
        - [strip_nonascii, _]
    title:
        type: title
        filters: artist

config:
    url: "http://oldielyrics.com/lyrics/{artist}/{title}.html"
    pattern: ['<div\s+class="lyrics"[^>]*>\s*<p>(?<lyrics>.+)</p>\s*</div>', s]
    
post-filters:
- br2nl
- p2break
- strip_html
- strip_links
- entity_decode
- clean_spaces
- utf8_encode
Title: Re: LyricsReloaded (Updated)
Post by: ozzyzak on May 09, 2019, 01:18:50 AM
Why are you trying to load yml files as downloaded from github?  These are already built into the plugin.

EDIT: I think I know what you're doing wrong.  You're downloading it as a web page and it's coming in like this, right?

Code





<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">



  <link crossorigin="anonymous" media="all" integrity="sha512-3+HOqCwtQal5hOJQ+mdxiq5zmGOTjF6RhjDsPLxbKDYgGlLFeCwzoIanb7j5IiCuXKUqyC2q8FdkC4nmx2P2rA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-a2fba223d5af91496cac70d4ec3624df.css" />
 
    <link crossorigin="anonymous" media="all" integrity="sha512-K1ZDcMAScrII4AIfkC9/MFPu46xORn2/Da/1QlFn28ti4WRM7VyDJsU8A+1HFS1EGl7djTNxgwr3eullJpwm9Q==" rel="stylesheet" href="https://github.githubassets.com/assets/github-391e36018f842d7a4844c9492593e63c.css" />
   
   
 
{Truncated for Space}


Better instructions would be to click the file you want, click "RAW" at the top, and then save the resulting page or copy and paste what's there into a text editor.  Should wind up looking like this.
Code
name: Oldies Lyrics

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [regex, '[^\sa-z0-9]\s*', ""]
        - [strip_nonascii, _]
    title:
        type: title
        filters: artist

config:
    url: "http://oldielyrics.com/lyrics/{artist}/{title}.html"
    pattern: ['<div\s+class="lyrics"[^>]*>\s*<p>(?<lyrics>.+)</p>\s*</div>', s]
   
post-filters:
- br2nl
- p2break
- strip_html
- strip_links
- entity_decode
- clean_spaces
- utf8_encode

I'm actually trying to use the one for Genius, because just like supersonic, I am also interested in pointless non-standard section headers.  Thank you for the reply :)
Title: Re: LyricsReloaded (Updated)
Post by: FerranNL on May 17, 2019, 08:16:31 PM
Hello!

I've been encountering some issues regarding LyricsReloaded.
I did exactly as the README Installation told me to. Unzip the dll into the Plugins-folder of MusicBee... etc....
However, when I try to launch Music Bee, a prompt shows up:
(screenshot 1)
https://gyazo.com/c88f147dbb13edd8ade2268da462fbc3

This is strange because I just did a fresh Windows 10 install. I extracted the latest version of Music Bee. I extracted the lyricsReloaded plugin into the correct Plugins folder, and for some reason.. it just won't work.

After pressing "OK" on the error message shown above. Music Bee starts and shows the following error:
(screenshot 2)
https://gyazo.com/91805274506b3cc5bd3fadcc443e4237

Am I doing something wrong? If any of you know the solution to this problem, let me know!

Yours,


Ferran
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 17, 2019, 08:59:50 PM
https://getmusicbee.com/forum/index.php?topic=25406.msg153002#msg153002
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on June 01, 2019, 04:38:12 AM
Hi frankz,
Was wondering if the extra lyrics search sites available via Steven's old mb_LyricsPlugin.dll can be integrated into LyricsReloaded (Updated)?   He posted the source code a while back (https://getmusicbee.com/forum/index.php?topic=4751.msg52204#msg52204 (https://getmusicbee.com/forum/index.php?topic=4751.msg52204#msg52204)) but I don't have the know-how to see if it's compatible with how LyricsReloaded is built.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 01, 2019, 05:49:00 AM
I don't really have the know-how, either, but the OP for the original lyrics reloaded (https://getmusicbee.com/forum/index.php?topic=9994.0) states that it's not an update of Steven's plugin but a total rewrite, and since he did use some sources from the original plugin and didn't use others, I'd assume the reason he decided not to use the sources that he chose not to use was that those sites are not compatible with the structure of the plugin.

In fact, looking at that OP now, he says certain sources are "not possible yet" in that post, and those include the ones from the original plugin that he didn't use.

If something has changed and you're able to make a working YML file for any of those sites, I'll be happy to add it into the plugin.  I've been pretty clear that the kind of RegEx skill needed to create these files is not in my wheelhouse and life is kind of coming at me too fast in this last year to get anywhere close to learning it.

The great thing about Lyrics Reloaded is that anyone can add sites to it on their own and then offer the YML for others to use, too.

Wish I could be more helpful, but I'm really just an overseer of the plugin.  My skills are such that I can do cleanup and maintenance but not really creation.

The two don't interfere with each other at all as far as I can tell.  Why not just use both?
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on June 01, 2019, 06:26:52 AM
Yes, they both seem to work fine together, so I'll just stick with that.  Appreciated your reply.
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 08, 2019, 03:36:31 AM
@frankz

Before you took over this plugin (which once again I thank you for) I had created (or modified) a YML file. I'm now trying to create one and I can't find any YML files in my entire MB directory.

I currently have a weblink set up for Bing to grab lyrics for files that don't return any results via the plugin. But it's a real pain in the butt since I have to do each track individually.

Can you please give me some pointers on creating a YML? And where are the stored? The URL I use for Bing is
Code
https://bing.com/search?q=$Replace($First(<Artist>),&,and)+$Split(<Title>,"(",1)+Lyrics

And since the lyrics returned from Bing are fairly reliable, perhaps you'd consider adding it as another provider.

Thanks.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 08, 2019, 04:47:57 AM
Hi,

Easy answers first and then onto the tougher stuff.

There are no YML files that come with the plugin because all of the providers are built in, so it's normal that you don't have any.  The YML functionality exists to allow anyone to either add providers or replace existing providers with a customized version at will. 

When created by the user, the user will put the YML file into the "providers" directory of their AppData (for me, it's Users\<username>\AppData\Roaming\MusicBee\mb_LyricsReloaded\providers but YMMV).  At that point, the custom provider will show up in the list with all of the other providers built into MB and built into the plugin.  It's a great little system, which I can say because I had nothing to do with inventing it at all.

The YMLs used for the providers that are built into the plugin can be found here:
https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded/Configs 

These are identical in format to what an end user will create when making one for a custom provider.  An example YML with some description, again provided by the plugin creator, can be found here: https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/example.yml.  Looking at the YMLs that are actually in use at the previous link may provide a more real-world working knowledge of how things look in the wild, though.

In order to be compatible with the plugin, a site needs to serve up lyrics in text via an easily reproducible URL on pages that follow a set tagging format.  The plugin will try to pull in the URL you feed it, and then look for the start and end tags that you've provided.  It will pull in everything between those tags unless you filter it out in a post-filter. You can generally get these tag wrappers when you're on the page of lyrics by doing a "View Page Source" (or whatever it's called in the browser you use) and then finding the lyrics on that page.  You'll see the lyrics are framed in <div> tags.  If those tags are named the same for every set of lyrics that the site serves up, you're pretty much in business.

And that, unfortunately, is where my knowledge hits a wall.  I have been very honest from the get-go that I can be of absolutely no help in creating new YML files. It requires a lot of REGEX that I have a very big mental block with for some reason. If someone sets something up and it stops working, I may or may not be able to figure out why and make adjustments, but I am very bad at creating these things from scratch.  My own failing, I know, but I try to be upfront about it.

I don't know if the various functions you're using to construct the URL will work in the plugin.  None of the other YMLs appear to have any functions in them.  Whether that means they wouldn't work, I don't know.  The rest are built on simple tags.

Looking at your Bing example, I simply don't know if the lyrics would be provided in a consistently tagged format that would work. I see a "<div class="b_vPanel">" tag that I think is the start, but whether they're all that way is anyone's guess. If so, you'd then have to strip out all of the rest of the coding besides the <br> line breaks in that div via post-filters to get to a usable set of lyrics.

I wish I could be of more help.  Best bet is to experiment with your custom YML as the only provider and see what happens, I think.
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 08, 2019, 02:48:03 PM
Thanks frankz. I've been stumbling around RegEx for more years than I care to admit. Never could get the hang of it despite looking at (seemingly) every web tutorial available.

I should have some time later today where I will attempt to modify an existing YML and see if I can convince it to work with Bing.

I'll report back.
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 08, 2019, 09:57:04 PM
Well ... here's my update, plain and simple. I quit.

I created a bing.yml based on two other yml files, moved it to the top, and made sure it was the only provider selected. When I attempt to get lyrics for tracks, it opens up the bing web page in my browser.

So like you, frankz, RegEx is over my head.

I may come back to this at another point, but right now I don't have too much time to devote to it.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 09, 2019, 05:36:16 AM
That's really odd behavior.  I honestly don't know why that browser thing would happen. Doesn't strike me as something the plugin should/would be able to do. 

Sorry I couldn't be more helpful. 
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 09, 2019, 11:16:27 AM
That's really odd behavior.  I honestly don't know why that browser thing would happen. Doesn't strike me as something the plugin should/would be able to do.  

Sorry I couldn't be more helpful.
I think it's because my attempt was the choosing the easiest way to attack. I simply substituted one URL for another in the existing YMLs. The more difficult path, and probably the more correct one, would be to examine the existing YMLs and try to understand what the RegEx is doing and then modify mine to conform.

But since Bing is not truly a lyrics provider site, it's quite possible what I'm trying to do, can't be done easily. If at all.
Title: Re: LyricsReloaded (Updated)
Post by: BillH on July 25, 2019, 08:38:50 PM
I tried to uninstall Lyrics Reloaded using Preferences > Plugins > Uninstall and got the following error so it wouldn't uninstall.  Is this the right place to report this? 

Thanks,
Bill


MusicBee v3.3.7138.38094 (Win10.0), 25 Jul 2019 12:22:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MusicBeePlugin.Plugin.Uninstall()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at #=zEyMFOXBpDOX3Eq6A4w==.#=z9yeueks=()
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 25, 2019, 10:28:00 PM
Just delete the DLL from wherever you have it. I don't know what uninstall does.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on July 25, 2019, 10:54:39 PM
BillH:  were you having some kind of a problem with it?  Just curious, as I find it the most useful plugin in the whole app.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 25, 2019, 10:59:16 PM
You'll also have a folder at C:\Users\AppData\Roaming\MusicBee called mb_LyricsReloaded that can go.  Looking at the uninstall code, it looks like all it does is delete that directory.
Title: Re: LyricsReloaded (Updated)
Post by: BillH on July 25, 2019, 11:14:18 PM
@frankz

Ok... thanks I'll delete the DLL.

@sveakul

The plugin seemed to be working fine, but I was getting quite a few songs where the lyrics that were downloaded were not the correct lyrics for that song.  I was just doing some debugging trying to figure out where the incorrect lyrics were coming from.  Is there a way for any particular song to determine where the lyrics were downloaded from?

Thanks,
Bill

Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 25, 2019, 11:29:34 PM
Is there a way for any particular song to determine where the lyrics were downloaded from?

Thanks,
Bill


You can look through the log at the above-referenced directory.  It's a text file. You can probably figure it out from there if it indeed came from the plugin. 
Title: Re: LyricsReloaded (Updated)
Post by: BillH on July 25, 2019, 11:52:22 PM
@frankz

I looked at the log and couldn't see any evidence of any lyrics being downloaded for any songs so it looks like they were downloaded prior to my having installed the plugin.  That is good news, it isn't the plugin providing the bad lyrics.  Even so I'd like to know how to tell in the plugin where the lyrics are downloaded from.

So... before deleting the DLL I re-enabled the plugin, picked a song, and used the right click option Delete Lyrics and Redo Search.  Lyrics were downloaded successfully.  I looked at the log in Appdata and see where the lyrics were requested and each provider tries to load the lyrics.  I still am having a hard time figuring out which provider was actually downloading the lyrics.  I see a lot of [INFO] lines saying a provider tries to download the lyrics, but no line that says the provider actually did download the lyrics.  

I pared down the providers and ran a test on a song by J.J. Cale that I know is an instrumental.  Lyrics were downloaded from somewhere.  I'd like to know where.  Here is the portion of the log.

25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - A-Z Lyrics Universe
25/07/2019 04:19:09 [INFO] A-Z Lyrics Universe tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.azlyrics.com/lyrics/jjcale/cloudyday.html
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - Genius
25/07/2019 04:19:09 [INFO] Genius tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://genius.com/jj-cale-cloudy-day-lyrics
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - LyricWiki Reloaded
25/07/2019 04:19:09 [INFO] LyricWiki Reloaded tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://lyrics.wikia.com/J.J._Cale:Cloudy_Day
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - LyricWiki Gracenote Reloaded
25/07/2019 04:19:09 [INFO] LyricWiki Gracenote Reloaded tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://lyrics.wikia.com/Gracenote:J.J._Cale:Cloudy_Day
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - MetroLyrics
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - Musixmatch
25/07/2019 04:19:09 [DEBUG] Lyrics request:  - J.J. Cale - Cloudy Day - Shades - Song Lyrics
25/07/2019 04:19:09 [INFO] MetroLyrics tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.metrolyrics.com/cloudy-day-lyrics-jjcale.html
25/07/2019 04:19:09 [INFO] Musixmatch tries to load the lyrics...
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/jjcale/cloudy-day
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/jjcale/cloudy-day
25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.musixmat25/07/2019 04:19:09 [DEBUG] The constructed URL: http://www.songlyrics.com/jj-cale/cloudy-day-lyrics/
25/07/2019 04:19:10 [INFO] No lyrics found.
25/07/2019 04:19:10 [DEBUG] no lyrics found
25/07/2019 04:19:10 [DEBUG] gzip compression detected
25/07/2019 04:19:10 [WARN] The pattern 'lyricbox'>.*?</div>(?<lyrics>.*?)<!-- didn't match!
25/07/2019 04:19:10 [INFO] No lyrics found.
25/07/2019 04:19:10 [DEBUG] no lyrics found
25/07/2019 04:19:10 [INFO] No lyrics found.
25/07/2019 04:19:10 [DEBUG] no lyrics found
25/07/2019 04:19:10 [INFO] No lyrics found.
25/07/2019 04:19:10 [DEBUG] no lyrics found
25/07/2019 04:19:10 [DEBUG] gzip compression detected
25/07/2019 04:19:10 [DEBUG] lyrics found

Can you help me understand from the log how I can tell which one is the provider that the lyrics actually came from?  What should I be looking for?

Thanks,
Bill
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 26, 2019, 12:48:15 AM
I'm in an interesting position because I did not write the plugin.  I just maintain it. So the answer to your question is "I don't know."  Looking at your log, I'd guess the requests and "lyrics not found/lyrics found" would go in order, so count the lyrics not found until you get to a lyrics found and then count the requests. But that may vary by the individual sites' response times. Your best bet would be to check each of the generated URLs for lyrics that match what you're seeing.

For lyrics downloaded through one of MB's built in providers, the source will be shown at the top if you right click the lyrics in Now Playing. If that pop-up says MusicBee Plugin, then they were downloaded through the plug-in.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on July 26, 2019, 01:03:51 AM
BillH:  Try what frankz says above--do your Lyrics downloading through the Now Playing window and look for the grayed-out "Lyrics Source" at the top of the right-click box.  If the lyrics are wrong (almost never happens for me), hit "Search next provider" and see if the right ones come up then.  I've seen it cycle through 4 providers, all with the correct lyrics just some variation in spacing or punctuation.  As he said, the actual source will show if it's from a MB built-in provider.  Be sure of course your music is accurately tagged..
Title: Re: LyricsReloaded (Updated)
Post by: BillH on July 26, 2019, 01:19:53 AM
@frankz

That hint to look in Now Playing is great.  I can now see where the lyrics came from without having to plow through the log.  

In this case the lyrics were coming from chartlyrics.com.  I disabled that provider and redid the search and it was marked as an instrumental according the MusicBee Plugin.  

Now I will be able to tell where any bad lyrics come from and will keep the plugin enabled.

Thanks for all your help.

Bill
Title: Re: LyricsReloaded (Updated)
Post by: BillH on July 26, 2019, 01:24:01 AM
BillH:  Try what frankz says above--do your Lyrics downloading through the Now Playing window and look for the grayed-out "Lyrics Source" at the top of the right-click box.  If the lyrics are wrong (almost never happens for me), hit "Search next provider" and see if the right ones come up then.  I've seen it cycle through 4 providers, all with the correct lyrics just some variation in spacing or punctuation.  As he said, the actual source will show if it's from a MB built-in provider.  Be sure of course your music is accurately tagged..

Thanks for the suggestion.  I don't normally use Now Playing.  Can I download the lyrics for all songs on an album using Now Playing or do I have to do them one track at a time?

Bill
Title: Re: LyricsReloaded (Updated)
Post by: BillH on August 09, 2019, 01:01:53 AM
Another question.  What am I doing wrong? 

Often MusicBee and the plugin cannot find the lyrics for a song despite the fact that when I search using Google search in my browser, the lyrics are found on one of the sites listed in the list of lyrics providers in preferences.

I just tried finding lyrics for the song So Many Times by Manassas.  When I searched for the lyrics inside MusicBee they were not found.  When I searched using Google search outside MusicBee the lyrics were found on Genius.  This is one of the providers listed Preferences > Tags (2) > Auto Tagging > Lyrics.  It is the 5th provider listed.

Thanks,
Bill
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 09, 2019, 01:17:26 AM
Compare the URL constructed by the plugin in the log to the URL where you found the lyrics and correct whatever tag error is making them different.
Title: Re: LyricsReloaded (Updated)
Post by: BillH on August 09, 2019, 03:11:31 AM
Thanks for the reply.  It looks like some of the errors are due to my having changed Artist to match who is actually performing a song rather than the person the lyrics are tied to on the providers web sites.  For example, for the album Are You Passionate?, I have the Artist as Neil Young & Booker T. & the M.G.'s.  I have the Album Artist as Neil Young.  The providers all tie the lyrics to Neil Young.  Is there a way to have the plugin use the Album Artist field instead of the Artist field?

On some the song is on a compilation album of some sort instead of on the original album.  It looks like the plugin is sending the album name as part of the search and it isn't being found as the providers have the lyrics tied to the original album name.  Is there a way around this problem?

On one of my tests this is what happened.  The URL from the log:

The constructed URL: http://www.musixmatch.com/lyrics/van-morrison/like-a-canonball

The URL from the site:

https://www.musixmatch.com/lyrics/Van-Morrison/Straight-to-Your-Heart-Like-a-Cannonball

The name of the song is (Straight To Your Heart) Like A Canonball.  The artist is Van Morrison.

Even if I search for just Like A Cannonball it is found on Musixmatch.

This is not the problem I was reporting, but t looks like the plugin is dropping the beginning of the song, (Straight To Your Heart).  This same problem happens to me on any song with part of the name in ().

Thanks,
Bill
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 09, 2019, 04:34:49 AM
Yes, it would appear that the regex for that provider does strip out parentheticals. If you do not want it to do this, I would suggest following the instructions to create a custom YML file for this provider based on the built in one that does not do this.  Add it to the providers folder and select it in the place of the original.

Here is the YML for that provider:
https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/musixmatch.com.yml

Overview:
https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded

Here is an example configuration to use as a guide:
https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/example.yml

That said, I find it slightly hard to believe that you were unable to find lyrics for (Straight To Your Heart) Like A Cannonball by Van Morrison through any of MB's facilities.  They do not all work for everything, that's why there is a large variety.

Thanks for the reply.  It looks like some of the errors are due to my having changed Artist to match who is actually performing a song rather than the person the lyrics are tied to on the providers web sites.  For example, for the album Are You Passionate?, I have the Artist as Neil Young & Booker T. & the M.G.'s.  I have the Album Artist as Neil Young.  The providers all tie the lyrics to Neil Young.  Is there a way to have the plugin use the Album Artist field instead of the Artist field?

On some the song is on a compilation album of some sort instead of on the original album.  It looks like the plugin is sending the album name as part of the search and it isn't being found as the providers have the lyrics tied to the original album name.  Is there a way around this problem?
The plugin will use what appears in the Artist field as far as I know.  Doesn't look like that's configurable.  Songs properly tagged with the universally credited artist for a track should work fine because that's what the providers use.

The plugin doesn't use album names for any provider I've seen. You can look through them all here:
https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded/Configs

None appear to use album names.

Do you have an example?
Title: Re: LyricsReloaded (Updated)
Post by: BillH on August 09, 2019, 05:02:20 AM
That said, I find it slightly hard to believe that you were unable to find lyrics for (Straight To Your Heart) Like A Cannonball by Van Morrison through any of MB's facilities.  They do not all work for everything, that's why there is a large variety.

The plugin doesn't use album names for any provider I've seen. You can look through them all here:
https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded/Configs

None appear to use album names.

Do you have an example?

I'll take a look at creating a custom YML.

Well... don't I feel a bit stupid.  I ripped Tupelo Honey a long time ago in iTunes.  When it got the track names it got the wrong name for that song.  It mis-spelled cannonball as canonball.  When I was looking at it tonight I wanted it to say cannonball so that is what I saw.  :-[   After changing that it worked fine.  I found at least 5 or 6 other songs where this was the problem.


I also feel a bit stupid.  I misread the log.  There was no album title in the log.  The song name and album title were the same.   :-[  :-[   I'll have to look a bit closer to see what the problem was for these songs.  

As for Album Artist vs. Artist, I guess I'll try changing the Artist temporarily, get the lyrics, and then change the Artist back.

Thanks for all your help.

Bill
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 09, 2019, 05:34:16 AM
You're welcome.

I will say this for the record not directed at you per se but kind of as a general rule of thumb. Because of the hard work and (IMO) genius of the plugin's original author and members who posted YML updates and new providers on the forum over time (i.e.  nothing at all to do with me), it is a pretty popular plugin with over 5k downloads just in the time since I updated and re-uploaded it. It's one that those users use each time they play a song.

If there were a structural problem with the plugin such as it being incapable of downloading lyrics for fairly common Classic Rock songs, it would be widely reported.  The chances of someone randomly running across what appears to be a debilitating structural problem with the plugin is very slim at this point.  If one thinks they've found a major flaw with the way it works, it's much more likely that the problem is with the way they've tagged their files.

That's not to say there can't and won't be glitches. Nothing is perfect. Providers change their sites, for example, or go offline totally.  But something major like "OMG this won't download lyrics from any provider for many of my songs!" if you think about it logically, is not likely to be something that just one person notices.

And, if there is such a problem, the likelihood of someone of my very limited skill being able to fix it is probably about 10-12%. 

Food for thought.
Title: Re: LyricsReloaded (Updated)
Post by: BillH on August 09, 2019, 05:43:07 AM
Understood.  That is why I prefaced my original posting with "What am I doing wrong?". 

I figured it was probably something I was doing wrong rather than the plugin.  It just took me awhile to figure out what I was doing wrong.  Thanks to you I now know to look in the log to see what is being looked for and comparing that to what I search for in Google.  This really helped me out on the ones I've checked so far. 

Just as an aside, i would guess that less than 1% of my songs didn't find lyrics when I auto tagged them, but that was still probably several 100 songs.

Thanks,
Bill
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 09, 2019, 05:49:39 AM
No, I know, that's why I said it wasn't directed at you.

So, for future readers, the answer is almost always "check your tags."

Irony is that most of what I listen to is from the last few years with no lyrics posted anywhere. I'm lucky if I ever know what the hell anyone is singing about.  ;D
Title: Re: LyricsReloaded (Updated)
Post by: JDV on November 06, 2019, 11:58:38 PM
The other possibility is that you have two copies of the plugin floating around - one in the user plugin folder (users\<USERNAME>\AppData\Roaming\MusicBee\Plugins) and one in the MusicBee program plugin folder (Program Files (x86)\MusicBee\plugins) .  That will also cause this error.
Hi frankz,
There is nothing still running in Task Manager when MusicBee isn't running.
The error message I'm getting is:
the process cannot access the file 'users\<USERNAME>\AppData\Roaming\MusicBee\mb_LyricsReloaded\mb_LyricsReloaded.log' because it is being used by another process.

On inspection I have a mb_LyricsReloaded.dll file in two locations. One is in the user\appdata\roaming\musicbee\plugins and the other in C\Program Files > MusicBee > Plugins

From what you have said I assume one is unnecessary and should be deleted?  Delete the one in Program Files?



I'm having this exact same problem. I would really like to use this plugin.
I've tried deleting both instances, once again copying the dll file to the musicbee plugins folder, I start the player up and it tells it's already being used. I go look in the user\appdata\roaming\musicbee\plugins  folder and it's duplicated itself there... again.

I've tried 3 times.  Why is this happening?
Title: Re: LyricsReloaded (Updated)
Post by: DaraK on November 26, 2019, 01:12:16 AM
hello,
first, thanks for maintaining this awesome plugin, it mostly helps a lot.

I wonder if someone could help me implement a custom provider. I've found already some posts on this forum trying to implement darklyrics.com but with not too much useful information. This would be really useful cause i found quite some metal stuff can be missing (i checked the tags for correctness also).


So as i understand it adding a yml file will be enough to add a provider?

As i saw this plug-in searches by song name in url, so this one will be a bit tricky. Darklyrics uses only album titles with escaped spaces so
"The Violent Sleep Of Reason" would become "theviolentsleepofreason.html"

then all the songs are listed like this on the page

<h3><a name="1">1. Song title</a></h3><br />
lyrics paragraph<br />
another lyrics paragraph<br />
<br /><br />
<h3><a name="2">2. Song Title</a></h3><br />
lyrics<br />
<br /><br />
etc. ...

so the regex would need to fetch the track title between <a> tags but after the number with a dot after the <a> tag since thats the track number and then after finding the right track title get the lyrics after the following<br /> until the triple break like this
lyrics<br />
<br /><br />

i dunno how to do that would be extremely awesome if someone could help out  ???
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on November 26, 2019, 03:36:04 AM
DaraK:  I also would like to see this implemented.  FYI, the old non-maintained plugin by Steven, mb_LyricsPlugin.dll, did at one time search Dark Lyrics, but I have confirmed this is no longer the case.  I have been using a MB Custom Web Links search from the Track Info using just the straight string "http://www.darklyrics.com/search?q=<Artist> <Title>".  For example, for the song Burned Away by Rain Fell Within, that search will end up at the link for the actual song lyrics, which it stores as an enumerated link in the song's album (in this case "Refuge"), constructed as "http://www.darklyrics.com/lyrics/rainfellwithin/refuge.html#9" within the site.

I don't have the chops myself to make a yml file that will work with this, but hopefully your experiments will encourage others to send some suggestions.  It seems the "odd" part is the way they link the full lyrics not by song name but by track# within the album name after the initial search determines if they have it.  Good luck with it anyway, you're already farther ahead than me!!

And a shout-out to frankz for his fantastic work taking over this MB plugin, which is the one I find I use the most.
Title: Re: LyricsReloaded (Updated)
Post by: Lauraq on November 30, 2019, 12:25:01 PM
Hi :)

Is possible add www.angolotesti.it ? Is the only good site with italian lyrics

Thanks
Title: Re: LyricsReloaded (Updated)
Post by: MetalFrog on December 03, 2019, 02:07:37 AM
DaraK:  I also would like to see this implemented.  FYI, the old non-maintained plugin by Steven, mb_LyricsPlugin.dll, did at one time search Dark Lyrics[...]
Seconding a request for Dark Lyrics.  :-*
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 03, 2019, 02:34:36 AM
I have Dark Lyrics showing in Preferences > Tags (2) > auto-tagging > lyrics as one of the providers. I have both the Lyrics_Reloaded and the Lyrics Fetcher plugins enabled so I don't know which one Dark Lyrics is coming from. Whether it actually retrieves lyrics or not is up to you to figure out.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 03, 2019, 03:41:59 AM
I have Dark Lyrics showing in Preferences > Tags (2) > auto-tagging > lyrics as one of the providers. I have both the Lyrics_Reloaded and the Lyrics Fetcher plugins enabled so I don't know which one Dark Lyrics is coming from. Whether it actually retrieves lyrics or not is up to you to figure out.

Hi phred, it's coming from the old "Lyrics Fetcher" plugin (mb_LyricsPlugin.dll) no longer maintained by Steven.  And unfortunately it is NOT working anymore on Dark Lyrics as I have recently confirmed trying to tag some Unsun stuff.  I have asked zkhcohen if he can do a specific Dark Lyrics plugin and he said he will give it a shot as time allows.  Frankz has given us some good resources farther up the thread (https://getmusicbee.com/forum/index.php?topic=25406.msg163432#msg163432 (https://getmusicbee.com/forum/index.php?topic=25406.msg163432#msg163432)) for LyricsReloaded but man custom yml is just out of my wheelhouse I guess.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 03, 2019, 04:02:38 AM
Hi phred, it's coming from the old "Lyrics Fetcher" plugin (mb_LyricsPlugin.dll) no longer maintained by Steven
Thanks sveakul. I've had it unticked, so whether it was working or not, wasn't important to me. Do you know if the rest of the sources in Steven's plugin are working? And which they are? I suppose I can disable it and see which disappear.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 03, 2019, 05:05:33 AM
Do you know if the rest of the sources in Steven's plugin are working? And which they are?

The ones in Steven's are:

AZ Lyrics (dupe)
Dark Lyrics
Lyrics123
Lyrics Time
PLyrics
RapGenius
SongMeanings
UrbanLyrics (dupe)

The ones I marked "dupe" are ones that were already present before adding Lyrics Fetcher, and I disabled those so as not to interfere with the more up-to-date-ones from frankz and the "built-in" ones.  Now, if they are all working, I can't tell you--except for Dark Lyrics which indeed is broken (I confirmed lyrics were at that site that were not being pulled by the plugin).
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 03, 2019, 12:48:45 PM
Got it. Thanks much.

It's not doing any harm, and for the most part I'm getting the lyrics I need/want. So I'll leave it enabled along with frankz's.
Title: Re: LyricsReloaded (Updated)
Post by: quick_wango on February 12, 2020, 11:11:09 PM
That's good information to know.  Something to remember when using the plugin is that sites don't want you using plugins like this. They get nothing out of it.  It's a hacked solution.

The plugin is designed to bring up lyrics for songs as you listen to them and then utilize what's built into MB to view or save them.  Like, one song every three or four minutes or so.  That's a reasonable use and not something, I think, that sites would spend much time objecting to or caring much about.  It is not designed (as near as I can tell - I didn't design it) to be a bulk downloading tool. There is some code written for rate limiting, but I don't know how it was meant to work or if it was actually implemented anywhere.

The plugin actually has some rate limiting functionality integrated as I hit that problem as well back in the day. I think I never actually documented that though. Might even be completely untested :D

For developing new providers or testing existing ones I can recommend using the included unit test suite and testing tool, helped me a lot during development and maintenance. I became fairly quick at hacking together new provider configs.

It's great to see this still alive and kicking! I'm still open to assisting with technical problems, if wanted.
Title: Re: LyricsReloaded (Updated)
Post by: quick_wango on February 12, 2020, 11:26:39 PM
I don't really have the know-how, either, but the OP for the original lyrics reloaded (https://getmusicbee.com/forum/index.php?topic=9994.0) states that it's not an update of Steven's plugin but a total rewrite, and since he did use some sources from the original plugin and didn't use others, I'd assume the reason he decided not to use the sources that he chose not to use was that those sites are not compatible with the structure of the plugin.

In fact, looking at that OP now, he says certain sources are "not possible yet" in that post, and those include the ones from the original plugin that he didn't use.

If something has changed and you're able to make a working YML file for any of those sites, I'll be happy to add it into the plugin.  I've been pretty clear that the kind of RegEx skill needed to create these files is not in my wheelhouse and life is kind of coming at me too fast in this last year to get anywhere close to learning it.

The great thing about Lyrics Reloaded is that anyone can add sites to it on their own and then offer the YML for others to use, too.

Wish I could be more helpful, but I'm really just an overseer of the plugin.  My skills are such that I can do cleanup and maintenance but not really creation.

The two don't interfere with each other at all as far as I can tell.  Why not just use both?

The architecture of the plugin allows to implement entirely different provider concepts side-by-side (in the codebase they are called LyricsLoader). The current concept (StaticLoader) relies entirely on the websites having a stable and predictable URL per song, that can be derived just from the limited song metadata that is available (which often can be done with surprising accuracy as you know).
I originally planned to implement a second loader implementation that tries to use search functions of the websites. so the flow would be like:

1. Construct a search query based on the song metadata
2. Call the site's search functions
3. Extract song URLs from the search results
4. Try to find a single best match in the results, possibly applying some fuzziness
5. Extract the lyrics from the matched URL's site as usual

So provider Yaml files would require a couple more options (search URL, search query filters, URL extraction regex) for these.

In case someone is interested in implementing this, I can assist, but I will not implement this myself as long as there is no native MusicBee for Linux.
Title: Re: LyricsReloaded (Updated)
Post by: phred on April 03, 2020, 10:31:14 PM
@frankz...

I'm testing 3.4 alpha and discovered that the last two versions I've used are trying to connect to GitHub. This doesn't happen in 3.3 so I'm a little concerned. I'm using the same plugin version in both 3.3 and 3.4.

I now have it disabled in 3.4 but it's one of my two most used plugins, so I'd like to know what's going on and why the need to connect to GitHub.

See here for my initial question to Steven:  https://getmusicbee.com/forum/index.php?topic=31125.0

Thanks.

(http://i.imgur.com/XSnMjIsl.jpg) (https://i.imgur.com/XSnMjIs.jpg)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on April 03, 2020, 10:38:48 PM
It's checking for updates.  Always has, back to the original version.  The only change I ever made to this was to change the URL from the original repository to my updated one, and I did that early on.

Here's the code
Code
public delegate void UpdateCheckerCallback(bool updateAvailable);

        public void checkForNewVersion(UpdateCheckerCallback callback)
        {
            Version local = Assembly.GetAssembly(GetType()).GetName().Version;

            LyricsReloaded lr = this;

            Thread updateChecker = new Thread(() => {
                WebClient cl = new WebClient(lr, 5000);
                try
                {
                    bool result = false;
                    WebResponse respone = cl.get("https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/stable/LyricsReloaded/Properties/AssemblyInfo.cs");
                    if (respone != null)
                    {
                        String content = respone.getContent();
                        if (!String.IsNullOrWhiteSpace(content))
                        {
                            Regex versionRegex = new Regex("AssemblyVersion\\(\"(?<version>[^\\s\\*]+)\"\\)", RegexOptions.Compiled | RegexOptions.Singleline);
                            Match match = versionRegex.Match(content);
                            if (match.Success)
                            {
                                Version remote = Version.Parse(match.Groups["version"].Value);
                                result = remote.CompareTo(local) > 0;
                            }
                        }

                    }

                    callback(result);
                }
                catch (Exception e)
                {
                    lr.logger.error("Failed to check for updates: {0}", e.Message);
                }
            }) {
                IsBackground = true,
                Name = "LyricsReloaded - Version Check"
            };
            updateChecker.Start();
Title: Re: LyricsReloaded (Updated)
Post by: phred on April 04, 2020, 03:17:57 AM
It's checking for updates.
Thank you frankz. I would've been satisfied with your answer without the code, but that was appreciated.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on April 04, 2020, 03:33:12 AM
I aim to please  :)
Title: Re: LyricsReloaded (Updated)
Post by: ShotgunStev3 on April 28, 2020, 12:16:08 AM
Hey frankz!
Amazing plugin. Great integration with MusicBee, it's now my first choice for tagging songs with lyrics.
Question though on the Genius config, it seems that enough though the "[Verse 1] [Chorus] [Bridge]" etc tags are stripped perfectly, the line that they were on still remains. Meaning, in between sections there are two blank lines. Obviously, this doesn't happen with songs on the site without those identifiers.
Can one change the config so this doesn't happen, or is this an obstacle with the Genius site itself?

Thanks!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on April 28, 2020, 01:06:07 AM
Someone better at RegEx than I am (which wouldn't be hard to be) could probably add whatever character or characters create a new line there to the RegEx statement to take it out, but that's beyond my skill.

The config YML is on GitHub (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/genius.com.yml) if you want to download it and experiment with creating a custom config that does this. Change the name field to something like Genius (Test) and name the yml something different and put it in your "Providers" folder so you can go back and forth between them. If it works I can add it to the plugin at some point.

This is the line that does that edit:
Code
- [regex, '\[.{1,75}\]', ""]
Title: Re: LyricsReloaded (Updated)
Post by: ShotgunStev3 on May 02, 2020, 05:31:51 AM
After a lot of struggling on StackOverflow, It seems I should've looked through Filters/README.md first  :-X

Code
- [replace, "\n\n", "\n"]

This line will concatenate two blank lines into one

Turning this:
(https://i.imgur.com/GWqbJSM.png)
Into this:
(https://i.imgur.com/6nYbmbH.png)

And then at the end I used the 'trim' command in the filter.cs to remove the blankspace at the beginning

(https://i.imgur.com/9BuWmBc.png)

So, all in all, i added these two lines to the post-filters:
Code
- [replace, "\n\n", "\n"]
- trim

Thanks for the pointers and thanks again for the great plugin!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 02, 2020, 02:28:40 PM
This seems like a useful addition, so I've added it to the built-in Genius provider.  Updated version here (https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.7). Thanks for that, you've made the plug-in better!
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 02, 2020, 05:59:37 PM
Thanks frankz for the update!
Title: Re: LyricsReloaded (Updated)
Post by: EGraf on May 18, 2020, 11:28:00 PM
Hi, just a small bug report, I was having problems with a song with round brackets in its (official) name. The song in question was "Phantom Divine (Shadow Empire)" by Kamelot and I was not able to get any lyrics for it, but worked when I renamed it to "Phantom Divine Shadow Empire"
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 19, 2020, 08:51:04 PM
FWIW spotted this on another player's forum where someone had issues getting lyrics from lyrics.wikia.com:  "..Also,  lyrics.wikia.com is now moved to fandom, and new url is - https://lyrics.fandom.com/wiki/LyricWiki "

Attempts to load lyrics.wikia.com from a browser get automatically sent to https://lyrics.fandom.com/wiki/LyricWiki , but not sure if/how that may affect future searches there from LyricsReloaded (Updated).
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 19, 2020, 10:58:26 PM
FWIW spotted this on another player's forum where someone had issues getting lyrics from lyrics.wikia.com:  "..Also,  lyrics.wikia.com is now moved to fandom, and new url is - https://lyrics.fandom.com/wiki/LyricWiki "

Attempts to load lyrics.wikia.com from a browser get automatically sent to https://lyrics.fandom.com/wiki/LyricWiki , but not sure if/how that may affect future searches there from LyricsReloaded (Updated).
Hmmm...I'm not sure that LyricWiki is viable for the plugin anymore.  The plugin takes the lyrics from the text of the HTML of the web page, but now that LyricWiki is a fandom site it seems that it loads the lyric box some other way and doesn't put the lyrics in the HTML in plain text.

If you go here (https://lyrics.fandom.com/wiki/The_Beatles:We_Can_Work_It_Out), view source, and search the source for "Try to see it my way" those words are nowhere to be found.  If the lyrics aren't in the source in text, they can't be retrieved by the plug-in.

I originally removed LyricWiki from the plug-in because it's now native to MB and seemed to be redundant. I don't remember why I put it back in, maybe someone asked or maybe because I put the Gracenote portion back in and figured I'd throw it back in too just in case, but it seems like it should be taken out and the native LyricWiki options should be used if that's desired as a source.
Hi, just a small bug report, I was having problems with a song with round brackets in its (official) name. The song in question was "Phantom Divine (Shadow Empire)" by Kamelot and I was not able to get any lyrics for it, but worked when I renamed it to "Phantom Divine Shadow Empire"
Parenthesis should be stripped out of the constructed url when they'll cause a problem at the site. If you look in the log for the plug-in (%AppData%/Roaming/MusicBee/mb_LyricsReloaded) it should tell you the constructed URL for each site the plug-in accessed and which sites could and couldn't find the lyrics.  If you go to each URL you'll see why the lyrics were and weren't found there.

Is it possible that the lyrics came from one of the native sources? They use a different method (API) to retrieve lyrics.  The plug-in is basically a web browser that pulls one specific text portion of the retrieved page.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 20, 2020, 12:35:13 AM
I originally removed LyricWiki from the plug-in because it's now native to MB and seemed to be redundant. I don't remember why I put it back in, maybe someone asked or maybe because I put the Gracenote portion back in and figured I'd throw it back in too just in case,

Actually it was to fix a situation with the "built-in" pugin reported by "moi" (https://getmusicbee.com/forum/index.php?topic=26211.0 (https://getmusicbee.com/forum/index.php?topic=26211.0)), and much appreciated!  Thanks for your comments on the new situation there, what a shame.  Looks like they've joined the ranks of sites like Metal Archives with no way to get a result to appear in the normal manner.
Title: Re: LyricsReloaded (Updated)
Post by: GoodMorning on May 20, 2020, 09:03:03 PM
Hi, just a small bug report, I was having problems with a song with round brackets in its (official) name. The song in question was "Phantom Divine (Shadow Empire)" by Kamelot and I was not able to get any lyrics for it, but worked when I renamed it to "Phantom Divine Shadow Empire"
Parenthesis should be stripped out of the constructed url when they'll cause a problem at the site. If you look in the log for the plug-in (%AppData%/Roaming/MusicBee/mb_LyricsReloaded) it should tell you the constructed URL for each site the plug-in accessed and which sites could and couldn't find the lyrics.  If you go to each URL you'll see why the lyrics were and weren't found there.

Is it possible that the lyrics came from one of the native sources? They use a different method (API) to retrieve lyrics.  The plug-in is basically a web browser that pulls one specific text portion of the retrieved page.

It looks like it's also stripping the text that's inside the parentheses. I just checked my LyricsReloaded log and found this:

Code
20-05-2020 03:35:42 [DEBUG] Lyrics request:  - Weezer -  Good Thing - Weezer (White Album) - Genius
20-05-2020 03:35:42 [DEBUG] Lyrics request:  - Weezer -  Good Thing - Weezer (White Album) - MetroLyrics
20-05-2020 03:35:42 [INFO] MetroLyrics tries to load the lyrics...
20-05-2020 03:35:42 [DEBUG] The constructed URL: http://www.metrolyrics.com/-good-thing-lyrics-weezer.html
20-05-2020 03:35:42 [DEBUG] Lyrics request:  - Weezer -  Good Thing - Weezer (White Album) - LyricWiki Reloaded
20-05-2020 03:35:42 [INFO] LyricWiki Reloaded tries to load the lyrics...
20-05-2020 03:35:42 [DEBUG] The constructed URL: http://lyrics.wikia.com/Weezer:_Good_Thing
20-05-2020 03:35:42 [INFO] Genius tries to load the lyrics...
20-05-2020 03:35:42 [DEBUG] The constructed URL: http://genius.com/weezer-good-thing-lyrics
20-05-2020 03:35:42 [DEBUG] gzip compression detected
20-05-2020 03:35:42 [WARN] The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
20-05-2020 03:35:42 [INFO] No lyrics found.
20-05-2020 03:35:42 [DEBUG] no lyrics found

The lyrics I was requesting were for "(Girl We Got A) Good Thing" by Weezer. One of the URLs it constructed was http://genius.com/weezer-good-thing-lyrics which leads to an error page, but if the URL is changed to restore the text in the parentheses like http://genius.com/weezer-girl-we-got-a-good-thing-lyrics then it leads to the song's lyrics.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 20, 2020, 10:51:58 PM
It looks like it's also stripping the text that's inside the parentheses. I just checked my LyricsReloaded log and found this:
.com/weezer-girl-we-got-a-good-thing-lyrics then it leads to the song's lyrics.
OK..that's interesting.  The parenthetical part is actually stripped somewhere before this point, before it's used to construct the URL.  This part..
Code
20-05-2020 03:35:42 [DEBUG] Lyrics request:  - Weezer -  Good Thing - Weezer (White Album) - Genius
...prints back exactly what the plugin thinks is received by MB.  Here's the code.
Code
lyricsReloaded.getLogger().debug("Lyrics request: {0} - {1} - {2} - {3} - {4}", source, artist, title, album, providerName);
Incidentally, not that it matters, but it's also not getting "source," which I'm assuming is the filename or URL, and I think it's not needed because we don't do anything with it.  So when I figure this out I'll take that out of the logger because having that "-" to start is ugly and I don't like it.  That's beside the point.

So it's nothing in the YML that's stripping it out before it's getting it sent to the provider, because it's not making it that far.

When I get a minute I'll look into whether there's something somewhere else in the code that's stripping it out before it gets here.  I know that the parenthetical makes it from MB to last.fm so MB sends it in some context.

This could be a while FYI.  Do the built-ins retrieve lyrics for these songs? That would be a big hint.
Title: Re: LyricsReloaded (Updated)
Post by: GoodMorning on May 21, 2020, 06:03:25 AM
This could be a while FYI.  Do the built-ins retrieve lyrics for these songs? That would be a big hint.

No, at least not the ones I've enabled. They either fail to retrieve anything or retrieve the wrong song. On some songs the lyrics are successfully retrieved, but I think it's only because the provider has a matching URL that omits the text in the parentheses as well. e.g. https://genius.com/The-beach-boys-dont-talk-lyrics for the song "Don't Talk (Put Your Head On My Shoulders)"
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2020, 01:12:47 PM
No, at least not the ones I've enabled. They either fail to retrieve anything or retrieve the wrong song. On some songs the lyrics are successfully retrieved, but I think it's only because the provider has a matching URL that omits the text in the parentheses as well. e.g. https://genius.com/The-beach-boys-dont-talk-lyrics for the song "Don't Talk (Put Your Head On My Shoulders)"

MB processes the title and removes parenthetical statements.  See this thread (https://getmusicbee.com/forum/index.php?topic=31635) for details.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2020, 10:48:33 PM
I've updated the plug-in.

1.1.8 Changes
Fixed missing field reference in the log
Added Provider Name to log messages so people will know where lyrics were and weren't found
Removed provider LyricWiki Reloaded as it no longer provides lyrics in plain text
Removed provider LyricWiki Gracenote Reloaded as it no longer provides lyrics in plain text
Updated revision from 1.1.7 to 1.1.8


Latest Version and source is at: https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.8
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 21, 2020, 11:17:22 PM
Thanks frankz the extra logging is very helpful indeed.  BTW, for those who still want to check lyrics at LyricWiki you can use the "poor man's workaround" of adding an entry in MusicBee's Internet/Custom Web Links section that will open your web browser and at least get you to the page where the lyrics are (if they're there!) and you can copy/paste from there:

http://lyrics.fandom.com/wiki/<Artist>:<Title>
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 21, 2020, 11:21:52 PM
BTW, for those who still want to check lyrics at LyricWiki you can use the "poor man's workaround" of adding an entry in MusicBee's Internet/Custom Web Links section that will open your web browser and at least get you to the page where the lyrics are (if they're there!) and you can copy/paste from there:

http://lyrics.fandom.com/wiki/<Artist>:<Title>
Good tip, yes. They can't take that away from us!
Title: Re: LyricsReloaded (Updated)
Post by: phred on May 22, 2020, 02:47:33 AM
Added Provider Name to log messages so people will know where lyrics were and weren't found
Thanks very much for the update and for this specifically.
Title: Re: LyricsReloaded (Updated)
Post by: EGraf on May 22, 2020, 04:10:20 AM
thanks for the update, will check the log for future problems, for now I'm ok :)
just a heads-up, it seems the fix that was implemented in 1.1.7 not only strips double or redundant line breaks, but intended blank lines too... is a feature or a bug?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 22, 2020, 04:14:29 AM
Added Provider Name to log messages so people will know where lyrics were and weren't found
Thanks very much for the update and for this specifically.

You're welcome.  One thing I noticed is that it will report each source that found results, but does not indicate which of the results is actually being used in the event that more than one set of lyrics was found.  I don't know that there's a way around that (within my abilities) but at least you can look and see which sources are always "no lyrics found" and maybe deactivate them to save bandwitdh or something.  Seemed like a useful addition to me even with limitations.

thanks for the update, will check the log for future problems, for now I'm ok :)
just a heads-up, it seems the fix that was implemented in 1.1.7 not only strips double or redundant line breaks, but intended blank lines too... is a feature or a bug?

It shouldn't. It just takes two breaks (/n/n) and replaces it with one (/n).  Should leave a single /n alone. Works fine here (most of my lyrics come from Genius it's my first listed source).
Title: Re: LyricsReloaded (Updated)
Post by: EGraf on May 22, 2020, 04:18:52 AM
It shouldn't. It just takes two breaks (/n/n) and replaces it with one (/n).  Should leave a single /n alone. Works fine here (most of my lyrics come from Genius it's my first listed source).

Check this lyric (https://genius.com/Nightwish-music-lyrics). The way it looks on Genius:
Quote
Before you
My home was in the wind and surf
The birds and rain, voices of the northern lights

Then you came
I joined you beyond the aeons
As you blew your cave bear bone
And began to hum

But the lyric is imported like this:
Quote
Before you
My home was in the wind and surf
The birds and rain, voices of the northern lights
Then you came
I joined you beyond the aeons
As you blew your cave bear bone
And began to hum


another bug (sorry!). Musixmatch is not getting any lyrics even if the log says it does.

Quote
22/05/2020 05:16:25 [DEBUG] Lyrics request: Nightwish - Pan - Human. :II: Nature. - Musixmatch
22/05/2020 05:16:25 [INFO] Musixmatch tries to load the lyrics...
22/05/2020 05:16:25 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/nightwish/pan
22/05/2020 05:16:26 [DEBUG] gzip compression detected
22/05/2020 05:16:26 [DEBUG] lyrics found from Musixmatch!

still MusicBee says it didn't found the lyric
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 22, 2020, 05:38:14 AM
It shouldn't. It just takes two breaks (/n/n) and replaces it with one (/n).  Should leave a single /n alone. Works fine here (most of my lyrics come from Genius it's my first listed source).

Check this lyric (https://genius.com/Nightwish-music-lyrics). The way it looks on Genius:
Quote
Before you
My home was in the wind and surf
The birds and rain, voices of the northern lights

Then you came
I joined you beyond the aeons
As you blew your cave bear bone
And began to hum

But the lyric is imported like this:
Quote
Before you
My home was in the wind and surf
The birds and rain, voices of the northern lights
Then you came
I joined you beyond the aeons
As you blew your cave bear bone
And began to hum


another bug (sorry!). Musixmatch is not getting any lyrics even if the log says it does.

Quote
22/05/2020 05:16:25 [DEBUG] Lyrics request: Nightwish - Pan - Human. :II: Nature. - Musixmatch
22/05/2020 05:16:25 [INFO] Musixmatch tries to load the lyrics...
22/05/2020 05:16:25 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/nightwish/pan
22/05/2020 05:16:26 [DEBUG] gzip compression detected
22/05/2020 05:16:26 [DEBUG] lyrics found from Musixmatch!

still MusicBee says it didn't found the lyric

The good thing about the plugin is that if a certain configuration isn't working as expected for you, you can customize it to your liking.  All of the YMLs for the providers (even the ones I've removed, for the time being) are located here (https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded/Configs).  Download the one you want to modify, rename it, retitle it, edit it to taste and put it in the providers folder for the plug-in. It will be available as an option for you in MB set just the way you like it.

As far as that set of lyrics not loading from Musixmatch, I'm sorry this is happening to you.  I can't really speculate as to why those particular lyrics didn't show up, but if you find that a provider is regularly giving you problems there are many others.  If you find that it's a case of the site having changed from what is expected as a pattern as the start to the lyrics display (for Musixmatch, it's "['<p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)</span>', s]"), feel free to submit the new pattern the site is using and I will gladly adopt it into the plugin.  I've been clear from the get-go that I am of very little use when it comes to constructing the kind of regex needed to produce the matching patterns but have been very responsive to adopting changes when they're proposed.  MusixMatch seems to block "View Source," which makes it harder.
Title: Re: LyricsReloaded (Updated)
Post by: EGraf on May 22, 2020, 05:46:19 AM
Thanks, will look at it when I have the time! Is great your plugin has this flexibility.

BTW, sorry if I gave you the impression of been a little demanding, far from it! I really appreciate your time and effort!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on May 22, 2020, 05:50:21 AM
Thanks, will look at it when I have the time! Is great your plugin has this flexibility.

BTW, sorry if I gave you the impression of been a little demanding, far from it! I really appreciate your time and effort!
Think nothing of it.  It's really not my plug-in.  It was developed by someone much smarter than me.  I just took over maintaining it when he no longer had reason to.
Title: Re: LyricsReloaded (Updated)
Post by: Rodo on June 19, 2020, 03:37:31 AM
I'm new to Musicbee.  Just been trying it out and installed this plugin.  After installing it, I ran it and it added lyrics to the selected songs.  Then I closed Musicbee and later re-opened it.  The following error appeared and then Musicbee shutdown.  This error continues to appear each time I open Musicbee and it then shuts down.  I've moved the plugin .dll file from the plugin directory and I can now open Musicbee successfully but the plugin won't work when I then try to install it again.  I have also deleted the log file but this has not helped.  Can someone help?

Error appearing:

An error occurred during plugin startup.  The process cannot access the file
'C:\Users\<user name>\AppData\Roaming\MusicBee\mb_lyricsReloaded\mb_lyricsReloaded.log it is being used by another process.

MusicBee v3.3.7367.38620D  (Win10.0), 19 Jun 2020 12:22:

System.NullReferenceException: Object reference not set to an instance of an object.
   at CubeIsland.LyricsReloaded.LyricsReloaded.shutdown()
   at CubeIsland.LyricsReloaded.LyricsReloaded.Finalize()
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 19, 2020, 03:45:32 AM
https://getmusicbee.com/forum/index.php?topic=28481.msg158113#msg158113
Title: Re: LyricsReloaded (Updated)
Post by: Rodo on June 19, 2020, 03:46:46 AM
Oh I should have searched this thread before posting.  Just found the issue.  I had two .dll files.  Deleted one and now it's all good.

Thanks for your help Frank.  I found the issue just before you posted about what to do.
Title: Re: LyricsReloaded (Updated)
Post by: frostbyte on July 24, 2020, 09:03:11 AM
Suddenly, when I try to fetch the lyrics they already have the status not found. So I can't refetch them again which worked for some songs in the past. Restarting musicbee doesn't help.

Edit: solved. My network share wasn't unlocked. Forgot to enter password first  :)
Title: Re: LyricsReloaded (Updated)
Post by: RetroGameReaper on September 04, 2020, 07:47:10 AM
For some reason I'm having barely any luck getting lyrics anymore. When I do get lyrics, it's completely at random. I downloaded a separate lyrics program and that works fine, but Lyrics Reloaded doesn't.
Title: Re: LyricsReloaded (Updated)
Post by: phred on September 04, 2020, 11:44:25 AM
What version of MB are you using (Help > About)?
How was MB installed (Store, Installer, Portable)?
Please post a screenshot of your lyrics auto-tagging settings from Preferences > Tags (2)
Title: Re: LyricsReloaded (Updated)
Post by: RetroGameReaper on September 04, 2020, 03:47:31 PM
I'm on version 3.3.7491 P.
I installed MB as a portable.
(https://imgur.com/a/hsnlbmX)
https://imgur.com/a/hsnlbmX
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 04, 2020, 03:56:00 PM
(https://i.imgur.com/DP4e3DW.png)

You're going to need to be more specific about what songs are failing (title and artist **as tagged**) and what it says in the program's log file for these songs (%AppData%\mb_LyricsReloaded\mb_LyricsReloaded.log).  AFAIK all of the sources active in the plugin are working fine.
Title: Re: LyricsReloaded (Updated)
Post by: phred on September 04, 2020, 04:00:04 PM
I'm on version 3.3.7491 P
Hmmm ... I do recall Steven adding Bing for lyrics searches not to long ago. I would make that first on the list of sources. If you don't see it on your current list, I suggest updating to the latest patch version for either 3.3 or 3.4, although it may be a 3.4 thing. For the record, 3.4 is a very, very stable beta. Many of us have been using it for months with no issues.

See my sig for patch links.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 04, 2020, 04:02:28 PM
He didn't.  You made a yml for it.

Steven added bing for artwork searches.
Title: Re: LyricsReloaded (Updated)
Post by: phred on September 04, 2020, 04:42:52 PM
He didn't.  You made a yml for it.
I did??!! It must've been with help from you. (Thanks)

Quote
Steven added bing for artwork searches.
<sigh> I knew he did -something- with bing.

Have you considered adding bing lyrics as a provider? I can show you the YML if you're interested. :-)
Title: Re: LyricsReloaded (Updated)
Post by: RetroGameReaper on September 04, 2020, 04:51:09 PM
Code
04/09/2020 11:40:24 [INFO] Song Lyrics tries to load the lyrics...
04/09/2020 11:40:24 [DEBUG] The constructed URL: http://www.songlyrics.com/764hero/check-the-address-lyrics/
04/09/2020 11:40:24 [DEBUG] Lyrics request: 764-HERO - Check The Address - We're Solids - Teksty
04/09/2020 11:40:24 [INFO] Teksty tries to load the lyrics...
04/09/2020 11:40:24 [DEBUG] The constructed URL: http://teksty.org/764-hero,check-the-address,tekst-piosenki
04/09/2020 11:40:24 [DEBUG] Lyrics request: 764-HERO - Check The Address - We're Solids - Urban Lyrics
04/09/2020 11:40:24 [INFO] Urban Lyrics tries to load the lyrics...
04/09/2020 11:40:24 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/764hero/checktheaddress.html
04/09/2020 11:40:24 [INFO] No lyrics found.
04/09/2020 11:40:24 [DEBUG] no lyrics found from Smriti
04/09/2020 11:40:24 [INFO] No lyrics found.
04/09/2020 11:40:24 [DEBUG] no lyrics found from Oldies Lyrics
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from MetroLyrics
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from A-Z Lyrics Universe
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from Genius
04/09/2020 11:40:25 [DEBUG] gzip compression detected
04/09/2020 11:40:25 [WARN] The pattern <p\sclass="text\sclearfix">(?<lyrics>[\s\S]*?)</p> didn't match!
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from Cušpajz
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from Song Lyrics
04/09/2020 11:40:25 [DEBUG] gzip compression detected
04/09/2020 11:40:25 [DEBUG] no lyrics found from Teksty
04/09/2020 11:40:25 [DEBUG] gzip compression detected
04/09/2020 11:40:25 [WARN] The pattern <div id="div_letra"[^>]*>(?<lyrics>.*?)</div> didn't match!
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from Letras de músicas
04/09/2020 11:40:25 [DEBUG] gzip compression detected
04/09/2020 11:40:25 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)</span> didn't match!
04/09/2020 11:40:25 [INFO] No lyrics found.
04/09/2020 11:40:25 [DEBUG] no lyrics found from Musixmatch
04/09/2020 11:40:26 [DEBUG] gzip compression detected
04/09/2020 11:40:26 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)(</span>|<div[^>]*"lyrics-report") didn't match!
04/09/2020 11:40:26 [INFO] No lyrics found.
04/09/2020 11:40:26 [DEBUG] no lyrics found from Musixmatch_Asian
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Genius
04/09/2020 11:40:29 [INFO] Genius tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://genius.com/764-hero-stutter-steps-lyrics
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - MetroLyrics
04/09/2020 11:40:29 [INFO] MetroLyrics tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.metrolyrics.com/stutter-steps-lyrics-764hero.html
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Musixmatch
04/09/2020 11:40:29 [INFO] Musixmatch tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/764hero/stutter-steps
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - A-Z Lyrics Universe
04/09/2020 11:40:29 [INFO] A-Z Lyrics Universe tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.azlyrics.com/lyrics/764hero/stuttersteps.html
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Cušpajz
04/09/2020 11:40:29 [INFO] Cušpajz tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://cuspajz.com/tekstovi-pjesama/pjesma/764-hero/stutter-steps.html
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Hindi Lyrics
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Letras de músicas
04/09/2020 11:40:29 [INFO] Letras de músicas tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://letras.mus.br/764-hero/stutter-steps/
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Musixmatch_Asian
04/09/2020 11:40:29 [INFO] Musixmatch_Asian tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/764-HERO/Stutter-Steps
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Oldies Lyrics
04/09/2020 11:40:29 [INFO] Oldies Lyrics tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://oldielyrics.com/lyrics/764hero/stutter_steps.html
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Smriti
04/09/2020 11:40:29 [INFO] Smriti tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://smriti.com/hindi-songs/stutter-steps
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Song Lyrics
04/09/2020 11:40:29 [INFO] Song Lyrics tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.songlyrics.com/764hero/stutter-steps-lyrics/
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Teksty
04/09/2020 11:40:29 [INFO] Teksty tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://teksty.org/764-hero,stutter-steps,tekst-piosenki
04/09/2020 11:40:29 [DEBUG] Lyrics request: 764-HERO - Stutter Steps - We're Solids - Urban Lyrics
04/09/2020 11:40:29 [INFO] Urban Lyrics tries to load the lyrics...
04/09/2020 11:40:29 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/764hero/stuttersteps.html
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Genius
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from MetroLyrics
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Smriti
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from A-Z Lyrics Universe
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Oldies Lyrics
04/09/2020 11:40:30 [DEBUG] gzip compression detected
04/09/2020 11:40:30 [WARN] The pattern <p\sclass="text\sclearfix">(?<lyrics>[\s\S]*?)</p> didn't match!
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Cušpajz
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Song Lyrics
04/09/2020 11:40:30 [DEBUG] gzip compression detected
04/09/2020 11:40:30 [DEBUG] no lyrics found from Teksty
04/09/2020 11:40:30 [DEBUG] gzip compression detected
04/09/2020 11:40:30 [WARN] The pattern <div id="div_letra"[^>]*>(?<lyrics>.*?)</div> didn't match!
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Letras de músicas
04/09/2020 11:40:30 [DEBUG] gzip compression detected
04/09/2020 11:40:30 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)</span> didn't match!
04/09/2020 11:40:30 [INFO] No lyrics found.
04/09/2020 11:40:30 [DEBUG] no lyrics found from Musixmatch
04/09/2020 11:40:31 [DEBUG] gzip compression detected
04/09/2020 11:40:31 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)(</span>|<div[^>]*"lyrics-report") didn't match!
04/09/2020 11:40:31 [INFO] No lyrics found.
04/09/2020 11:40:31 [DEBUG] no lyrics found from Musixmatch_Asian
04/09/2020 11:49:37 [DEBUG] Lyrics request: The Blood Brothers - Jordan Billie Pets The Wild Horse’s Mane - This Adultery Is Ripe - Genius
04/09/2020 11:49:37 [INFO] Genius tries to load the lyrics...
04/09/2020 11:49:37 [DEBUG] The constructed URL: http://genius.com/the-blood-brothers-jordan-billie-pets-the-wild-horse-s-mane-lyrics
04/09/2020 11:49:37 [INFO] No lyrics found.
04/09/2020 11:49:37 [DEBUG] no lyrics found from Genius

The part that really bugs me is that lyrics that I can find if I go on Genius' site doing show up when I use it on Musicbee.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on September 04, 2020, 05:21:27 PM
OK, I see what might be happening with The Blood Brothers - Jordan Billie Pets The Wild Horse’s Mane - This Adultery Is Ripe.  What are you using in your tags for the apostrophe?

If it's not a true ascii apostrophe - ' -, I don't think it's getting replaced right.  I'm sucky at regex, but I think ' is supposed to get replaced as nothing (bringing horse's together as horses) here.
Code
- [regex, "'", ""]

If it's in your tags as ’ (not an actual apostrophe) then I think it gets replaced with a dash, which is what's happening.

The correct way to account for this is to use actual apostrophes in your tags, but I think you can probably get around this by copying the YML for genius (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/genius.com.yml) (or whatever other providers) to a local file, adding this...
Code
- [regex, "’", ""]

...to the local YML in both the artist and title sections, putting that YML into your providers folder and using that instead of the built in one.  Worth it to see if that's the actual problem, anyway.


As far as http://www.musixmatch.com/lyrics/764hero/stutter-steps, I have no idea why they strip the - character out of their URL when it's in the actual band name but put in the - character when there's a space in the actual band name.  Doesn't make sense.  The plugin is not set to strip the - character.  

I see the built-in (non plug-in) LyricWiki is in your list.  I don't know why it didn't pull lyrics from that, because that site has them (https://lyrics.fandom.com/wiki/764-Hero:Stutter_Steps), but that's not a plug-in issue.
Title: Re: LyricsReloaded (Updated)
Post by: RetroGameReaper on September 04, 2020, 08:36:08 PM
So I think the problem was mostly because of those special characters. I even got rid of
Code
 - [strip_nonascii, -]
and even the 764-HERO stuff Genius has works. I still don't understand why it won't take the stuff from LyricsWiki though. If anything, I think I'll just start using MediaHuman Lyrics Finder as my means of getting lyrics. Thank you though.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 08, 2020, 05:15:43 PM
There are providers built-into MB and providers accessible through the plugin.  You can see which providers are searched by the plugin for any given request and which returned results by viewing the plugin's log file in \%APPDATA%\Roaming\MusicBee\mb_LyricsReloaded for the installed version or wherever you have it if you've got a portable install.
Title: Re: LyricsReloaded (Updated)
Post by: Mr. Trev on October 08, 2020, 11:48:52 PM
Hey.

I was doing some disk analysis on my laptop and just found out my mb_LyricsReloaded.log file is over 3GB :o
What on earth is the plugin writing to make the log that big? - I can't even load it into an editor and check, it's that big

Do I even need to keep it?

Cheers.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 08, 2020, 11:58:34 PM
It logs every request and whether it was successful or not.  You do not need to keep it.  If you delete it (with MB closed) it will be recreated.

Make sure you're using the most recent version of the plugin.  I cut down on what gets written (less words).  I've considered stopping the logging, but it comes in handy for things like the question right before yours. 

I'm not smart enough to figure out how to programmatically flush it occasionally.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 09, 2020, 12:07:29 AM
I was doing some disk analysis on my laptop and just found out my mb_LyricsReloaded.log file is over 3GB :o
What on earth is the plugin writing to make the log that big? - I can't even load it into an editor and check, it's that big

Do I even need to keep it?

Edit:  frankz beat me to it but kept the following in case it helps:

FYI, a tiny portable app that will view text files that size and more in a jiffy is Large Text File Viewer 5.2u (https://www.portablefreeware.com/?id=693 (https://www.portablefreeware.com/?id=693)).  There's also a free Microsoft Store thing called Large Text Viewer (https://www.microsoft.com/en-us/p/large-text-viewer/9nblggh4mcm8?activetab=pivot:overviewtab (https://www.microsoft.com/en-us/p/large-text-viewer/9nblggh4mcm8?activetab=pivot:overviewtab)).
Title: Re: LyricsReloaded (Updated)
Post by: Mr. Trev on October 09, 2020, 01:53:29 AM
Thanks all.

I figured that it probably wasn't going to be an issue if I deleted it, but I just wanted to make sure.

I was using v1.1.7 of the plugin so I wasn't too horribly out of date.

I did give one of the viewers that @sveakul mentioned. The first request in the log goes back to 2018. Oddly, probably 90% of the entries are "Received a notification of type TagsChanging". Hopefully the updated plugin will stop that.

Cheers.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 09, 2020, 02:13:56 PM
I looked at the log file like you suggested and I saw that the plug-in does look for lyrics in every source until it finds something, which makes this even weirder. Why does it find a source in previously failed attempts when I change the order of providers?
I'm sorry but I don't understand what you're asking here.

Also, talking about providers, would it be possible to add LyricFind (https://www.lyricfind.com/)? The website isn't "open" per se, but it can provide lyrics through Google Search and it has been really useful when the plug-in doesn't find anything.
That website doesn't have lyrics on it.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 14, 2020, 04:11:12 PM
OK, asking what you guys think here.

I've got a pull (change) request that came in on Github for the provider azlyrics.com.  Apparently that site changed their site coding and this change is needed to match lyrics.
 A pull request is basically when a user updates the code and then asks to have their code integrated into the project.  (Thanks to whoever did this by the way). Here is the updated code.

delete this:
Code
pattern: ['<!-- start of lyrics -->(?<lyrics>.+?)<!-- end of lyrics -->', s]

and add this:
Code
pattern: ['<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->(?<lyrics>.+?)<!-- MxM banner -->', s]

Now, I'm pretty sure this is related to other websites that purport to be lyrics providers scraping and using the lyrics.  Technically, I guess, reading it very literally, the plug-in is not a "lyrics provider"  It retrieves lyrics just like a web browser would with everything else around the lyrics stripped out.

But beyond what it literally says, I'm trying to decide if the spirit of the warning is that the plug-in should not be using az as a source any longer.  I don't want to retrieve their lyrics if they don't want their lyrics retrieved this way - if they just want people going to their web site to get them.  That's their content.

The inner debate I'm having is whether the plug-in is a "third party" or whether the end-user using the plug-in is a "second party" no matter how they get the lyrics.

So what does everyone think?

My options are to:
1. Leave it broken and anyone who wants to make a YML for themselves to make it work can use the code above to do that just like any other source.
2. Update it and make it work - maybe or maybe not against their wishes
3. Delete the source and anyone who wants to make a YML for themselves to make it work can use the code above to do that just like any other source.

I'm inclined to delete the source to be on the safe side.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 14, 2020, 04:20:25 PM
I'm inclined to delete the source to be on the safe side.
I'm inclined to agree with you. Especially since it's a gray area as to who is violating the copyright - you as the creator of the plugin, or the user of the plugin.

The thing you don't want is to get a digital rights copyright infringement letter from your ISP. Or your ever-so-friendly government watchdog agency.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 14, 2020, 04:26:36 PM
I'm inclined to delete the source to be on the safe side.
I'm inclined to agree with you. Especially since it's a gray area as to who is violating the copyright - you as the creator of the plugin, or the user of the plugin.

The thing you don't want is to get a digital rights copyright infringement letter from your ISP. Or your ever-so-friendly government watchdog agency.
The good thing now is that it's broken, so no one is violating anything!  :D
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 14, 2020, 04:41:00 PM
So what does everyone think?

I would guess it is not the website who is the owner and has copyrights on the lyrics, but the artist.
If there are any legal battles (to be) fought, I would guess it will be the artist/his record label against the lyrics websites.

So I would assume there is hardly any risk in updating the plugin. After all, it has been working for a long time now, and there have been no complaints from any lyrics providers as far as I can tell?
I can imagine that if AZL gets a lot of traffic that they don't like, and they are able to see that it is done by MB users, they could try some blocking, or perhaps make contact and ask for having the plugin removed.
And if a friendly or a non-profit organisation would ask that it should obviously be respected.

But the most important thing is to avoid MB getting in trouble.
Perhaps send bossman a PM about it and see what he thinks?

edit,
To start off on the safe side, perhaps set a limitation to how frequently lyrics can be retrieved by MB?
E.g. a one or two minute period, so that it is impossible for a user to fetch 60 lyrics per minute?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 14, 2020, 05:01:57 PM
OK, so new wrinkle is that I went to their website to try to look at this agreement and got a "we've noticed unusual activity from your IP address check here to prove you're not a robot" box.  I've never been to their site directly before today.  

It's doubtful that even corrected it would work for anyone for long, because apparently the plugin is considered unusual activity and you (i.e. the plugin) can't get to the site without checking that box anyway, so I'm going to delete it as a source that can be selected in the plugin.

I will leave the YML as part of the package in Github with the correction made that the user submitted and if anyone wants to download that and use it on their own that's their business even though I doubt it will work.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 14, 2020, 05:16:56 PM
I've never been to their site directly before today.  

Strange. So the plugin testing went well (more than once I assume), but only when you used your web browser you had to perform a bot-check?

Either very accidental, or they are not able or willing to block how the plugin communicates with them, or it was not specifically your IP, but you are in a block of IP numbers range where there has been suspect or high-volume activity. (I have experienced that more than once myself)

It's obviously your decision, but I wouldn't like to be scared too much by an organisation that makes money themselves by harvesting and sharing the fruits of other peoples labour.

They even publicly promote the amount of traffic they have, only to sell advertisements and make money:
https://www.azlyrics.com/adv.html

Let's help them! More traffic, more money for them, more money for the artists that sue them ;-)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 14, 2020, 05:32:46 PM
It's obviously your decision, but I wouldn't like to be scared too much by an organisation that makes money themselves by harvesting and sharing the fruits of other peoples labour.

They even publicly promote the amount of traffic they have, only to sell advertisements and make money:
https://www.azlyrics.com/adv.html
It says at the bottom of the site that they license their lyrics from MusixMatch, which is still a provider, so I don't think anyone is losing anything by deleting the source.

I've updated the plug-in and the OP.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 14, 2020, 06:18:12 PM
For anyone who still wants to get lyrics from AZ Lyrics simply set up a custom web link (Preferences > Internet) using this link:
https://search.azlyrics.com/search.php?q=$Replace($First(<Artist>),&,and)+$Split(<Title>,"(",1)

I've never had it take me directly to the requested lyrics, but it does bring up a list of links based on <artist> and <title>. Then it's a matter of copying and pasting. Certainly not as elegant as having the lyrics deposited directly into the file, but this works.
Title: Re: LyricsReloaded (Updated)
Post by: SamS on October 18, 2020, 09:59:26 PM
Agree would be nice to load directly to file.  However, this method works, is simple and, for me, quick.  THANKS for posting.
Title: Re: LyricsReloaded (Updated)
Post by: heyman111 on October 24, 2020, 07:00:31 PM
Is this working well for you guys? I was recommended this yesterday and I've tried it out. It works only about 30% of the time for me, and my metadata on my songs are all 100% correct. For instance, "Tell Your Friends" by The Weeknd should've been picked up without problems, but it finds no lyrics: (https://media.discordapp.net/attachments/742820268569002114/769621181426040872/unknown.png)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 24, 2020, 07:02:26 PM
Did you enable the additional providers in your MB settings?
Title: Re: LyricsReloaded (Updated)
Post by: heyman111 on October 24, 2020, 07:26:16 PM
Did you enable the additional providers in your MB settings?

I only want to use Genius (even if it doesn't find any) so this is what I have on my settings:
(https://media.discordapp.net/attachments/742820268569002114/769627719066845194/unknown.png)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 24, 2020, 08:07:10 PM
That looks right you should look in the plug-in's log file in your AppData folder (the exact file location is in this thread I don't have it right now) and see what URL the plug-in is constructing for this search and then see if it matches the actual URL for the lyrics on genius (assuming they're there).  Also look for any other indication why it's not pulling them down.  It's possible they changed something.

EDIT: Uh oh.  Looks like they changed the format of their lyrics, at least when there are a lot of notes. Still starts with song_body-lyrics so something should happen though.
Title: Re: LyricsReloaded (Updated)
Post by: heyman111 on October 24, 2020, 09:42:35 PM
That looks right you should look in the plug-in's log file in your AppData folder (the exact file location is in this thread I don't have it right now) and see what URL the plug-in is constructing for this search and then see if it matches the actual URL for the lyrics on genius (assuming they're there).  Also look for any other indication why it's not pulling them down.  It's possible they changed something.

EDIT: Uh oh.  Looks like they changed the format of their lyrics, at least when there are a lot of notes. Still starts with song_body-lyrics so something should happen though.

Yeah I picked The Weeknd because he's the most mainstream artist I have, and all his lyrics are on genius. Here is the log file when I try to play "Can't Feel My Face":
Quote
24-10-2020 10:41:03 [DEBUG] Lyrics request: The Weeknd - Can't Feel My Face - Beauty Behind the Madness - Genius
24-10-2020 10:41:03 [INFO] Genius tries to load the lyrics...
24-10-2020 10:41:03 [DEBUG] The constructed URL: http://genius.com/the-weeknd-cant-feel-my-face-lyrics
24-10-2020 10:41:07 [DEBUG] gzip compression detected
24-10-2020 10:41:07 [WARN] The pattern <div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p> didn't match!
24-10-2020 10:41:07 [INFO] No lyrics found.
24-10-2020 10:41:07 [DEBUG] no lyrics found from Genius
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 24, 2020, 10:46:10 PM
Hmm...this is not good.  I think if I change the match pattern from this:
Code
pattern: ['<div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p>', s]

...to this...
Code
pattern: ['<div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?(?<div\s+class="lyrics">[\s\S]*?)</div>', s]

...or something, then I can probably get rid of the error, but I don't think with everything that's going on around the actual text of the lyrics it'll work anyway.

Here's everything that happens between when it hits the match pattern and when the text of the lyrics starts

Code
    <div class="song_body-lyrics">
      
        <h2 class="text_label text_label--gray text_label--x_small_text_size u-top_margin">Tell Your Friends Lyrics</h2>
      
      <div initial-content-for="lyrics">
        <div class="lyrics">
          
            <!--sse-->
            <p><a href="/The-weeknd-tell-your-friends-lyrics#note-7670658" data-id="7670658" class="referent" ng-click="open()" ng-class="{
          'referent--linked_to_preview': song_ctrl.referent_has_preview(fragment_id),
          'referent--linked_to_preview_active': song_ctrl.highlight_preview_referent(fragment_element_id),
          'referent--purple_indicator': song_ctrl.show_preview_referent_indicator(fragment_element_id)
        }" prevent-default-click="" annotation-fragment="7670658" on-hover-with-no-digest="set_current_hover_and_digest(hover ? fragment_id : undefined)" classification="accepted" image="false" pending-editorial-actions-count="0">

Every line or block of text has that kind of mess in it.

Genius may be hosed unless anyone has any ideas.  Here's are the filters for it.

Code
post-filters:
- strip_html
- clean_spaces
- utf8_encode
- [regex, 'googletag.*\);', "\n"]
- [regex, '\[.{1,75}\]', ""]
- [regex, "’", "'"]
- [replace, "\n\n", "\n"]
- trim

It might be possible, but if it is, it's beyond my abilities to figure the RegEx out.  It took every working cell in my brain to come up with this to strip the section headers.  :)

Code
- [regex, '\[.{1,75}\]', ""]
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 25, 2020, 03:35:00 AM
Man that's a drag all right, Genius produced the vast majority of my hits from available providers.  Can ANYONE please help frankz (and therefore ALL of us) out with this??
Title: Re: LyricsReloaded (Updated)
Post by: Steven on October 25, 2020, 07:54:26 AM
I have used the following in the past to strip out html tags in case it helps with this issue
Code
Regex.Replace(value, "<.*?>", "")
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 25, 2020, 08:07:48 AM
That might be what "- strip_html" does.  I'll try to update the match and test it locally to see what happens.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 25, 2020, 02:06:25 PM
Pretty sure I got it licked!  Thanks to Steven for putting me in the right direction and to biggy_wayn for noticing the problem.  Updating the OP now, new version is already on Github.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 25, 2020, 03:12:31 PM
Updating the OP now, new version is already on Github.
And thanks to you for getting the fix out there so quickly.
Title: Re: LyricsReloaded (Updated)
Post by: heyman111 on October 25, 2020, 03:44:48 PM
Works now, excellent job Frankz and Steven. This plugin will save me hours of time.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 25, 2020, 04:30:39 PM
Glad I could fix it rather than delete it.  The original plugin author had already scripted the strip html thing but it took a shove in the right direction from Steven for me to open my eyes and actually see it. 
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 25, 2020, 05:40:03 PM
Thanks frankz, we're back in business!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 25, 2020, 06:17:15 PM
Not a problem. My hurdle was getting out of my comfort zone for a few minutes to experiment.
Title: Re: LyricsReloaded (Updated)
Post by: lucytea on October 28, 2020, 11:34:48 AM
Hi, new here.
I've noticed that when this plugin fetches lyrics from Genius it seems to strip the paragraph breaks, then convert the [labels] to paragraph breaks.
Is this something that could possibly be made configurable? I think it would be more readable the way Genius presents it.
Apologies if this isn't viable, thanks for the cool plugin anyway.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 28, 2020, 12:45:54 PM
I take them out because they're not lyrics.  

Every provider is configurable.  Search the thread this has been asked and answered before (https://getmusicbee.com/forum/index.php?topic=25406.msg173902;topicseen#msg173902). Create a second (differently named) YML for Genius and take out the line referenced in that post, then use that one instead of the one built into the plugin.
Title: Re: LyricsReloaded (Updated)
Post by: lucytea on October 28, 2020, 02:57:50 PM
Sorry for that, thanks for linking the answer anyway.
To be clear, the initial stripping of paragraph breaks is just as big a problem for me - some lyrics don't have any [labels], and this process leaves them without any paragraph breaks at all. Other songs still have more breaks than [labels] so the formatting is not very good.
I should be able to handle this from here though, thanks for the link.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 28, 2020, 03:03:33 PM
To be clear, the only thing I stripped was things that showed up wrapped in [] like Verse 1, Chorus, etc.  That entry is taken out and replaced with a blank line. Then the \n\n -> \n replacement takes the double breaks that creates and makes them a single break.  There's nothing else that that would take out line breaks.
Title: Re: LyricsReloaded (Updated)
Post by: lucytea on October 28, 2020, 05:00:13 PM
Then the \n\n -> \n replacement takes the double breaks that creates and makes them a single break.
Ok, this is the issue. A regular line of text will already end with \n, so if there's a line of text followed by a single empty line, this will remove the single line. The aim is to remove double empty lines left by removing the [labels], so the replacement should instead be \n\n\n -> \n\n
I've already tested this as fixing my case, and behaving properly in lyrics with a mix of labelled and unlabelled empty lines.
Perhaps instead of exactly three \n it should be three or more, though?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 28, 2020, 06:58:31 PM
Ok, this is the issue. A regular line of text will already end with \n, so if there's a line of text followed by a single empty line, this will remove the single line. The aim is to remove double empty lines left by removing the [labels], so the replacement should instead be \n\n\n -> \n\n
I've already tested this as fixing my case, and behaving properly in lyrics with a mix of labelled and unlabelled empty lines.
Perhaps instead of exactly three \n it should be three or more, though?
The \n\n to \n replacement and trim command were user submissions from here (https://getmusicbee.com/forum/index.php?topic=25406.msg173902;topicseen#msg173902). I don't obsess over line spacing one way or the other - if the words are there and I can look at them then I personally don't need it to look any certain way - but I tested it and saw that it worked and figured it would be useful so I put it in.  I'm not seeing any problem such as you describe with the spacing, but as I said I'm not really looking for one either.

Rather than go back and forth with \n\n to \n, or \n\n\n to \n\n, or however many \ns the next person thinks should or shouldn't be there, I'm inclined to either leave it replacing the way it is or remove the replacement completely and live with the two blank lines between sections that ShotgunStev3 noted earlier.

Again, the plug-in is built so that any provider file can be copied locally, modified to taste, and then inserted into the provider list.  You'd just want to disable the built in one and enable the modified local one.

To be clear, the only thing I stripped was things that showed up wrapped in [] like Verse 1, Chorus, etc.  That entry is taken out and replaced with a blank line.
I think I said this wrong in that reply.  It just takes out the [.....] and replaces it with nothing, not a blank line.  The blank line is formed by the \n that's already there.  The change the other user made was to account for the space left, not an extra blank line created by the replacement.
Title: Re: LyricsReloaded (Updated)
Post by: lucytea on October 29, 2020, 12:57:11 AM
The current /n/n -> /n replacement causes issues when lyrics are formatted something like this:
Code
[chorus]
Line 1
Line 2

Line 3
Line 4

[bridge]
Line 5
Line 6

Line 7
Line 8
The current setup will transform that to this:
Code
Line 1
Line 2
Line 3
Line 4

Line 5
Line 6
Line 7
Line 8
My change will convert it to this:
Code
Line 1
Line 2

Line 3
Line 4

Line 5
Line 6

Line 7
Line 8
Note that between the "2" and the "L" there are two \n in the source text, since all lines end with one.
It does seem a bit subjective - or even better the original way - with such a tiny example, but this sucks when you encounter it in the wild.
When there is a double empty line and thus three \n in a row, this behaves the same as the original version. So it's a small change, but really helpful for the readability of songs that have no or very few of these [labels].
If examples are useful, then here are some lyrics I've seen have this issue. One (https://genius.com/Bombay-bicycle-club-dust-on-the-ground-lyrics) Two (https://genius.com/Go-child-telescope-lyrics).
The downside is it'll do less compacting if for some reason some lyrics have many more newlines in a row, which is why I pondered about capturing 3+ \n instead of strictly 3. This hasn't seemed necessary in my testing - the only occasion I saw with extra lines was when the lyrics were actually broken and needed manual attention.

Of course you're right that I can fix it myself and I've done so, thanks for including that feature. So this is the last I'll post of it. I do hope you'll consider including this change since it's an important readability improvement in my eyes, and brings the actual behaviour closer to how you described it - it "takes the double breaks that creates and makes them a single break". With this spacing fixed I've even conceded that you're right about the [labels], I don't need them at all.
Thanks for your work and time.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 29, 2020, 04:26:46 AM
Of course you're right that I can fix it myself and I've done so, thanks for including that feature.
All of the credit for that goes to the plug-in's original author.

As I said, I'm not someone who cares about line spacing almost at all.  I know, though, that on the other end are folks who will obsess over and be legitimately bothered by a button being one pixel to the left or right of where it should be, and I want to respect both outlooks and have the plug-in work the best that it can for everyone.  If you use this over a period of time and notice that it provides a clear benefit over what's there now, I will adopt it assuming there are no objections otherwise.  

I just don't want to get in a position where I'm changing this line for this user and then 6 months later changing it to something else for another user and then 6 months after that changing it back for a third user.  I feel like the easy customization / personalization is much better suited for those kinds of changes than a wholesale built-in change is.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 29, 2020, 01:30:06 PM
I just don't want to get in a position where I'm changing this line for this user and then 6 months later changing it to something else for another user and then 6 months after that changing it back for a third user.  I feel like the easy customization / personalization is much better suited for those kinds of changes than a wholesale built-in change is.
Basically different strokes for different folks. I agree with you 100%. If the plugin didn't have the ability for an end user to customize to their liking, then I might feel differently. But since it's available, each user can make it their own. Perhaps with a little guidance from you, but unless you get a cascade of requests for the same customization, the user can do it.

I still think this is the second most useful plugin for MB. (Boroda's Additional Tagging & Reporting Tools is the first.)
Title: Re: LyricsReloaded (Updated)
Post by: Comtezero on December 09, 2020, 09:22:06 AM
Hi !

I use this plugin, very nice one, but sometimes I get the error "gzip compression detected" and the lyrics are not found, while the URL take me to the lyrics.

See the following example, the Genius lyrics are there but still it says not found.

09/12/2020 10:07:11 [DEBUG] Lyrics request: Neal Morse - Warmer Than the Sunshine - Sola Gratia - Genius
09/12/2020 10:07:11 [INFO] Genius tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://genius.com/neal-morse-warmer-than-the-sunshine-lyrics
09/12/2020 10:07:11 [DEBUG] Lyrics request: Neal Morse - Warmer Than the Sunshine - Sola Gratia - MetroLyrics
09/12/2020 10:07:11 [INFO] MetroLyrics tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://www.metrolyrics.com/warmer-than-the-sunshine-lyrics-neal-morse.html
09/12/2020 10:07:11 [DEBUG] Lyrics request: Neal Morse - Warmer Than the Sunshine - Sola Gratia - Musixmatch
09/12/2020 10:07:11 [INFO] Musixmatch tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/neal-morse/warmer-than-the-sunshine
09/12/2020 10:07:11 [DEBUG] Lyrics request: Neal Morse - Warmer Than the Sunshine - Sola Gratia - Urban Lyrics
09/12/2020 10:07:11 [INFO] Urban Lyrics tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/nealmorse/warmerthanthesunshine.html
09/12/2020 10:07:11 [DEBUG] Lyrics request: Neal Morse - Warmer Than the Sunshine - Sola Gratia - A-Z Lyrics Universe
09/12/2020 10:07:11 [INFO] A-Z Lyrics Universe tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://www.azlyrics.com/lyrics/nealmorse/warmerthanthesunshine.html
09/12/2020 10:07:11 [INFO] No lyrics found.
09/12/2020 10:07:11 [DEBUG] no lyrics found from A-Z Lyrics Universe
09/12/2020 10:07:11 [DEBUG] gzip compression detected
09/12/2020 10:07:11 [WARN] The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
09/12/2020 10:07:11 [INFO] No lyrics found.
09/12/2020 10:07:11 [DEBUG] no lyrics found from MetroLyrics
09/12/2020 10:07:12 [DEBUG] gzip compression detected
09/12/2020 10:07:12 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)</span> didn't match!
09/12/2020 10:07:12 [INFO] No lyrics found.
09/12/2020 10:07:12 [DEBUG] no lyrics found from Musixmatch
09/12/2020 10:07:12 [DEBUG] gzip compression detected
09/12/2020 10:07:12 [WARN] The pattern <div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p> didn't match!
09/12/2020 10:07:12 [INFO] No lyrics found.
09/12/2020 10:07:12 [DEBUG] no lyrics found from Genius
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 09, 2020, 12:46:34 PM
"gzip compression detected" is not an error or even a warning.  It is a bit of information.

Update (overwrite) your DLL for the plugin (with musicbee closed) with the new from the first post, as the Genius problem has been addressed.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 12:48:47 PM
09/12/2020 10:07:11 [INFO] A-Z Lyrics Universe tries to load the lyrics...
09/12/2020 10:07:11 [DEBUG] The constructed URL: http://www.azlyrics.com/lyrics/nealmorse/warmerthanthesunshine.html
09/12/2020 10:07:11 [INFO] No lyrics found.
09/12/2020 10:07:11 [DEBUG] no lyrics found from A-Z Lyrics Universe
09/12/2020 10:07:11 [DEBUG] gzip compression detected
09/12/2020 10:07:11 [WARN] The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
09/12/2020 10:07:11 [INFO] No lyrics found.
Most often than not, AZ Lyrics is using a Captcha before allowing the user to see lyrics. I can't speak about the other errors you're seeing.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 09, 2020, 12:52:16 PM
Most often than not, AZ Lyrics is using a Captcha before allowing the user to see lyrics. I can't speak about the other errors you're seeing.

A to Z Lyrics Universe isn't even a provider in the plugin any more.  I removed it two versions ago.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 12:58:47 PM
A to Z Lyrics Universe isn't even a provider in the plugin any more.  I removed it two versions ago.
And the reason you suggested that the OP update.

But (I believe) AZLyrics is and when searching manually, it throws the Captcha
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 09, 2020, 01:03:34 PM
These are the current providers:

Cušpajz
Genius
Letras de músicas
Metrolyrics
Musixmatch_Asian
Musixmatch
Oldies Lyrics
Smriti
Song Lyrics
Teksty
Urban Lyrics
Hindi Lyrics
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 01:09:00 PM
Thanks for the providers list. I'm assuming that AZ is built in the MB, correct? I checked my providers directory and bing is the only yml that's active. I have (had) AZ there, but changed the file extension to .OLD yet it is still appearing in Tags (2) Settings for lyrics.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 09, 2020, 01:11:38 PM
I do not have that provider in my MB list of lyrics providers.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 01:32:05 PM
I do not have that provider in my MB list of lyrics providers.
Meaning in the plug-in, or showing in Tags (2)
(http://i.imgur.com/URa804Hl.jpg) (https://i.imgur.com/URa804H.jpg)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 09, 2020, 01:47:46 PM
In Tags(2).  It's not there.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 01:57:15 PM
In Tags(2).  It's not there.
Well --- that makes this somewhat of a mystery, eh?
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 09, 2020, 08:48:03 PM
In Tags(2).  It's not there.
Well --- that makes this somewhat of a mystery, eh?

phred, do you have the old, no-longer-supported "Lyrics Fetcher" (mb_LyricsPlugin.dll) that Steven made installed?  That has AZLyrics, and 5 will get you 10 that's why it's still in your list.

Lyrics Fetcher had :

AZ Lyrics
Dark Lyrics
Lyrics123
Lyrics Time
PLyrics
RapGenius
SongMeanings
UrbanLyrics (dupe with the built-in one)

ALL of those are now broken except for one--I believe it is RapGenius.  I sure hope someone with the chops (i.e. not me) can add a working DarkLyrics or Metal-Archives plugin someday.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 09, 2020, 09:11:38 PM
phred, do you have the old, no-longer-supported "Lyrics Fetcher" (mb_LyricsPlugin.dll) that Steven made installed?  That has AZLyrics, and 5 will get you 10 that's why it's still in your list.
ALL of those are now broken except for one--I believe it is RapGenius.  I sure hope someone with the chops (i.e. not me) can add a working DarkLyrics or Metal-Archives plugin someday.
Nice catch sweakul. Yep, It's installed. Or was installed. I've deleted it now since the only one that's still working is one I have no (or very, very little) need for.
Thanks.
Title: Re: LyricsReloaded (Updated)
Post by: Palt on December 13, 2020, 05:55:15 PM
None of the lyric providers work
At least not properly, sometimes Chartlyrics gives lyrics, but they're pretty much always wrong
idk why
I have the latest version of both this and MusicBee
:(
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 13, 2020, 06:03:34 PM
Exactly how are you trying to use the plugin? (Step-by-step, please.)
Is the plugin installed properly?
Do you have an internet connection?
Have you looked at the Error Log for MB? (help > View Error Log)
Have you looked at the log for the plugin? (\MusicBee\AppData\mb_LyricsReloaded\mb_LyricsReloaded.log)
Title: Re: LyricsReloaded (Updated)
Post by: Palt on December 13, 2020, 06:23:18 PM
Exactly how are you trying to use the plugin? (Step-by-step, please.)
Is the plugin installed properly?
Do you have an internet connection?
Have you looked at the Error Log for MB? (help > View Error Log)
Have you looked at the log for the plugin? (\MusicBee\AppData\mb_LyricsReloaded\mb_LyricsReloaded.log)


Put the plugin in the plugin folder
Yes
Yes
Nothing there
Says it finds the lyrics, but then says this
> The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
So that'll be the problem, i suppose
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 13, 2020, 07:10:44 PM
It looks like metrolyrics changed their format.  When I get time I will update the plugin.  It's going to be a while.

In the meantime you can create your own YML for metrolyrics in the providers folder by copying the source (https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/metrolyrics.com.yml) and using it instead.

I think this will work, but I haven't tested it and can't right now.

Replace:
Code
pattern: ['<div id="lyrics-body">(?<lyrics>.*?)</div>', s]

With:
Code
pattern: ['<div id="lyrics-body-text" class="js-lyric-text">(?<lyrics>.*?)</div>', s]

If it doesn't work and you can come up with something that does, please post it.

That doesn't explain why "none" of the other sources in MB and in the plugin work for you, though.
Title: Re: LyricsReloaded (Updated)
Post by: Palt on December 13, 2020, 09:36:28 PM
it's actually musixmatch that gives that error
the other ones clearly show they've found the song, then says "x tries to load the lyrics..." and then just starts with the next one without any error message
like this
Code
13/12/2020 06:23:49 [DEBUG] Lyrics request: Amon Amarth - Under Siege - Deceiver Of The Gods - Genius
13/12/2020 06:23:49 [INFO] Genius tries to load the lyrics...
13/12/2020 06:23:49 [DEBUG] The constructed URL: http://genius.com/amon-amarth-under-siege-lyrics
13/12/2020 06:23:49 [DEBUG] Lyrics request: Amon Amarth - Under Siege - Deceiver Of The Gods - MetroLyrics
13/12/2020 06:23:49 [INFO] MetroLyrics tries to load the lyrics...
13/12/2020 06:23:49 [DEBUG] The constructed URL: http://www.metrolyrics.com/under-siege-lyrics-amon-amarth.html
13/12/2020 06:23:49 [DEBUG] Lyrics request: Amon Amarth - Under Siege - Deceiver Of The Gods - Musixmatch
13/12/2020 06:23:49 [INFO] Musixmatch tries to load the lyrics...
13/12/2020 06:23:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/amon-amarth/under-siege
13/12/2020 06:23:49 [DEBUG] gzip compression detected
13/12/2020 06:23:49 [WARN] The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
13/12/2020 06:23:49 [INFO] No lyrics found.
13/12/2020 06:23:49 [DEBUG] no lyrics found from MetroLyrics
13/12/2020 06:23:49 [DEBUG] gzip compression detected
13/12/2020 06:23:49 [DEBUG] lyrics found from Musixmatch!
13/12/2020 06:24:05 [DEBUG] Lyrics request: Amon Amarth - Under Siege - Deceiver Of The Gods - Musixmatch
13/12/2020 06:24:05 [INFO] Musixmatch tries to load the lyrics...
13/12/2020 06:24:05 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/amon-amarth/under-siege
13/12/2020 06:24:05 [DEBUG] Lyrics request: Amon Amarth - Under Siege - Deceiver Of The Gods - Genius
13/12/2020 06:24:05 [INFO] Genius tries to load the lyrics...
13/12/2020 06:24:05 [DEBUG] The constructed URL: http://genius.com/amon-amarth-under-siege-lyrics
Et cetera
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 13, 2020, 10:15:45 PM
It's not Musixmatch that gives the error.  Musixmatch uses a different pattern.  The message are sequential according to time received, not in order of service.  The error is actually from what I said the error is from.

There's no reason why you shouldn't have gotten lyrics from this song from either Musixmatch or Genius as they both have them and they're located at the URL where the plugin thinks they are.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 13, 2020, 10:31:48 PM
@OP: Actually, it's not MusixMatch, that works fine.  Did some actual testing with only that source selected, and after flushing the Lyrics folder cache.  Quickly returned lyrics for Porcupine Tree's "Even Less."

Same test:  the bulit-in Metrolyrics really was broken--no results.  Downloaded and revised the metrolyrics.com.yml acc. to frankz's instructions, and this DOES work again (thanks!), but seems to return only the first part of the lyrics, bracketed with "<!--First Section-->" on top, and "<!--WIDGET - RELATED--> Related" at the bottom.  Example below (Wishbone Ash's "Number the Brave"):

<!-- First Section -->
In another time and space
(..first verse of lyrics continue)
For they died for you.
<!--WIDGET - RELATED-->
Related

@Frankz I realize that's just a tuning issue for later.  Wanted to add though that when I added the mod yml to the Providers folder, there was NOT a double entry for Metrolyrics despite the warning in your first post "If you have custom yml files in your \providers\ folders for any of the above, that provider will show up twice in Edit->Edit Preferences->Tags(2)."  Instead it shows the one entry and started using the custom yml--actually "preferred" behavior!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 13, 2020, 10:37:45 PM
I think Metro might have defeated the plugin by splitting the songs by section.  The plugin can't dip in and out picking up sections here and there.  It starts at the pattern and goes until it finds the last thing in the pattern (</div> in this case).  Since they div in and out, this may not be fixable.  Let me think about it.  I've got a lot going on.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 13, 2020, 11:11:04 PM
frankz that's cool.

BTW, I noticed that when lyrics are found, and then the window right-clicked and "Search Next Provider" selected, past behavior was that if another one of the plugin's sources had the lyrics also, those would then be displayed.  Now, after doing that you just get "No lyrics found", even when more than one source definitely has the lyrics.  For example, Switchblade Symphony's "Clown", or Suzi Quatro's "Devil Gate Drive" both immediately find lyrics at Genius (first on my list), but when "Search Next Provider" is done nothing is found, even though MusixMatch has those lyrics also (and will display them if the genius source is un-checked when search is begun).  Is that happening by design?  Newest version of LRU and MB.  Maybe I'm recalling that from when more of the MB built-in sources were active and maybe "Next provider" was actually jumping over LRU?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 13, 2020, 11:41:43 PM
I haven't changed anything besides adding / editing / deleting providers in a very very long time.  Certainly nothing related to the guts of how the plugin interacts with MB (because I don't know how).

I think MB treats the plug-in as one provider and then the plugin does what it does internally.  I'm inclined to believe it's always been that way.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 14, 2020, 01:36:56 AM
Thanks!  That choice must be looking outside the LRU plugin then, as you suggested.
Title: Re: LyricsReloaded (Updated)
Post by: Comtezero on December 16, 2020, 03:37:13 PM
Hi !
I'm now on the last version of the plugin.
I got a little problem with some lyrics
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Genius
16/12/2020 04:31:21 [INFO] Genius tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://genius.com/pain-of-salvation-unfuture-lyrics
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Musixmatch
16/12/2020 04:31:21 [INFO] Musixmatch tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/pain-of-salvation/unfuture
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Cušpajz
16/12/2020 04:31:21 [INFO] Cušpajz tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://cuspajz.com/tekstovi-pjesama/pjesma/pain-of-salvation/unfuture.html
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Hindi Lyrics
16/12/2020 04:31:21 [INFO] Hindi Lyrics tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.hindilyrics.net/lyrics/of-Unfuture.html
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Letras de músicas
16/12/2020 04:31:21 [INFO] Letras de músicas tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://letras.mus.br/pain-of-salvation/unfuture/
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - MetroLyrics
16/12/2020 04:31:21 [INFO] MetroLyrics tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.metrolyrics.com/unfuture-lyrics-pain-of-salvation.html
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Musixmatch_Asian
16/12/2020 04:31:21 [INFO] Musixmatch_Asian tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/Pain-of-Salvation/Unfuture
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Oldies Lyrics
16/12/2020 04:31:21 [INFO] Oldies Lyrics tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://oldielyrics.com/lyrics/pain_of_salvation/unfuture.html
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Smriti
16/12/2020 04:31:21 [INFO] Smriti tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://smriti.com/hindi-songs/unfuture
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Song Lyrics
16/12/2020 04:31:21 [INFO] Song Lyrics tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.songlyrics.com/pain-of-salvation/unfuture-lyrics/
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Teksty
16/12/2020 04:31:21 [INFO] Teksty tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://teksty.org/pain-of-salvation,unfuture,tekst-piosenki
16/12/2020 04:31:21 [DEBUG] Lyrics request: Pain of Salvation - Unfuture - Panther - Urban Lyrics
16/12/2020 04:31:21 [INFO] Urban Lyrics tries to load the lyrics...
16/12/2020 04:31:21 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/painofsalvation/unfuture.html
16/12/2020 04:31:21 [INFO] No lyrics found.
16/12/2020 04:31:21 [DEBUG] no lyrics found from Smriti
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:21 [WARN] The pattern <font face="verdana">(?<lyrics>.*?)</font> didn't match!
16/12/2020 04:31:21 [INFO] No lyrics found.
16/12/2020 04:31:21 [DEBUG] no lyrics found from Hindi Lyrics
16/12/2020 04:31:21 [WARN] The pattern <p\sclass="text\sclearfix">(?<lyrics>[\s\S]*?)</p> didn't match!
16/12/2020 04:31:21 [INFO] No lyrics found.
16/12/2020 04:31:21 [DEBUG] no lyrics found from Cušpajz
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:21 [WARN] The pattern <div\s+class="songText"[^>]*>(?<lyrics>.*?)</div> didn't match!
16/12/2020 04:31:21 [INFO] No lyrics found.
16/12/2020 04:31:21 [DEBUG] no lyrics found from Teksty
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:21 [WARN] The pattern <div id="lyrics-body">(?<lyrics>.*?)</div> didn't match!
16/12/2020 04:31:21 [INFO] No lyrics found.
16/12/2020 04:31:21 [DEBUG] no lyrics found from MetroLyrics
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:21 [DEBUG] gzip compression detected
16/12/2020 04:31:22 [INFO] No lyrics found.
16/12/2020 04:31:22 [DEBUG] no lyrics found from Oldies Lyrics
16/12/2020 04:31:22 [DEBUG] lyrics found from Musixmatch!
16/12/2020 04:31:22 [DEBUG] lyrics found from Musixmatch_Asian!
16/12/2020 04:31:22 [INFO] No lyrics found.
16/12/2020 04:31:22 [DEBUG] no lyrics found from Song Lyrics
16/12/2020 04:31:22 [DEBUG] gzip compression detected
16/12/2020 04:31:22 [WARN] The pattern <div id="div_letra"[^>]*>(?<lyrics>.*?)</div> didn't match!
16/12/2020 04:31:22 [INFO] No lyrics found.
16/12/2020 04:31:22 [DEBUG] no lyrics found from Letras de músicas
16/12/2020 04:31:22 [DEBUG] gzip compression detected
16/12/2020 04:31:22 [WARN] The pattern <div class="lyrics">(?<lyrics>[\s\S]*?)</div> didn't match!
16/12/2020 04:31:22 [INFO] No lyrics found.
16/12/2020 04:31:22 [DEBUG] no lyrics found from Genius

As you can see http://genius.com/pain-of-salvation-unfuture-lyrics get me to the lyrics but it seems the plugin doesnt find them.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 16, 2020, 04:27:58 PM
I do not know why that would be.  I have just tested Genius from here and it works just fine.  Maybe there's some regional difference to the way Genius presents their pages?  I don't know.

When you view source on the lyrics page and see this...
Code
        <div class="lyrics">
          
            <!--sse-->

...then the pattern matches.  Looking here, it's there on the page you provided.  If it's different where you are (total speculation as to the reason) then Genius will never match the lyrics and you'll have to create a custom YML that matches what you see at the start of the plain text lyrics.

If it's not working consistently for you, I'd suggest moving one of the other providers that does work higher in the list.  It seems Musixmatch also found lyrics for this song.
Title: Re: LyricsReloaded (Updated)
Post by: Comtezero on December 16, 2020, 04:41:53 PM
https://imgur.com/a/2VWW5hr

here you go, you can see the html
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 16, 2020, 05:17:08 PM
the start of the plain text lyrics.
Title: Re: LyricsReloaded (Updated)
Post by: Comtezero on December 16, 2020, 05:38:57 PM
https://imgur.com/a/dVjrV9F

here, it's inside the multiple div with class "Lyrics__Container..."
So there's like one verse inside the first one, one into the second one and so on...
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 16, 2020, 05:45:37 PM
I'm sorry, I don't know any other way to express "View Source" or "Plain Text Lyrics"

(https://i.imgur.com/zvzC7S7.jpg)

Like I said, if it's different where you are, though, you will have to create a custom YML to handle your specific situation.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 29, 2020, 04:15:20 PM
I am confused:
Setting up a clean install I thought to try out what results the different providers give for a selection of tracks in my library so I could decide on enabling/priorities for the available providers.
So I thought to enable only one provider at a time and see what results they give.

But after trying the third one I noticed the results were exactly the same for all three providers I had tried.
The same songs got lyrics, the same ones didn't get lyrics, and the same ones got wrong lyrics.

Am I doing something wrong or am I misunderstanding something?
Or maybe a coincidence, and should I try them all one by one?

(https://i.imgur.com/XCshejt.png)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 29, 2020, 04:25:13 PM
Lolo and chartlyrics are not in this plugin

Quote
Current Providers
Cušpajz
Genius
Letras de músicas
Metrolyrics
Musixmatch_Asian
Musixmatch
Oldies Lyrics
Smriti
Song Lyrics
Teksty
Urban Lyrics
Hindi Lyrics

What does the log say?
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 29, 2020, 04:52:45 PM
Lolo and chartlyrics are not in this plugin

What does the log say?

Ah, so the first two are defaults in MusicBee.
And even if they are not enabled in the settings, they still get sourced.
And… always as top priority before any providers you have actually enabled and set as priority.
Strange, but am I correct in thinking this is how it works?

Also strange: I have not checked 'save lyrics'.
And yet after a restart the lyrics are still there.
Any clue where they are stored? In the mbl file itself perhaps?
(in testing the providers this probably also resulted in me seeing lyrics that were already there and not freshly retrieved by the latest activated provider)

No need for going through the log at this moment I think?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 29, 2020, 04:56:24 PM
I don't know how the sourcing works from MB to the providers other than the plugin is seen as one provider.

Lyrics are cached at /%AppData%/Local/MusicBee/InternalCache/Lyrics
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 29, 2020, 05:14:53 PM
I don't know how the sourcing works from MB to the providers other than the plugin is seen as one provider.
Lyrics are cached at /%AppData%/Local/MusicBee/InternalCache/Lyrics

Thnx, I found the .dat files that contain the lyrics.
So that explains the identical results I saw for the providers I checked even with having 'save lyrics' disabled.
I wasn't expecting that lyrics are still being saved even when you have disabled saving them.

On a side note, even if you delete the music files from the library, the lyrics .dat files remain.
Probably not a big issue, but I would expect them to get deleted also.

Maybe MB's option 'reset artwork cache' could be enhanced with 'reset lyrics cache'.
I don't know, it's not really a big issue for me now I understand a bit better how things work.

But it does severely complicate testing which lyrics providers to enable/order.

And the caching stuff makes it hard (impossible?) to simply delete lyrics that are completely wrong.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 29, 2020, 05:17:47 PM
Ah, so the first two are defaults in MusicBee.
And even if they are not enabled in the settings, they still get sourced.
And… always as top priority before any providers you have actually enabled and set as priority.
Strange, but am I correct in thinking this is how it works?

I now see they don't get sourced when they are disabled.
It was the cached lyrics.dat files that mislead me to believe this.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 30, 2020, 12:12:02 AM
hiccup you can take a look at the batch file I use to clear lyrics cache (last section of the code) and a few other things from a Portable install; maybe it can help. Modify to your taste:

Code
cd C:\MusicBee\AppData
del AlbumCoverHashes.dat &

cd C:\MusicBee\AppData\Dependencies\Spectrogram_Images
del *.* /q &

cd C:\MusicBee\AppData\mb_LyricsReloaded
del mb_LyricsReloaded.log &

@ECHO OFF

Set dir="c:\MusicBee\AppData\InternalCache\AlbumCovers"

Echo Deleting all files from %dir%
del %dir%\* /F /Q

Echo Deleting all folders from %dir%
for /d %%p in (%dir%\*) Do rd /Q /S "%%p"
@echo Folder deleted.

@ECHO OFF &

Set dir="c:\MusicBee\AppData\InternalCache\Lyrics"

Echo Deleting all files from %dir%
del %dir%\* /F /Q

Echo Deleting all folders from %dir%
for /d %%p in (%dir%\*) Do rd /Q /S "%%p"
@echo Folder deleted.

exit
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 30, 2020, 09:51:47 AM
hiccup you can take a look at the batch file I use to clear lyrics cache (last section of the code) and a few other things from a Portable install; maybe it can help.
Thanks, perhaps I will use it later, but for now I only need the lyrics cache deleted for these testing purposes.
I will leave the  AppData\InternalCache\Lyrics folder open, and just use 'select all', 'delete'.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 30, 2020, 06:20:37 PM
So I concluded my trials testing all available providers on some 30 tracks from my library.
The results were quite clear and for now I have set these three as my lyrics providers:

(https://i.imgur.com/NbZCfpR.png)

Using these three in this order gives pretty great results in most cases.
The other available providers didn't contribute much, and in a few cases even nothing at all.

I would be interested to learn if other users have different preferences and get more satisfying results by using other providers.

- - -

One thing that is not as I would expect it to work:
When one of these three providers has the lyrics for a song, sometimes MusicBee will still say 'No Lyrics Found'
I will need to click 'Search Next Provider' several times before the lyrics show up.

That's probably because (as Frankz mentioned) MB sees the plugin as one provider, but it would be nice if MB would handle this a little bit smarter.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2020, 06:30:38 PM
I've got 1. Genius 2. Song Lyrics 3. MusixMatch 4 chartlyrics.com, but I think MusixMatch bans my IP at this point anyway  :)
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 30, 2020, 06:35:57 PM
I've got 1. Genius 2. Song Lyrics 3. MusixMatch 4 chartlyrics.com, but I think MusixMatch bans my IP at this point anyway  :)
That's a nice confirmation: so for the both of us the same three providers give good results.
MusiXMatch matched none of the 30 tracks for me. I don't think my IP is banned. (maybe the IP range I am in is?)
Or MusiXMatch is just a lousy bunch ;-)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2020, 06:49:34 PM
I've actually found them to be pretty good in the past.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 30, 2020, 06:53:03 PM
I've actually found them to be pretty good in the past.
Personally I can't be bothered, but if you are curious you could try a free VPN service and see if it makes a difference?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2020, 07:17:50 PM
I'm actually unblocked now. 

The problem is that the MM config doesn't work when lyrics do exist.  Add this to the list of things to fix when I get time, I guess.  Looked at it real quick and I can't figure out why it's not matching the pattern.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on December 30, 2020, 07:34:24 PM
Ok.
Just curious; is this something that has been raised before and Steven is already aware of? :

One thing that is not as I would expect it to work:
When one of these three providers has the lyrics for a song, sometimes MusicBee will still say 'No Lyrics Found'
I will need to click 'Search Next Provider' several times before the lyrics show up.

That's probably because (as Frankz mentioned) MB sees the plugin as one provider, but it would be nice if MB would handle this a little bit smarter.

If it is but it's not easy to fix than that's that.
But if it hasn't been requested to get improved on before, I think it is a likely candidate to specifically raise, so to possibly make MusicBee's lyrics retrieval smoother and even better?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2020, 07:58:09 PM
I think he knows - I seem to remember it being mentioned before.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 31, 2020, 05:35:38 AM
One thing that is not as I would expect it to work:
When one of these three providers has the lyrics for a song, sometimes MusicBee will still say 'No Lyrics Found'
I will need to click 'Search Next Provider' several times before the lyrics show up.

That's probably because (as Frankz mentioned) MB sees the plugin as one provider, but it would be nice if MB would handle this a little bit smarter.

Once I got totally frustrated trying to figure out why MusixMatch isn't working (HELP!) I spent some time thinking about this and am pretty sure it would never work.  I'm also pretty sure MB doesn't interact with the plugin as everyone (including me) always assumed.

Say you have sources:

Built-in source 1
Plug-in source 1
Built-in source 2
Built-in source 3
Plug-in source 2

So you search for lyrics and it searches built-in 1.  You don't like the lyrics.  You do next source, which sends the search to the plug-in, which then searches ALL of your selected plug-in sources in order, displaying the lyrics of the first one that responds. You don't like those, and search next source.  It searches built-in 2.  You don't like those either.  You search next source.

Now I'd never thought about it in depth and just assumed it would search plug-in source 2.  But now that I have thought about it and looked in the log, it doesn't make any sense and I don't see how it would.  Neither MB nor the plug-in have a memory of what lyrics you rejected the first time.  If it even searches the plug-in again, which I'm not even clear that it does, it would just return the same set of lyrics as it did the first time in the same order. Nothing exists to exclude the ones that you rejected.

I think the order of the plug-in sources is mostly irrelevant in the grand scheme of plug-in/built-in interaction.  If a plug-in source is first, it will search all the active ones at once.  If a plug-in source is second or later, it will search the active built-in sources in order and continue down the line until it hits a plug-in source and then search all the active ones at once.

I say "mostly irrelevant" because the plug-in does seem to search and return results in the order you've set, but all at once.  It doesn't dip in and out among built-in sources.

In other words, I believe

Built-in source 1
Plug-in source 1
Built-in source 2
Built-in source 3
Plug-in source 2

will give identical results to
Built-in source 1
Plug-in source 1
Plug-in source 2
Built-in source 2
Built-in source 3

I don't see how it would work any other way. 
Title: Re: LyricsReloaded (Updated)
Post by: Steven on January 06, 2021, 08:13:15 AM
@frankz,
For the initial lyrics retrieval for a playing track with no lyrics, MB queries every provider in parallel because doing it sequentially would potentially take a very long time. The first provider by priority order that returns a result is the one ultimately chosen.

When using the Next Provider command, there is a bug with the plugin providers so they are effectively ignored. However even when I fix that bug, I dont think it will work well with the plugin lyrics as it will treat all plugin provides as being from the same source ie. redo all the plugin providers
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 06, 2021, 03:20:02 PM
Thank you for the clarification. 
Title: Re: LyricsReloaded (Updated)
Post by: Steven on January 07, 2021, 06:47:50 AM
For the record, the next v3.4 update will accurately record the plugin provider in cached lyrics (for newly cached lyrics, not existing ones) and hence the Next Provider function will work as expected (for the newly cached lyrics)
Title: Re: LyricsReloaded (Updated)
Post by: VenaxB on January 10, 2021, 08:49:24 PM
Hi, I have been trying to work on adding Darklyrics as a provider and there is one thing that would make it easier. In the example configuration there is a comment that says that variables are also allowed in the pattern, does anyone knows how? Thanks
Title: Re: LyricsReloaded (Updated)
Post by: frankz on January 10, 2021, 10:33:33 PM
Full documentation, written by the original plug-in author, is in this post (https://getmusicbee.com/forum/index.php?topic=25406.msg145769#msg145769).

I think that reference to variables means you can put things like <Artist> or <Title> in the pattern, but you'd have to play with it to make sure.

If you ever get it working feel free to contribute it here and I'll build it in.
Title: Re: LyricsReloaded (Updated)
Post by: MujikMusical on January 13, 2021, 02:29:27 AM
Full documentation, written by the original plug-in author, is in this post (https://getmusicbee.com/forum/index.php?topic=25406.msg145769#msg145769).

I think that reference to variables means you can put things like <Artist> or <Title> in the pattern, but you'd have to play with it to make sure.

If you ever get it working feel free to contribute it here and I'll build it in.
Thank you for this information. I will check on this also.
Title: Re: LyricsReloaded (Updated)
Post by: Mauser69 on March 21, 2021, 12:45:45 PM
First, I want to thank frakz for taking the lead in keeping this great plugin available to all of us.  Finding correct lyrics can really be a chore sometimes, and this helps a lot.

I do want to comment that the Search Next Provider function for lyrics in MB ONLY works if there are no saved lyrics for a track.  Similarly, if you have options set to automatically save lyrics or use Auto-Tag to update lyrics, then you will ONLY ever see lyrics from the first provider in your list that has lyrics for the track in question, since MB will automatically save the first lyrics it finds, and then it stops looking.  Furthermore, Auto-Tag>Update lyrics from web may find and save lyrics from a source that never shows up if you use Search Next Provider to check each one on your list.  I do not know why that is the case, but I have seen it happen.

It is kind of a drag that there is no way to have MB search for new lyrics without first having to delete any saved ones you have, but I guess that is an issue with the core MB code and not this plugin.

And now just adding a comment on something strange I have encountered:
(not asking for anything, just adding the information here in case it helps someone else understand if they also see it.

I was doing a lot of repetitive testing on one song where several sites had totally wrong lyrics, but GENIUS alone had the correct ones.  I repeated the Search Next Provider function many, many times over a couple of days (getting consistent results each time).  Suddenly, for the same track I had been testing, the returned lyrics totally changed.  CHARTLYRICS, which had been showing  a completely wrong set of lyrics, began returning a totally different wrong set of lyrics.  At the same time, GENIUS suddenly stopped returning any lyrics for that song at all.  I went direct to the GENIUS site and verified the lyrics for that song were still there, so I have no idea why this plugin no longer finds them.  I suspected maybe so many repeats of the lookup I was doing might have triggered something that stopped GENIUS from responding to queries from my address, but that is not the case; I still get lyrics from GENIUS for other tracks on the same album I was testing.

So finding correct lyrics for many songs is still a tedious process, but this plugin does help.  I never used to pay any attention to the lyrics automatically displayed by MB, but now I try to watch them to see if they are correct.  I am now making it a point to save the correct lyrics (when I find them), since it seems that you just cannot trust finding them again tomorrow from the same location!
Title: Re: LyricsReloaded (Updated)
Post by: Crash on April 01, 2021, 05:16:35 AM
First, I want to thank frakz for taking the lead in keeping this great plugin available to all of us.  Finding correct lyrics can really be a chore sometimes, and this helps a lot.

I do want to comment that the Search Next Provider function for lyrics in MB ONLY works if there are no saved lyrics for a track.  Similarly, if you have options set to automatically save lyrics or use Auto-Tag to update lyrics, then you will ONLY ever see lyrics from the first provider in your list that has lyrics for the track in question, since MB will automatically save the first lyrics it finds, and then it stops looking.  Furthermore, Auto-Tag>Update lyrics from web may find and save lyrics from a source that never shows up if you use Search Next Provider to check each one on your list.  I do not know why that is the case, but I have seen it happen.

It is kind of a drag that there is no way to have MB search for new lyrics without first having to delete any saved ones you have, but I guess that is an issue with the core MB code and not this plugin.

And now just adding a comment on something strange I have encountered:
(not asking for anything, just adding the information here in case it helps someone else understand if they also see it.

I was doing a lot of repetitive testing on one song where several sites had totally wrong lyrics, but GENIUS alone had the correct ones.  I repeated the Search Next Provider function many, many times over a couple of days (getting consistent results each time).  Suddenly, for the same track I had been testing, the returned lyrics totally changed.  CHARTLYRICS, which had been showing  a completely wrong set of lyrics, began returning a totally different wrong set of lyrics.  At the same time, GENIUS suddenly stopped returning any lyrics for that song at all.  I went direct to the GENIUS site and verified the lyrics for that song were still there, so I have no idea why this plugin no longer finds them.  I suspected maybe so many repeats of the lookup I was doing might have triggered something that stopped GENIUS from responding to queries from my address, but that is not the case; I still get lyrics from GENIUS for other tracks on the same album I was testing.

So finding correct lyrics for many songs is still a tedious process, but this plugin does help.  I never used to pay any attention to the lyrics automatically displayed by MB, but now I try to watch them to see if they are correct.  I am now making it a point to save the correct lyrics (when I find them), since it seems that you just cannot trust finding them again tomorrow from the same location!
Thank you.

I'm trying to import my basedata from minilyrics :P

For the record, the next v3.4 update will accurately record the plugin provider in cached lyrics (for newly cached lyrics, not existing ones) and hence the Next Provider function will work as expected (for the newly cached lyrics)

Nice !
I'm launching a clean install with just some settings like my "lyrics cache folder" and my old <MediaField> settings
Hoping this shit will run fine
Title: Re: LyricsReloaded (Updated)
Post by: ShotgunStev3 on April 10, 2021, 02:25:16 AM
Hey frankz! I'm back with another fix for Genius.com  ;D

For both the artist and title filters, add this line:
Code
        - [replace, "&", "and"]
This should go right after the line "-lowercase"
This helps to find any '&' symbols in the artists and titles and replaces them with the word "and" for the URL search.

before: https://genius.com/Mumford-sons-hot-gates-lyrics (no match!)
after: https://genius.com/Mumford-and-sons-hot-gates-lyrics (target acquired!)

Love to see this wonderful plugin still active!
Title: Re: LyricsReloaded (Updated)
Post by: cheezweasel on May 14, 2021, 05:48:18 AM
I am having issues getting any of the plugin providers to work.

I deselected the two stock providers (chartlyrics, LoloLyrics) and selected all of the lyrics from the plugin (Genius, etc.). None of my songs are returning lyrics - "Lyrics not found". When i select the two stock lyric providers, the lyrics come up, but are wrong a lot of the time.

The songs are popular songs by bands like Led Zeppelin, The Doors, 311, Marcy Playground, etc. I can also find these lyrics on genius.com with no issue.

I just dl'd the plugin today, so it should be the newest version.

Any ideas?
Title: Re: LyricsReloaded (Updated)
Post by: brandonluciano824 on May 16, 2021, 12:52:39 AM
Just wondering if there's now a way to fix the Genius Lyrics not showing up. They did a redesign of their website so imagine it can't fetch the lyrics like it did before.
Title: Re: LyricsReloaded (Updated)
Post by: dtcsong on June 02, 2021, 02:09:22 AM
Just wondering if there's now a way to fix the Genius Lyrics not showing up. They did a redesign of their website so imagine it can't fetch the lyrics like it did before.

Also seeking a fix for this. 

Thanks for the amazing plugin.
Title: Re: LyricsReloaded (Updated)
Post by: phred on June 02, 2021, 03:15:35 AM
Not only did Genius update their website, but they made it so you can't highlight and copy the lyrics. Fortunately with Firefox, I can enable Reader Mode and then can copy.

It's quite possible that what they did will prevent frankz from updating the plugin.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 02, 2021, 04:21:04 AM
Phred is correct. Genius now seems to provide the lyrics in an unusable format (not as html).  See below.  They also seem to be screening for "device type" in the process, which I'm guessing would not even provide this wall of code to a scraper.

There may be a way to handle content of this nature, but if there is it is beyond my meager skills to figure it out as the plugin is not structured to handle it from what I can see.

I'd suggest getting comfortable with the other sources. 
Code
    <script>
      window.__PRELOADED_STATE__ = JSON.parse('{\"currentPage\":\"songPage\",\"deviceType\":\"desktop\",\"session\":{\"cmpEnabled\":false,\"ccpaEnabled\":true,\"showAds\":true,\"logClientMetrics\":false,\"fringeEnabled\":true,\"taboolaEnabled\":false},\"songPage\":{\"song\":3593511,\"pinnedQuestions\":[],\"lyricsData\":{\"body\":{\"children\":[{\"children\":[\"[Verse 1]\",{\"tag\":\"br\"},\"Oh, you think you\'ve got it?\",{\"tag\":\"br\"},\"You know everything about it\",{\"tag\":\"br\"},\"What I do and what I say and what I dream\",{\"tag\":\"br\"},\"But the second I am hungry\",{\"tag\":\"br\"},\"Tappin\' on your window\",{\"tag\":\"br\"},\"Askin\' for my lover, there\'s nothing\",{\"tag\":\"br\"},\"\",{\"tag\":\"br\"},\"[Chorus]\",{\"tag\":\"br\"},\"Now I\'m kickin\' at the concrete\",{\"tag\":\"br\"},\"Wishin\' you would get me\",{\"tag\":\"br\"},\"But that thinkin\' never got me very far\",{\"tag\":\"br\"},\"So I\'ll do us both a favor\",{\"tag\":\"br\"},\"I\'ll catch up with ya later\",{\"tag\":\"br\"},\"It\'s better if I don\'t know where ya are\",{\"tag\":\"br\"},\"\",{\"tag\":\"br\"},\"[Verse 2]\",{\"tag\":\"br\"},\"Now I\'ve been under water\",{\"tag\":\"br\"},\"Watchin\' it all happen\",{\"tag\":\"br\"},\"Tried to count the stars but they just blurred\",{\"tag\":\"br\"},\"In Tulsa, Oklahoma\",{\"tag\":\"br\"},\"I tried to take the spotlight\",{\"tag\":\"br\"},\"Hung my head and wished I was a bird\",{\"tag\":\"br\"},\"\",{\"tag\":\"br\"},\"[Chorus]\",{\"tag\":\"br\"},\"Now I\'m kickin\' at the concrete\",{\"tag\":\"br\"},\"Wishin\' you would get me\",{\"tag\":\"br\"},\"But that thinkin\' never got me very far\",{\"tag\":\"br\"},\"So I\'ll do us both a favor\",{\"tag\":\"br\"},\"I\'ll catch up with ya later\",{\"tag\":\"br\"},\"It\'s better if I don\'t know where ya are\",{\"tag\":\"br\"},\"\",{\"data\":{\"name\":\"desktop_song_lyrics_inread\"},\"tag\":\"inread-ad\"},\"[Bridge]\",{\"tag\":\"br\"},\"The more I tried to own it\",{\"tag\":\"br\"},\"The more your heart went roamin\'\",{\"tag\":\"br\"},\"Hopin\' it would be more than a scar\",{\"tag\":\"br\"},\"\",{\"tag\":\"br\"},\"[Chorus]\",{\"tag\":\"br\"},\"So I\'ll do us both a favor\",{\"tag\":\"br\"},\"I\'ll catch up with ya later\",{\"tag\":\"br\"},\"It\'s better if I don\'t know where ya are\"],\"tag\":\"p\"},\"\"],\"tag\":\"root\"}},\"featuredQuestion\":null,\"showFeaturedQuestion\":false,\"pendingQuestionCount\":0,\"dfpKv\":[{\"values\":[\"3593511\"],\"name\":\"song_id\"}
[many many many lines truncated for length]
Title: Re: LyricsReloaded (Updated)
Post by: ma_t14 on June 03, 2021, 10:41:10 AM
Phred is correct. Genius now seems to provide the lyrics in an unusable format (not as html).  

Are you sure about that? I can see both forms in the code.

For example for Manic Street Peachers - She Is Suffering (https://genius.com/Manic-street-preachers-she-is-suffering-lyrics)

I can see the following html code, in addition to the script you mentioned:

Code
<div class="Lyrics__Container-sc-1ynbvzw-6 krDVEH">
  <a
    href="/17672105/Manic-street-preachers-she-is-suffering/Verse-1"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >[Verse 1]</span
    ></a
  ><br />Beauty finds refuge in herself<br />Lovers wrapped inside each others
  lies<br /><a
    href="/4200019/Manic-street-preachers-she-is-suffering/Beauty-is-such-a-terrible-thing-she-is-suffering-yet-more-than-death"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >Beauty is such a terrible thing<br />She is suffering yet more than
      death</span
    ></a
  ><br /><br />[Chorus]<br /><a
    href="/2214260/Manic-street-preachers-she-is-suffering/She-is-suffering-she-sucks-you-deeper-in-she-is-suffering"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >She is suffering<br />She sucks you deeper in<br />She is suffering</span
    ></a
  ><br />You exist within her shadow<br /><br />[Verse 2]<br />Beauty she is
  scarred into man's soul<br />A flower attracting lust, vice and sin<br />A
  vine that can strangle life from a tree<br />Carrion, surrounding, picking on
  leaves<br /><br />[Chorus]<br /><a
    href="/2214260/Manic-street-preachers-she-is-suffering/She-is-suffering-she-sucks-you-deeper-in-she-is-suffering"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >She is suffering<br />She sucks you deeper in<br />She is suffering</span
    ></a
  ><br />You exist within her shadow<br /><br />[Verse 3]<br /><a
    href="/15096087/Manic-street-preachers-she-is-suffering/Beauty-she-poisons-unfaithful-all-stifled-her-touch-is-leprous-and-pale"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >Beauty she poisons unfaithful all<br />Stifled, her touch is leprous and
      pale</span
    ></a
  ><br />The less she gives the more you need her<br />No thoughts to forget
  when we were children<br />
</div>
<div class="RightSidebar-pajcl2-0 eGLQob">
  <div class="SidebarAd__Container-sc-1cw85h6-0 fzyndU">
    <div class="SidebarAd__Ad-sc-1cw85h6-1 feqDwM">
      <div
        id="div-gpt-ad-desktop_song_lyrics_sidebar-desktop_song_lyrics_sidebar-1"
        class="DfpAd__Container-sc-1tnbv7f-0 kthwUN"
      ></div>
    </div>
  </div>
</div>
<div class="Lyrics__Container-sc-1ynbvzw-6 krDVEH">
  <div class="InreadAd__Container-sc-1pp8jgt-0 hFVRqM">
    <div
      id="div-gpt-ad-desktop_song_lyrics_inread-desktop_song_lyrics_inread-1"
      width="300"
      height="250"
      class="DfpAd__Container-sc-1tnbv7f-0 hpiJis"
    ></div>
  </div>
</div>
<div class="Lyrics__Container-sc-1ynbvzw-6 krDVEH">
  [Chorus]<br /><a
    href="/2214260/Manic-street-preachers-she-is-suffering/She-is-suffering-she-sucks-you-deeper-in-she-is-suffering"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >She is suffering<br />She sucks you deeper in<br />She is suffering</span
    ></a
  ><br /><a
    href="/13140817/Manic-street-preachers-she-is-suffering/Natures-lukewarm-pleasure"
    class="ReferentFragment__ClickTarget-oqvzi6-0 evuxZm"
    ><span class="ReferentFragment__Highlight-oqvzi6-1 eZruqd"
      >Nature's lukewarm pleasure</span
    ></a
  >
</div>
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 03, 2021, 12:56:55 PM
I missed that.  In my "View Source" (chrome) it looks very different.  It's all one line when I paste it into Notepad++.

But it's a positive development.  If anyone can come up with a YML that captures the lyrics from that I will gladly integrate it into the plugin and update.  You can test by placing it with the extension YML in your providers folder under the plugin's folder.  The original Genius YML to use as a starting point is here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/genius.com.yml).  Documentation about how to create YML files is here (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/README.md). You'll need to update the "pattern:" line.

Alternately, if someone wants to fork the plugin and take over maintenance, I'd be happy to close this thread with a link to the new version's thread.  The scope of the requests to update seems to have gone beyond the scope of my ability to satisfy them, and I feel bad about it.  I've been pretty clear that I'm limited by skill to adding new providers with scripts provided by others, deleting old outdated providers, and pushing new versions.  I'm an OK tinkerer but a pretty terrible creator.
Title: Re: LyricsReloaded (Updated)
Post by: LazR on August 15, 2021, 08:21:59 AM
I was able to find a site that seems to just scrape lyrics from Genius or some user is just copy and pasting them straight over with the correct HTML formatting. Here is the code for it. Only problems I have noticed are that sometimes there are ads in-between the lyrics (https://i.imgur.com/je8qTdd.png) so it has a bunch of extra spaces and the googleads link -- couldn't regex it. Also there isn't always two space breaks before a new lyric section (ex [Chorus], [Verse], etc) so it doesn't look super clean. But a start, for some artists not included in other large sites.  


Code
name: "Genius Lyrics Ripoff"

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]    # !!! (Chk Chk Chk) artist exception
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
                                                # ^ Strip F./ft/eat/uring + everything after
        - [regex, '\s&(?=\s)', " and"]          # Replace " &" with " and"
                                                    ## ^ Currently superfluous (for ARTIST) bc plugin preemptively replaces "&" with "and"
                                                        ### ^ But still necessary for <title> "&" replacement
        - [regex, '\.+|,+|(\W+(?=$))|(^\W+)', ""]   # Strip "." + "," + beginning/end of string non-word chars
        - [regex, "'", ""]                      # Separate expression bc of annoying way YAML escapes '
        - [regex, '(?<=[a-z0-9%])[^\sa-z0-9%]+(?=[a-z0-9%]+)', "-"]
                                                # ^ Replace medial non-alphanumeric char(s) with single "-" e.g., f**k > f-k
        - [regex, '((?<=\s)([^a-z0-9\s-])+(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
                                                # ^ Clean up any remaining successive non-alphanumeric chars before strip_nonascii
                                                    ## ^ Long & stupid bc couldn't figure out YAML-friendly non-capturing "(?:...)"
                                                        ### ^ EZ version: [regex, '\W+(?:\W)(?<!$)', " "]
        - [strip_nonascii, -]
    title:
        type: title
        filters: artist

config:
    url: "http://genius-lyrics.com/{title}-lyrics-{artist}"
    pattern: ['<p style="text-align: center;">(?<lyrics>.+?)<h2 style="text-align: center;">', s]

post-filters:
- strip_html
- clean_spaces
- utf8_encode
- [regex, '<!-- 2020 POST 3 -->', ""]

- [regex, 'googletag.*\);', "\n"]
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 15, 2021, 02:03:17 PM
Thanks for putting that together.  I'm going to hold off on adding it for the time being because I'm not sure how I feel about building something into the plugin itself that will unavoidably insert spam text into lyrics.   I'm going to have to think on that.

Also, the site seems to be quite minor. As near as I can tell, the English side only has lyrics for about 17,000 songs, and English is the high point.  Spanish language is about 330 songs, Italian 130, etc.

I appreciate the effort and skill though and, as a reminder, anyone can copy this to a text file on their computer, save it with a .yml extension, and put it into the "providers" folder that sits under the plugin's folder to use it right now.

Good work.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on August 22, 2021, 12:37:31 AM
I was able to find a site that seems to just scrape lyrics from Genius or some user is just copy and pasting them straight over with the correct HTML formatting. Here is the code for it. Only problems I have noticed are that sometimes there are ads in-between the lyrics (https://i.imgur.com/je8qTdd.png) so it has a bunch of extra spaces and the googleads link -- couldn't regex it. Also there isn't always two space breaks before a new lyric section (ex [Chorus], [Verse], etc) so it doesn't look super clean. But a start, for some artists not included in other large sites.

Thanks for putting that together.  I'm going to hold off on adding it for the time being because I'm not sure how I feel about building something into the plugin itself that will unavoidably insert spam text into lyrics.   I'm going to have to think on that.

Also, the site seems to be quite minor. As near as I can tell, the English side only has lyrics for about 17,000 songs, and English is the high point.  Spanish language is about 330 songs, Italian 130, etc.

I appreciate the effort and skill though and, as a reminder, anyone can copy this to a text file on their computer, save it with a .yml extension, and put it into the "providers" folder that sits under the plugin's folder to use it right now.

I got excited for a moment cos I thought it was a fix for the real Genius, but I went ahead and fixed it anyway cos I'm tired of nothing working:

Code
name: "Genius-Lyrics"

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]    # !!! (Chk Chk Chk) artist exception
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '\s&(?=\s)', " and"]
        - [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: "http://genius-lyrics.com/{title}-lyrics-{artist}"
    pattern: ['<p style="text-align: center;">(?<lyrics>.+?)<h2 style="text-align: center;">', s]

post-filters:
- [regex, "<div class='code-block.*?</script></div>", "", s]
- strip_html
- clean_spaces
- utf8_encode
- [regex, '^\[', "\n[", m]
- clean_spaces
- trim

It actually works really well for the artists that are on the site. No ads, only lyrics, properly spaced.

I think I'm getting a yaml for the actual Genius too, but it's really complicated. Just nothing else works anymore, this plugin needs updating.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on August 22, 2021, 12:49:39 AM
Hi, I have been trying to work on adding Darklyrics as a provider and there is one thing that would make it easier. In the example configuration there is a comment that says that variables are also allowed in the pattern, does anyone knows how? Thanks
Full documentation, written by the original plug-in author, is in this post (https://getmusicbee.com/forum/index.php?topic=25406.msg145769#msg145769).

I think that reference to variables means you can put things like <Artist> or <Title> in the pattern, but you'd have to play with it to make sure.

If you ever get it working feel free to contribute it here and I'll build it in.
Thank you for this information. I will check on this also.

Unfortunately this doesn't look to be correct.
I responded to the Github issue here: https://github.com/mbfrankz/LyricsReloaded/issues/7 (https://github.com/mbfrankz/LyricsReloaded/issues/7)
Might help to update that part of the documentation.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 22, 2021, 07:02:11 AM
Honestly, please someone fork this and take it over and update the original author's documentation and whatever else needs to be done.  I just don't have the bandwidth for it every time a site changes a line of code or every time someone wants to add a lyric site with a handful of obscure songs at this point. 

When I first looked at this, there were a handful of scripts that were orphaned in the original forum thread and only available to people who knew where to find them.  The original plugin author was MIA, so I learned rudimentary C# and built them in. 

My life is much different now than it was then. If Redearth or someone else wants to take the baton, by all means you have my blessing.  Make a new thread and link it here and I'll bow out.  Take the wheel.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on August 23, 2021, 03:11:53 AM
Honestly, please someone fork this and take it over and update the original author's documentation and whatever else needs to be done.  I just don't have the bandwidth for it every time a site changes a line of code or every time someone wants to add a lyric site with a handful of obscure songs at this point. 

When I first looked at this, there were a handful of scripts that were orphaned in the original forum thread and only available to people who knew where to find them.  The original plugin author was MIA, so I learned rudimentary C# and built them in. 

My life is much different now than it was then. If Redearth or someone else wants to take the baton, by all means you have my blessing.  Make a new thread and link it here and I'll bow out.  Take the wheel.

Hey frankz, thanks for all the work you've done, man. I hope you're not feeling overwhelmed by any of this just cos your fork was the last update.
My comments about the plugin needing updates to survive were for the community, I had no expectations from you.
Regardless of who has the fork, it's open source, community effort and anyone can submit pull requests, but I don't see that anyone has.

I looked through the code and it's all pretty straight-forward. I actually tried getting it running yesterday just to play with it a bit, but it was taking too long trying to get it work with the old dependencies and such.
It's possibly something I could take, but I'm really wondering if it's worth it. Is there any way to know how many people actually use it? People don't seem to be clamoring for it, and even with improvements, users generally have to have technical skill and be willing to update the config files...
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on August 23, 2021, 03:40:53 AM
Man I am "clamoring" for it..  frankz made this sucker work well past its shelf life, but it's obvious how hard it must be to stay on top of the changes these sites make.  Redearth I encourage you to give it a shot, there are PLENTY of users who would take advantage of this but like me just don't have the technical chops to write the code.  As an inspiration I can refer to the complete resurrection of lyrics searching in the Foobar player when ONE GUY with the required time took the challenge to write the foo_multisource plugin that currently has ELEVEN working sources--Genius, Deezer, Metal Archives, etc etc.  It would be so cool to see MusicBee in the same place.  Please give it a go.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 23, 2021, 05:57:25 AM
The plug-in has been downloaded 11,300 times in three years the since I first updated it - I'd say it's definitely worth the effort of keeping it updated if someone is so inclined.

The problem is that my "skills" are such that I must relearn a whole lot every time I go to do anything to it.  I code so infrequently that I have to look everything up whenever I change anything and I've got to spend time reacquainting myself with Visual Studio and how to compile it and how to publish it to github every time.  There was a time when I could devote an hour on an odd occasional Saturday morning to getting myself together and getting it done, but I can't reliably steal that time away from things now like I used to be able to.

Even with the forum these days - if I can provide a quick navigation tip or answer I do it but I rarely have the bandwidth to sit down and look at someone's complicated issue and think it through.  I wish I did.

I will say that I have serious doubts about the long-term longevity of the framework the plug-in uses to get lyrics.  It seems that lyrics in plain text at easily predictable URLs are becoming more rare, and throttling of requests is becoming more common, and I don't see any indication that either of those two trends reversing.  If someone is really going to do something that goes beyond maintenance and make it sustainable, it may be worthwhile to study what it is about that foobar plug-in that makes it works so well.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on August 23, 2021, 10:06:57 AM
I will say that I have serious doubts about the long-term longevity of the framework the plug-in uses to get lyrics.  It seems that lyrics in plain text at easily predictable URLs are becoming more rare, and throttling of requests is becoming more common, and I don't see any indication that either of those two trends reversing.  If someone is really going to do something that goes beyond maintenance and make it sustainable, it may be worthwhile to study what it is about that foobar plug-in that makes it works so well.

Yeah, after giving it a bit more of a look, I just don't see this as being viable much longer, unfortunately. The code is just too simple, and even with the few changes I could make to improve the capabilities in lyric parsing, the config files would be even more complex and still require frequent upkeep for as long as they even continue to work.

But the bigger problem is that the YAML files just aren't sufficient for adding lyric sites to LyricsReloaded. They simply aren't powerful enough to specify enough information to the plugin's generic parser. Trying to move forward with YAML would be an unmaintainable mess. The simple truth is that each lyric site needs its own parser written in code.

You're also right that relying 100% on page scraping won't be good long term, but adding API access capability to this plugin for sites that allow it would be another major addition. That with the YAML change, which I think are necessary, is essentially writing an entirely new lyric plugin from scratch.


Man I am "clamoring" for it..  frankz made this sucker work well past its shelf life, but it's obvious how hard it must be to stay on top of the changes these sites make.  Redearth I encourage you to give it a shot, there are PLENTY of users who would take advantage of this but like me just don't have the technical chops to write the code.  As an inspiration I can refer to the complete resurrection of lyrics searching in the Foobar player when ONE GUY with the required time took the challenge to write the foo_multisource plugin that currently has ELEVEN working sources--Genius, Deezer, Metal Archives, etc etc.  It would be so cool to see MusicBee in the same place.  Please give it a go.

foo_multisource isn't actually a plugin, it's a collection of parsers he wrote for the Lyric Show Panel 3 plugin, which he did not write. The plugin is much more complex and powerful than LyricsReloaded, but it still requires updates to the parsers whenever non-API lyric sites change their page structures. The author of foo_multisource even said his parsers aren't stable, and he has put in a ton of work into creating and maintaining them. They happen to work really well right now because he literally just released an update.

Also, it looks like he might rewrite the parsers for the foo_openlyrics plugin since Lyric Show Panel 3 is dead. foo_openlyrics is also a great plugin, but it's also substantially more complex and powerful than LyricsReloaded, but still requires parser upkeep.

So, sorry man, I just don't see it happening for MusicBee. Foobar attracts a very passionate and dedicated dev community.
Title: Re: LyricsReloaded (Updated)
Post by: Havokdan on August 24, 2021, 10:40:19 AM
Perhaps it is the case of MusicBee reshaping the system of searching for lyrics to allow the creation of these parsers and their changes.
Title: Re: LyricsReloaded (Updated)
Post by: Steven on September 09, 2021, 12:52:36 PM
to keep this topic focused on the lyrics plugin i have split the open-source discussion to: https://getmusicbee.com/forum/index.php?topic=35516.0
Title: Re: LyricsReloaded (Updated)
Post by: LazR on September 22, 2021, 06:54:33 AM
foo_multisource isn't actually a plugin, it's a collection of parsers he wrote for the Lyric Show Panel 3 plugin, which he did not write. The plugin is much more complex and powerful than LyricsReloaded, but it still requires updates to the parsers whenever non-API lyric sites change their page structures. The author of foo_multisource even said his parsers aren't stable, and he has put in a ton of work into creating and maintaining them. They happen to work really well right now because he literally just released an update

Honestly I think it would be easier to use this plugin on Foobar, save all lyrics to correct tag and then run in Musicbee as normal. If I had any sense of C#/++ I would try to put something together that uses the Genius API to scrape but I wouldn't even know how to get started on that.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on September 22, 2021, 08:10:18 AM
foo_multisource isn't actually a plugin, it's a collection of parsers he wrote for the Lyric Show Panel 3 plugin, which he did not write. The plugin is much more complex and powerful than LyricsReloaded, but it still requires updates to the parsers whenever non-API lyric sites change their page structures. The author of foo_multisource even said his parsers aren't stable, and he has put in a ton of work into creating and maintaining them. They happen to work really well right now because he literally just released an update

Honestly I think it would be easier to use this plugin on Foobar, save all lyrics to correct tag and then run in Musicbee as normal. If I had any sense of C#/++ I would try to put something together that uses the Genius API to scrape but I wouldn't even know how to get started on that.

It would be involved, but if Musicbee had more dev support for this, porting the plugin from Foobar to use MusicBee's API seems like the best solution. Haven't looked into it, but it seems the parsers could then be used between plugins without changes.
Title: Re: LyricsReloaded (Updated)
Post by: crisp on October 16, 2021, 04:57:33 PM
I think I'm getting a yaml for the actual Genius too, but it's really complicated. Just nothing else works anymore, this plugin needs updating.

I think I have a yaml that works for Genius (until they change their formatting again).
Code
name: Genius

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 class="Lyrics__Container.*?">(?<lyrics>.*)<div class="Lyrics__Footer.*?">']

post-filters:
- utf8_encode
- entity_decode
- [regex, "<br/>", "\n"]
- strip_html
- clean_spaces

I haven't tested it extensively, but it works well when the URL is generated right. A few test failures I found:
1) Artist "X, the Y" is logged by the plugin as "X". I suspect this happens before the plugin regexes anything (I turned off the filters to check), maybe Musicbee just gives the plugin the segment before the first comma.
2) "X (Y)" is passed to the plugin as "X". Similar issue as before, but with parentheses. In my test case, Y wasn't a featured artist. Curiously, "X (Y) (ft. Z)" was correctly logged as "X (Y)". Is it only the last parenthesized phrase that's removed?
3) "Cygnus....Vismund Cygnus" is regexed to "cygnusvismund-cygnus", while the Genius URL expected "cygnus-vismund-cygnus". Other titles with ellipses remove them altogether, maybe this needs special handling.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 16, 2021, 07:28:00 PM
I think I have a yaml that works for Genius (until they change their formatting again).
Wow, this actually works!!  Thank you, crisp.  FAST, too.  Let's hope there is a solution for your code that maintains across their site changes--so far, so good!

Addendum:  been using it all afternoon and it's still drawing lyrics like crazy, have moved Genius to the top of the list in my search order.  Formatting looks good too!
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 17, 2021, 07:55:42 PM
For those using the LyricsReloaded(Updated) plugin out of the box and are not sure how to avail themselves of crisp's new yml so genius.com can be searched, follow the steps below.  They have been given in general before by frankz elsewhere in the thread.

1.  From crisp's post (https://getmusicbee.com/forum/index.php?topic=25406.msg194999#msg194999 (https://getmusicbee.com/forum/index.php?topic=25406.msg194999#msg194999)) copy the text inside the "Code" box and paste it to an empty text file, then rename the file "genius.yml."

2.  Find the path illustrated below; this is for a Portable installation of MusicBee, so if you have the Installer version the path shown will probably be in your C:\user\(username)\appdata path somewhere;  if you have the Store version I think you're SOL due to folder permissions.

(https://i.imgur.com/1rHW0o5.png)

3.  Place the genius.yml file inside the "providers" subfolder.

4.  Restart MusicBee, go to Prefs/Tags(2)/lyrics, and press the "..." button to the right of the selection box.

5.  In the Lyrics Providers box, scroll down to find "Genius", check it, move it to the desired search order position using the arrows, and hit the "Update" button.  Now Save and Close.

No guarantee how long before changes at the Genius website may screw things up, but for now, crisp's new yml is pulling lyrics abundantly!
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on October 19, 2021, 08:06:57 PM
I think I have a yaml that works for Genius (until they change their formatting again).

Nice job! Thanks for getting it to work. I should have posted the yaml I had back in August as now I see it was just missing the <br> to "\n" conversion...
Problem was the log kept saying lyrics were successfully found, but nothing was displayed in MusicBee, and I didn't see a way to log or debug the output.

Perhaps Steven can clarify, but the three issues you brought up are due to how MusicBee passes the artist information to the plugin. When the plugin is called by MusicBee, the very first thing it does is print "Lyrics request: <artist> - <title> - <album> - <providerName>" to the log with the exact strings MusicBee provides, so there's nothing you can do using a config file right now.

The only thing I'd add to your config at the moment is [replace, "&", "and"] as a filter. You can also use br2nl instead of [regex, "<br/>", "\n"] in the post-filter.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on October 19, 2021, 10:02:06 PM
I also fixed Musixmatch, and added the minor tweaks to crisp's fix for Genius.
For the sake of easy copy-pasting, I'm putting them both here.

Genius:
Code
name: Genius

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]
        - [replace, "&", "and"]
        - [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 class="Lyrics__Container.*?">(?<lyrics>.*)<div class="Lyrics__Footer.*?">']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces


Musixmatch:
Code
name: Musixmatch

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [regex, "'", ""]
        - [regex, "/", " "]
        - [regex, '\s&(?=\s)', " "]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '[^\sa-z0-9]\s*', ""]
        - [strip_nonascii, -]
    title:
        type: title
        filters:
        - strip_diacritics
        - lowercase
        - [regex, " '|' |/", " "]
        - [regex, "'", " "]
        - [regex, '\.+|,+|/+|(\W+(?=$))|(^\W+)', ""]
        - [regex, '\s&(?=\s)', " and"]
        - [strip_nonascii, -]

config:
    url: "http://www.musixmatch.com/lyrics/{artist}/{title}"
    pattern: ['<p class="mxm-lyrics__content.*?">(?<lyrics>.*?)<div [^>]*"lyrics-report".*?>', s]

post-filters:
- [regex, "<script.*?</script>", "", s]
- strip_html
- utf8_encode
- entity_decode
- clean_spaces

(I would think this would also fix Musixmatch-Asian, but I'm not a good tester for it. If anyone wants it, I can add that too.)
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 19, 2021, 11:22:33 PM
I also fixed Musixmatch, and added the minor tweaks to crisp's fix for Genius.
For the sake of easy copy-pasting, I'm putting them both here.
Thanks Redearth!  I can confirm both of these yml's are working fine drawing lyrics here, MUCH appreciated.  For those who don't know, MusicBee will also draw lyrics from radio stations who send properly formatted track/artist metadata, and now these yml's are knockin' them out right and left.

Also for others: so as to not get the old existing Musixmatch mixed up with Redearth's new one on the Lyrics Providers priority list, I renamed the new yml-based one "musixmatch-new.yml", and changed the first line inside the file to "name: Musixmatch-new" which is how it shows up now on the list.

Redearth, as long as you're on a roll(!), how about seeing what you can do with AZLyrics, DarkLyrics, or even metal-archives (which would be better than DarkLyrics)?  Same plea goes out to crisp.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on October 20, 2021, 04:28:40 AM
Also for others: so as to not get the old existing Musixmatch mixed up with Redearth's new one on the Lyrics Providers priority list, I renamed the new yml-based one "musixmatch-new.yml", and changed the first line inside the file to "name: Musixmatch-new" which is how it shows up now on the list.
Unless I misunderstand what you're referring to, the custom yaml with the same name overrules the yaml included with the plugin, it doesn't show two with the same name. Same with Genius.

Redearth, as long as you're on a roll(!), how about seeing what you can do with AZLyrics, DarkLyrics, or even metal-archives (which would be better than DarkLyrics)?  Same plea goes out to crisp.

AZ Lyrics works if you just copy the plugin's yaml to your custom directory. However it was disabled from being loaded by default in the plug-in and it wasn't explained why. I assume it had to do with being IP-banned from the site. I can take a quick look at the other two and let you know.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 20, 2021, 05:45:56 AM
Unless I misunderstand what you're referring to, the custom yaml with the same name overrules the yaml included with the plugin, it doesn't show two with the same name. Same with Genius.
Roger that, thanks.  I was unaware that the yml if present would overrule/cloak a built-in with the same name.

AZ Lyrics works if you just copy the plugin's yaml to your custom directory. However it was disabled from being loaded by default in the plug-in and it wasn't explained why. I assume it had to do with being IP-banned from the site. I can take a quick look at the other two and let you know.
Can you tell me where I can download the working AZLyrics code/yaml you refer to?  Must have missed that one somewhere.  And thanks for taking a look at metal-archives.com; the DarkLyrics site is a mere subset of that vast resource.

Edit:  Found the AZLyrics code (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/azlyrics.com.yml (https://github.com/mbfrankz/LyricsReloaded/blob/master/LyricsReloaded/Configs/azlyrics.com.yml)) and yes it's working fine :)
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 20, 2021, 04:24:23 PM
Thanks crisp & Redearth!
Working smooth indeed. This is probably a good moment for me to add lyrics to my whole Steely Dan and Leonard Cohen collection…
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 20, 2021, 04:37:10 PM
I notice that for a lot of lyrics I get the parts divided and specified by:
[Verse 1] , [Chorus], [Verse 2], [Outro], etc.

(I am guessing it's Genius providing those?)

Personally I would prefer those to be left out.
If the creators/editors of these yaml's agree with this preference, perhaps regexes could be added to strip the lyrics from these descriptors?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 20, 2021, 04:43:12 PM
Those are coming from Genius.  

I am waiting to see what the final versions of these two updates are (and to get some time) and then I will (with the permission of and with credit to those who have figured out what I couldn't) update the plug-in with them for what will probably be my final update.

I'd like to build the stripping those section headers into the Genius update if it's OK.  One of my self-imposed rules was only lyrics in the lyrics field.

Anyone who wants to add it to the yml until I get to doing this can put this in the "post-filters" section.
Code
- [regex, '\[.{1,75}\]', ""]

I don't remember why I removed A-to-Z but I wouldn't have done it without a reason and I'm disinclined to put it back in.  Here is the yml for it (https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/azlyrics.com.yml) if anyone wants to add it as a custom provider.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 20, 2021, 04:53:32 PM
Anyone who wants to add it to the yml until I get to doing this can put this in the "post-filters" section.
Code
- [regex, '\[.{1,75}\]', ""]
Wow, thanks for the speedy support and solution. Works great.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on October 20, 2021, 05:09:50 PM
thanks for taking a look at metal-archives.com; the DarkLyrics site is a mere subset of that vast resource.

I forgot I already answered someone else's question about DarkLyrics. Unfortunately the plugin straight-up doesn't support those websites, so writing a config would be impossible. It only supports URLs that include the artist and song title, and for the resulting page to have the lyrics for only one song. Those websites require the album in the URL, and there are multiple song lyrics on a single page. So, sorry about that.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on October 20, 2021, 05:21:30 PM
I forgot I already answered someone else's question about DarkLyrics. Unfortunately the plugin straight-up doesn't support those websites, so writing a config would be impossible. It only supports URLs that include the artist and song title, and for the resulting page to have the lyrics for only one song. Those websites require the album in the URL, and there are multiple song lyrics on a single page. So, sorry about that.
Thanks anyway Redearth for the definitive response on those, I'm happy to settle for the revised yml's you made available which do pull a LOT of lyrics from that category.  The only other source I can think of that might effectively supplement what we already have is Deezer.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 20, 2021, 07:26:13 PM
I notice that for a lot of lyrics I get the parts divided and specified by:
[Verse 1] , [Chorus], [Verse 2], [Outro], etc.
Yes, many, many, MANY! lyrics from Genius have these subheaders, which I detest.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 20, 2021, 07:31:31 PM
Thanks to Redearth and frankz for the updates.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 24, 2021, 07:51:47 AM
Anyone who wants to add it to the yml until I get to doing this can put this in the "post-filters" section.
Code
- [regex, '\[.{1,75}\]', ""]
I ran into lyrics sourced from Genius that used curly brackets for  {Intro}  {Outro}.
So I've added those to the regex:

Code
- [regex, '[\[\{].{1,75}[\]\}]', ""]
Or does anyone have the experience that curly brackets are used for actual lyrics sometimes too, so they would better not be removed?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 24, 2021, 01:41:03 PM
Anyone who wants to add it to the yml until I get to doing this can put this in the "post-filters" section.
Code
- [regex, '\[.{1,75}\]', ""]
I ran into lyrics sourced from Genius that used curly brackets for  {Intro}  {Outro}.
So I've added those to the regex:

Code
- [regex, '[\[\{].{1,75}[\]\}]', ""]
Or does anyone have the experience that curly brackets are used for actual lyrics sometimes too, so they would better not be removed?
Nice.

I remembered that a user had suggested, and I'd added, this additional post-filter to get rid of the extra lines left when those headers are removed.
Code
- [replace, "\n\n", "\n"]

...and I think this will get rid of the extra blank line at the top.  In the original, it appeared as the last line...
Code
-trim

Also, these were in the original and not this new and improved version.  I don't know if they're relevant any more.
Code
- [regex, 'googletag.*\);', "\n"]
- [regex, '<!--sse-->', ""]
- [regex, '<!--/sse-->', ""]
- [regex, "’", "'"]
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 24, 2021, 01:53:13 PM
Also, these were in the original and not this new and improved version.  I don't know if they're relevant any more.
Code
- [regex, 'googletag.*\);', "\n"]
- [regex, '<!--sse-->', ""]
- [regex, '<!--/sse-->', ""]
- [regex, "’", "'"]
Nice to see you're still keeping you hand in this, frankz. Does this part go in the filters section or the post-filters?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on October 24, 2021, 02:02:04 PM
Also, these were in the original and not this new and improved version.  I don't know if they're relevant any more.
Code
- [regex, 'googletag.*\);', "\n"]
- [regex, '<!--sse-->', ""]
- [regex, '<!--/sse-->', ""]
- [regex, "’", "'"]
Nice to see you're still keeping you hand in this, frankz. Does this part go in the filters section or the post-filters?
They were in the post-filters.  

I'm pretty sure the sse ones are irrelevant now - I put those in because that text was showing up in the lyrics and now it's not, so either the new version fixes whatever I couldn't figure out and fix in a more elegant way the first time or genius no longer includes that.

I think the googletag one is from way back when the original version was first posted in the original thread by the original author of this provider.  I don't know if it is needed any more (it doesn't seem like it).

For the plugin update I'll post once I get the time (and permission from crisp and Redearth to use their great works), I plan to use the header replacement from hiccup, the double line to single line from the user suggestion, and the quote character replacement and trim from the original, but not those other old ones as they don't appear to be needed any longer.
Title: Re: LyricsReloaded (Updated)
Post by: phred on October 24, 2021, 02:31:14 PM
Thanks again. I guess for the time being I'll leave them out as Genius does seem to be working much better now.

And it sounds like you've got (at least) one more update left in you before you completely bow out. I appreciate what you've done to breathe new life into the plugin up until now and can certainly understand if it's time to pass the torch.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on October 24, 2021, 07:30:57 PM
Just throwing this out here, not even sure if it is something the plugin or a regex could address, and I also have no idea from what lyrics provider it was sourced:

Code
I fought against the bottle,
But I had to do it drunk –
Took my diamond to the pawnshop –
But that don’t make it junk.
So instead of e.g. don't  you will get donât.
For another song I got itâs instead of it's.
A quick google hints towards this being related to things like PHP, UTF8.
Maybe somebody with some coding talents has an idea about this?

A second thought:
I was assuming this was retrieved and output using the plugin.
But I now wonder about that: the plugin does not fully disable MusicBee's internal lyrics retrieval, does it?
So if you press 'search next provider', it could either present a result from the plugin, or from MB's internal engine?
If that assumption is correct, this could be completely beyond what the plugin could fix?
Title: Re: LyricsReloaded (Updated)
Post by: LazR on November 06, 2021, 06:37:17 AM
I also fixed Musixmatch, and added the minor tweaks to crisp's fix for Genius.
For the sake of easy copy-pasting, I'm putting them both here.

Genius:
Code
name: Genius

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [replace, "!!!", "chk-chik-chick"]
        - [replace, "&", "and"]
        - [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 class="Lyrics__Container.*?">(?<lyrics>.*)<div class="Lyrics__Footer.*?">']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces


Musixmatch:
Code
name: Musixmatch

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [regex, "'", ""]
        - [regex, "/", " "]
        - [regex, '\s&(?=\s)', " "]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '[^\sa-z0-9]\s*', ""]
        - [strip_nonascii, -]
    title:
        type: title
        filters:
        - strip_diacritics
        - lowercase
        - [regex, " '|' |/", " "]
        - [regex, "'", " "]
        - [regex, '\.+|,+|/+|(\W+(?=$))|(^\W+)', ""]
        - [regex, '\s&(?=\s)', " and"]
        - [strip_nonascii, -]

config:
    url: "http://www.musixmatch.com/lyrics/{artist}/{title}"
    pattern: ['<p class="mxm-lyrics__content.*?">(?<lyrics>.*?)<div [^>]*"lyrics-report".*?>', s]

post-filters:
- [regex, "<script.*?</script>", "", s]
- strip_html
- utf8_encode
- entity_decode
- clean_spaces

(I would think this would also fix Musixmatch-Asian, but I'm not a good tester for it. If anyone wants it, I can add that too.)

Oh my gosh, thank you so much Redearth. The only issue I am noticing is where ads are placed between lyric sections (ex. [chorus] [verse] etc), it is not adding an extra space. And it only happens on some songs not all.
Here is a screenshot detailing it -- https://imgur.com/a/PFBA6eJ

Is there a way to get that fixed?
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on November 10, 2021, 06:28:49 AM
Oh my gosh, thank you so much Redearth. The only issue I am noticing is where ads are placed between lyric sections (ex. [chorus] [verse] etc), it is not adding an extra space. And it only happens on some songs not all.
Here is a screenshot detailing it -- https://imgur.com/a/PFBA6eJ

Is there a way to get that fixed?

You would need to fix the source, or be okay with inconveniences like this. This plugin just brings in whatever html/script is on the page, not the page you see. (Always view source.)

You'd have to add a post-filter regex that adds a newline in front of lines that begin with "[" that also don't have a blank line before them.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on November 20, 2021, 02:21:01 AM
It pains me to say it, but I think the new Genius yml is no longer pulling lyrics--can others confirm?  If so, the Bat Beacon goes out to crisp and Redearth for a fix!
Title: Re: LyricsReloaded (Updated)
Post by: crisp on November 21, 2021, 02:26:22 AM
This is an odd one. The way I zeroed in on the solution before was (1) making the config pattern as permissive as possible and turning off all the post-filters to dump the whole HTML in the MusicBee lyrics pane, (2) finding the tags that surrounded the lyrics (i.e., Lyrics__Container and Lyrics__Footer) and modifying the config pattern with them, and (3) iteratively add post-filters to get rid of HTML tags, bad formatting, etc. In this case, I'm not even getting any HTML when I use config pattern '(?<lyrics>.*)' (which I think should just capture the whole page?). I do get a "Lyrics found" printout in the log file though.

My first instinct was to curl an example URL from the log file, which got me a tiny HTML telling me I got redirected. If I uppercased the first character of the artist's name (so `curl https://genius.com/Artist-title-lyrics` instead of `curl https://genius.com/artist-title-lyrics`), curl returned the whole page as expected, but doing the same thing on the plugin side didn't really help. Also tried building the plugin myself to add some debug prints, but it looks like it depends on an old unavailable (?) version of YamlDotNet, so no luck there either.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on November 30, 2021, 09:14:39 PM
@crisp:  I'm guessing that you haven't found a way to restore this yml despite the data I PM'd you?  If not, thanks anyway for making the attempt.  I know it's bound by the limits of the dll itself.
Title: Re: LyricsReloaded (Updated)
Post by: crisp on December 01, 2021, 04:09:18 AM
Well this is embarassing, I wasn't seeing lyrics because at some point during debugging I removed the 's' flag from the config pattern.

@crisp:  I'm guessing that you haven't found a way to restore this yml despite the data I PM'd you?  If not, thanks anyway for making the attempt.  I know it's bound by the limits of the dll itself.
Thanks sveakul, your message pointed me in the right direction, here's the updated yml:
Code
name: Genius (2021-11-30)

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 id="lyrics-root-pin-spacer">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '[\[\{].{1,75}[\]\}]', ""]
- [replace, "\n\n", "\n"]
- trim
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 01, 2021, 07:03:15 AM
THANKS, crisp, this is working terrific again!  I think it may now bypass the "gotchas" that they throw in occasionally as it works more on the "root."  I did notice that it seems to strip ALL the empty lines between verses/sections, but I removed the - [replace, "\n\n", "\n"]  line from the post filters section (and for the heck of it rolled back - [regex, '[\[\{].{1,75}[\]\}]', ""] to - [regex, '\[.{1,75}\]', "") and it displays fine for me;  just personal taste, others may choose to use the originals.

You are a gentleman and a scholar, and thanks again for fixing Genius for us.
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 01, 2021, 01:40:02 PM
For anyone who wants to use the update provided by crisp, and is too lazy to make sveakul's changes...

Code
name: Genius (2021-11-30)

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 id="lyrics-root-pin-spacer">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

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

EDIT: Fixed typo and added line to get rid of the double line spacing per crisp's reply immediately following.
Title: Re: LyricsReloaded (Updated)
Post by: crisp on December 01, 2021, 05:43:30 PM
For anyone who wants to use the update provided by crisp, and is too lazy to make sveakul's changes...
Thanks phred, if this doesn't work for anyone, it's just a missing square bracket at the end of the last regex. And if you wanna get rid of the leftover double newlines, this can go right after that regex:
Code
- [regex, '\n{2,}',"\n\n", 's']
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 01, 2021, 06:36:36 PM
Thanks phred, if this doesn't work for anyone, it's just a missing square bracket at the end of the last regex.
Sorry, my fault not phred's, that will teach me not do copy/paste operations when I'm falling asleep.  crisp, thanks for the extra regex code that does indeed remove DOUBLE blank spaces that slipped by my edit.  For the sake of completeness, below is crisp's new full genius.yml code that includes the bracket I missed and the extra regex to be added to prevent the double blanks:

Code
name: Genius (2021-11-30)

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 id="lyrics-root-pin-spacer">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[.{1,75}\]', ""]
- [regex, '\n{2,}',"\n\n", 's']
- trim
Title: Re: LyricsReloaded (Updated)
Post by: Moshi_ on December 27, 2021, 09:49:17 PM
The only issue I am noticing is where ads are placed between lyric sections (ex. [chorus] [verse] etc), it is not adding an extra space. And it only happens on some songs not all.
Here is a screenshot detailing it -- https://imgur.com/a/PFBA6eJ

Is there a way to get that fixed?

I've got a different problem. Bracket words are not showing at all. Any way to fix this? Using sveakul's edit.

Screenshot:
(https://i.imgur.com/7GLCBT3.jpeg)
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 27, 2021, 10:30:02 PM
The bracketed section headers are removed by default, via a contribution to the code from frankz.  Most of us prefer this, but if you want them left there remove frankz's code line below from the rest of the script:

Code
- [regex, '\[.{1,75}\]', ""]
Title: Re: LyricsReloaded (Updated)
Post by: Moshi_ on December 28, 2021, 04:33:52 PM
Thank you!!
Title: No lyrics found (use LyricsReloaded)
Post by: YukiSoul on December 30, 2021, 02:43:45 PM
Can somebody tell me what happen on this LyricsReloaded log?
Code
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch
30/12/2021 11:10:49 [INFO] Musixmatch tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch_Asian
30/12/2021 11:10:49 [INFO] Musixmatch_Asian tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/Penny-and-Sparrow/Eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Genius
30/12/2021 11:10:49 [INFO] Genius tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://genius.com/penny-and-sparrow-eloise-lyrics
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - MetroLyrics
30/12/2021 11:10:49 [INFO] MetroLyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.metrolyrics.com/eloise-lyrics-penny-and-sparrow.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Urban Lyrics
30/12/2021 11:10:49 [INFO] Urban Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/pennyandsparrow/eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Song Lyrics
30/12/2021 11:10:49 [INFO] Song Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.songlyrics.com/penny-and-sparrow/eloise-lyrics/
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Teksty
30/12/2021 11:10:49 [INFO] Teksty tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://teksty.org/penny-and-sparrow,eloise,tekst-piosenki
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Smriti
30/12/2021 11:10:49 [INFO] Smriti tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://smriti.com/hindi-songs/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Letras de músicas
30/12/2021 11:10:49 [INFO] Letras de músicas tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://letras.mus.br/penny-and-sparrow/eloise/
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Hindi Lyrics
30/12/2021 11:10:49 [INFO] Hindi Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.hindilyrics.net/lyrics/of-Eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Cušpajz
30/12/2021 11:10:49 [INFO] Cušpajz tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://cuspajz.com/tekstovi-pjesama/pjesma/penny-and-sparrow/eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Oldies Lyrics
30/12/2021 11:10:49 [INFO] Oldies Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://oldielyrics.com/lyrics/penny_and_sparrow/eloise.html
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Song Lyrics
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Hindi Lyrics
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch_Asian!
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch!
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Teksty
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [WARN] The pattern <div class="lyrics">(?<lyrics>[\s\S]*?)</div> didn't match!
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Genius
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Oldies Lyrics
30/12/2021 11:10:51 [DEBUG] gzip compression detected
30/12/2021 11:10:51 [WARN] The pattern <div class="songbody">(?<lyrics>.*?)</div> didn't match!
30/12/2021 11:10:51 [INFO] No lyrics found.
30/12/2021 11:10:51 [DEBUG] no lyrics found from Smriti
30/12/2021 11:10:51 [DEBUG] gzip compression detected
30/12/2021 11:10:51 [WARN] The pattern <p\sclass="text\sclearfix">(?<lyrics>[\s\S]*?)</p> didn't match!
30/12/2021 11:10:51 [INFO] No lyrics found.
30/12/2021 11:10:51 [DEBUG] no lyrics found from Cušpajz
30/12/2021 11:10:52 [DEBUG] gzip compression detected
30/12/2021 11:10:52 [WARN] The pattern <div id="div_letra"[^>]*>(?<lyrics>.*?)</div> didn't match!
30/12/2021 11:10:52 [INFO] No lyrics found.
30/12/2021 11:10:52 [DEBUG] no lyrics found from Letras de músicas
its showing No lyrics found on lyric floating window.
but in the log, for example in this line,
Quote
30/12/2021 11:10:49 [INFO] Musixmatch tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch_Asian
when i open the link, there is lyrics in musixmatch site but why still "No lyric found" ?
Can anyone help? at least some guess about what is happening here.

https://imgur.com/a/6ayOkU9 (https://imgur.com/a/6ayOkU9)
Title: Re: LyricsReloaded (Updated)
Post by: phred on December 30, 2021, 04:10:21 PM
I moved this to the LyricsReloaded (Updated) thread.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2021, 04:18:30 PM
This line...
Code
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch!
...shows that it did find the lyrics at that url.
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on December 30, 2021, 06:54:37 PM
I moved this to the LyricsReloaded (Updated) thread.
thank you

This line...
Code
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch!
...shows that it did find the lyrics at that url.
yes, it is. but No lyrics appear on lyric floating window you can see second image in my imgur

 
https://imgur.com/a/6ayOkU9 (https://imgur.com/a/6ayOkU9)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2021, 06:59:20 PM
The plug-in retrieves lyrics from third-party sites.  It does not display the lyrics.  I don't know why MB wouldn't show lyrics if they are retrieved.

Are the lyrics present in your file?  In other words, is it just a display issue or are they also not being saved?

I don't know if it matters (I don't think it should since the lyrics are being found properly), but make sure you're using the updated script for MusixMatch (https://getmusicbee.com/forum/index.php?topic=25406.msg195077#msg195077) since the built-in one quit working.

But other than that I have no answers.  Sorry.
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on December 30, 2021, 07:22:18 PM
how can i check the lyrics present in my file?

it's not always "not found" it also shown the lyrics like in this log
Code
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - Musixmatch
31/12/2021 04:11:10 [INFO] Musixmatch tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/clouds-and-thorns/everything-is-possible-now
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - Genius
31/12/2021 04:11:10 [INFO] Genius tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://genius.com/clouds-and-thorns-everything-is-possible-now-lyrics
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - MetroLyrics
31/12/2021 04:11:10 [INFO] MetroLyrics tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://www.metrolyrics.com/everything-is-possible-now-lyrics-clouds-and-thorns.html
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - Urban Lyrics
31/12/2021 04:11:10 [INFO] Urban Lyrics tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/cloudsandthorns/everythingispossiblenow.html
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - Song Lyrics
31/12/2021 04:11:10 [INFO] Song Lyrics tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://www.songlyrics.com/clouds-and-thorns/everything-is-possible-now-lyrics/
31/12/2021 04:11:10 [DEBUG] Lyrics request: Clouds And Thorns - Everything Is Possible Now - Everything Is Possible Now - Musixmatch_Asian
31/12/2021 04:11:10 [INFO] Musixmatch_Asian tries to load the lyrics...
31/12/2021 04:11:10 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/Clouds-And-Thorns/Everything-Is-Possible-Now
31/12/2021 04:11:10 [DEBUG] gzip compression detected
31/12/2021 04:11:10 [DEBUG] lyrics found from Song Lyrics!
31/12/2021 04:11:10 [DEBUG] gzip compression detected
31/12/2021 04:11:10 [DEBUG] lyrics found from Musixmatch!
31/12/2021 04:11:10 [DEBUG] gzip compression detected
31/12/2021 04:11:10 [WARN] The pattern <div class="lyrics">(?<lyrics>[\s\S]*?)</div> didn't match!
31/12/2021 04:11:10 [INFO] No lyrics found.
31/12/2021 04:11:10 [DEBUG] no lyrics found from Genius
31/12/2021 04:11:15 [DEBUG] Received a notification of type TagsChanging
now i try to close MB, delete the log, re open MB, and this is the startup log
Code
31/12/2021 04:17:22 [INFO] mb_LyricsReloaded in version 1.1.10.0 started!
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_cuspajz_com
31/12/2021 04:17:22 [INFO] Provider loaded: Cušpajz
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_genius_com
31/12/2021 04:17:22 [INFO] Provider loaded: Genius
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_hindilyrics_net
31/12/2021 04:17:22 [INFO] Provider loaded: Hindi Lyrics
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_letras_mus_br
31/12/2021 04:17:22 [INFO] Provider loaded: Letras de músicas
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_metrolyrics_com
31/12/2021 04:17:22 [INFO] Provider loaded: MetroLyrics
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_musixmatch_com
31/12/2021 04:17:22 [INFO] Provider loaded: Musixmatch
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_musixmatch_com_asian
31/12/2021 04:17:22 [INFO] Provider loaded: Musixmatch_Asian
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_oldielyrics_com
31/12/2021 04:17:22 [INFO] Provider loaded: Oldies Lyrics
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_smriti_com
31/12/2021 04:17:22 [INFO] Provider loaded: Smriti
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_songlyrics_com
31/12/2021 04:17:22 [INFO] Provider loaded: Song Lyrics
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_teksty_org
31/12/2021 04:17:22 [INFO] Provider loaded: Teksty
31/12/2021 04:17:22 [DEBUG] Loading config from field provider_urbanlyrics_com
31/12/2021 04:17:22 [INFO] Provider loaded: Urban Lyrics
31/12/2021 04:17:22 [DEBUG] Loading config from file: C:\Users\myfolder\AppData\Roaming\MusicBee\mb_LyricsReloaded\providers\azlyrics.com.yml
31/12/2021 04:17:22 [ERROR] Failed to load a configuration:
31/12/2021 04:17:22 [ERROR] (Lin: 89, Col: 64, Chr: 9494) - (Lin: 89, Col: 64, Chr: 9494): Mapping values are not allowed in this context.
31/12/2021 04:17:22 [ERROR] YamlDotNet.Core.SyntaxErrorException: (Lin: 89, Col: 64, Chr: 9494) - (Lin: 89, Col: 64, Chr: 9494): Mapping values are not allowed in this context.
   at YamlDotNet.Core.Scanner.FetchValue()
   at YamlDotNet.Core.Scanner.FetchNextToken()
   at YamlDotNet.Core.Scanner.FetchMoreTokens()
   at YamlDotNet.Core.Scanner.InternalMoveNext()
   at YamlDotNet.Core.Parser.GetCurrentToken()
   at YamlDotNet.Core.Parser.ParseDocumentEnd()
   at YamlDotNet.Core.Parser.StateMachine()
   at YamlDotNet.Core.Parser.MoveNext()
   at YamlDotNet.Core.EventReader.Allow[T]()
   at YamlDotNet.Core.EventReader.Expect[T]()
   at YamlDotNet.RepresentationModel.YamlScalarNode..ctor(EventReader events, DocumentLoadingState state)
   at YamlDotNet.RepresentationModel.YamlNode.ParseNode(EventReader events, DocumentLoadingState state)
   at YamlDotNet.RepresentationModel.YamlDocument..ctor(EventReader events)
   at YamlDotNet.RepresentationModel.YamlStream.Load(TextReader input)
   at CubeIsland.LyricsReloaded.Provider.ProviderManager.loadProvider(TextReader configReader)
31/12/2021 04:17:22 [DEBUG] Loading config from file: C:\Users\myfolder\AppData\Roaming\MusicBee\mb_LyricsReloaded\providers\genius.com.yml
31/12/2021 04:17:22 [INFO] Provider loaded: Genius
31/12/2021 04:17:22 [INFO] The provider Genius does already exist and will be replaced.
31/12/2021 04:17:22 [DEBUG] Loading config from file: C:\Users\myfolder\AppData\Roaming\MusicBee\mb_LyricsReloaded\providers\musixmatch.com.yml
31/12/2021 04:17:22 [INFO] Provider loaded: Musixmatch
31/12/2021 04:17:22 [INFO] The provider Musixmatch does already exist and will be replaced.
31/12/2021 04:17:22 [DEBUG] Received a notification of type PluginStartup
31/12/2021 04:17:22 [DEBUG] Received a notification of type MusicBeeStarted
31/12/2021 04:17:22 [DEBUG] gzip compression detected
seems like there is error shown but unfortunately i don't know how to fix it. is it cause of the problem?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 30, 2021, 07:40:22 PM
A to Z lyrics was removed a long time ago because it stopped working, yet you have it here.  You're using the current version of the plug-in - are you using a custom provider for A to Z?  Either way, disable it and see if that fixes the problem.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on December 30, 2021, 10:14:44 PM
frankz:  I can't recall where I got the yml file--possibly your github site?-- but A-Z Lyrics Universe is working well for me using that, contents below:

Code
name: A-Z Lyrics Universe

variables:
    artist:
        type: artist
        filters:
        - lowercase
        - strip_nonascii
    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: "http://www.azlyrics.com/lyrics/{artist}/{title}.html"
    pattern: ['<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->(?<lyrics>.+?)<!-- MxM banner -->', s]
    
post-filters:
- strip_html
- trim
- utf8_encode
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on December 31, 2021, 07:00:36 AM
after replaced my AZLyrics Provider and using code from sveakul error is fixed.
i try reopen the first song that i open the log in here,
Can somebody tell me what happen on this LyricsReloaded log?
Code
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch
30/12/2021 11:10:49 [INFO] Musixmatch tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch_Asian
30/12/2021 11:10:49 [INFO] Musixmatch_Asian tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/Penny-and-Sparrow/Eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Genius
30/12/2021 11:10:49 [INFO] Genius tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://genius.com/penny-and-sparrow-eloise-lyrics
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - MetroLyrics
30/12/2021 11:10:49 [INFO] MetroLyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.metrolyrics.com/eloise-lyrics-penny-and-sparrow.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Urban Lyrics
30/12/2021 11:10:49 [INFO] Urban Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.urbanlyrics.com/lyrics/pennyandsparrow/eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Song Lyrics
30/12/2021 11:10:49 [INFO] Song Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.songlyrics.com/penny-and-sparrow/eloise-lyrics/
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Teksty
30/12/2021 11:10:49 [INFO] Teksty tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://teksty.org/penny-and-sparrow,eloise,tekst-piosenki
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Smriti
30/12/2021 11:10:49 [INFO] Smriti tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://smriti.com/hindi-songs/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Letras de músicas
30/12/2021 11:10:49 [INFO] Letras de músicas tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://letras.mus.br/penny-and-sparrow/eloise/
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Hindi Lyrics
30/12/2021 11:10:49 [INFO] Hindi Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.hindilyrics.net/lyrics/of-Eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Cušpajz
30/12/2021 11:10:49 [INFO] Cušpajz tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://cuspajz.com/tekstovi-pjesama/pjesma/penny-and-sparrow/eloise.html
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Oldies Lyrics
30/12/2021 11:10:49 [INFO] Oldies Lyrics tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://oldielyrics.com/lyrics/penny_and_sparrow/eloise.html
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Song Lyrics
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Hindi Lyrics
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch_Asian!
30/12/2021 11:10:50 [DEBUG] lyrics found from Musixmatch!
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Teksty
30/12/2021 11:10:50 [DEBUG] gzip compression detected
30/12/2021 11:10:50 [WARN] The pattern <div class="lyrics">(?<lyrics>[\s\S]*?)</div> didn't match!
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Genius
30/12/2021 11:10:50 [INFO] No lyrics found.
30/12/2021 11:10:50 [DEBUG] no lyrics found from Oldies Lyrics
30/12/2021 11:10:51 [DEBUG] gzip compression detected
30/12/2021 11:10:51 [WARN] The pattern <div class="songbody">(?<lyrics>.*?)</div> didn't match!
30/12/2021 11:10:51 [INFO] No lyrics found.
30/12/2021 11:10:51 [DEBUG] no lyrics found from Smriti
30/12/2021 11:10:51 [DEBUG] gzip compression detected
30/12/2021 11:10:51 [WARN] The pattern <p\sclass="text\sclearfix">(?<lyrics>[\s\S]*?)</p> didn't match!
30/12/2021 11:10:51 [INFO] No lyrics found.
30/12/2021 11:10:51 [DEBUG] no lyrics found from Cušpajz
30/12/2021 11:10:52 [DEBUG] gzip compression detected
30/12/2021 11:10:52 [WARN] The pattern <div id="div_letra"[^>]*>(?<lyrics>.*?)</div> didn't match!
30/12/2021 11:10:52 [INFO] No lyrics found.
30/12/2021 11:10:52 [DEBUG] no lyrics found from Letras de músicas
its showing No lyrics found on lyric floating window.
but in the log, for example in this line,
Quote
30/12/2021 11:10:49 [INFO] Musixmatch tries to load the lyrics...
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/penny-and-sparrow/eloise
30/12/2021 11:10:49 [DEBUG] Lyrics request: Penny and Sparrow - Eloise - Finch - Musixmatch_Asian
when i open the link, there is lyrics in musixmatch site but why still "No lyric found" ?
Can anyone help? at least some guess about what is happening here.

https://imgur.com/a/6ayOkU9 (https://imgur.com/a/6ayOkU9)
now lyrics shown as expected. thanks guys.
sometimes i got WARN like
Code
31/12/2021 03:35:24 [DEBUG] lyrics found from Song Lyrics!
31/12/2021 03:35:25 [DEBUG] gzip compression detected
31/12/2021 03:35:25 [WARN] The pattern <div class="Lyrics__Container.*?">(?<lyrics>.*)<div class="Lyrics__Footer.*?"> didn't match!
31/12/2021 03:35:25 [INFO] No lyrics found.
//---------------------or---------------------------
31/12/2021 03:39:39 [DEBUG] no lyrics found from Musixmatch_Asian
31/12/2021 03:39:39 [WARN] The pattern <p class="mxm-lyrics__content.*?">(?<lyrics>.*?)<div [^>]*"lyrics-report".*?> didn't match!
//----------------------or---------------------------
31/12/2021 03:39:39 [DEBUG] no lyrics found from Genius
31/12/2021 03:39:39 [DEBUG] gzip compression detected
31/12/2021 03:39:39 [DEBUG] gzip compression detected
31/12/2021 03:39:39 [WARN] The pattern <p class="mxm-lyrics__content ">\s*(?<lyrics>.*?)(</span>|<div[^>]*"lyrics-report") didn't match!
31/12/2021 03:39:39 [INFO] No lyrics found.
sometimes lyric found and no problem with the pattern, sometimes pattern didn't match.
is it normal? or i should change that provider too?
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on December 31, 2021, 07:38:28 AM
Sorry for asking so many things, i notice another reason why some of my music not found the lyrics
Do you guys have solution how to display lyrics if the artist is multiple?
in my music i always edit the artis name in this pattern "artistName1, artistName2, etc" let me show you in picture
(https://i.imgur.com/dXWDOAr.png)

when i open "you were good to me" LyricsReloaded  find the song like for example
musixmatch = http://www.musixmatch.com/lyrics/Jeremy-Zucker/you-were-good-to-me      
genius = https://genius.com/jeremy-zucker-you-were-good-to-me-lyrics
(NOTFOUND)

when i search it manually for,
musixmatch = https://www.musixmatch.com/lyrics/Jeremy-Zucker-feat-Chelsea-Cutler/you-were-good-to-me
genius  = https://genius.com/Jeremy-zucker-and-chelsea-cutler-you-were-good-to-me-lyrics
(FOUND)

in musixmatch  they use "feat" as replacement for comma(,)
in genius they use "and" as replacement for comma(,)

i got the logic here, but how can i make LyricsReloaded search the lyrics in this pattern if music artist are multiple?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 31, 2021, 01:53:55 PM
sometimes lyric found and no problem with the pattern, sometimes pattern didn't match.
is it normal? or i should change that provider too?
That means the page exists, but there are no lyrics on it (or they changed the code from the pattern that the plugin expects and the lyrics aren't between the tags that the plugin expects).  There's no way to fix it if it's the former, if it's the latter the way to fix it is to write new code for the provider as users in this thread have done for Musixmatch and Genius.

i got the logic here, but how can i make LyricsReloaded search the lyrics in this pattern if music artist are multiple?
You can't.  It will search for whatever is in "Display Artist" so display artist must be the artist that the lyric sites expect. 

The way that works is to split out multiple artists in the artist splitter, not show them in display artist, and list them as "feat" in the title. 
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on December 31, 2021, 07:51:19 PM
That means the page exists, but there are no lyrics on it (or they changed the code from the pattern that the plugin expects and the lyrics aren't between the tags that the plugin expects).  There's no way to fix it if it's the former, if it's the latter the way to fix it is to write new code for the provider as users in this thread have done for Musixmatch and Genius.
oh ok, i guess i should write my script for that.
do you have some great site so i can getting start to write the code?

The way that works is to split out multiple artists in the artist splitter, not show them in display artist, and list them as "feat" in the title.  
wait, if i make feat/and  it in the title  LyricsReloaded will find the song like,
"http://www.musixmatch.com/lyrics/Jeremy-Zucker/you-were-good-to-me-feat-Chelsea-Cutler" and will not found the lyrics.
while the correct one is "https://www.musixmatch.com/lyrics/Jeremy-Zucker-feat-Chelsea-Cutler/you-were-good-to-me"
(https://www.musixmatch.com/lyrics/ARTIST/TITLE)

or maybe is there a way to make if else statement in provider.yml code. i want to make it be like if(artist is multiple) do use this code. else, do code.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on December 31, 2021, 08:54:15 PM
oh ok, i guess i should write my script for that.
do you have some great site so i can getting start to write the code?
https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded

wait, if i make feat/and  it in the title  LyricsReloaded will find the song like,
"http://www.musixmatch.com/lyrics/Jeremy-Zucker/you-were-good-to-me-feat-Chelsea-Cutler" and will not found the lyrics.
while the correct one is "https://www.musixmatch.com/lyrics/Jeremy-Zucker-feat-Chelsea-Cutler/you-were-good-to-me"
(https://www.musixmatch.com/lyrics/ARTIST/TITLE)

or maybe is there a way to make if else statement in provider.yml code. i want to make it be like if(artist is multiple) do use this code. else, do code.
The long and short of it is that your files have to be tagged so that they match the standards and conventions used by the lyrics site(s) you want to use.
Title: Re: LyricsReloaded (Updated)
Post by: YukiSoul on January 01, 2022, 10:10:21 AM
ok thankyou for all the answer :)
Title: Re: LyricsReloaded (Updated)
Post by: wavedash on January 19, 2022, 03:40:21 AM
Can anyone help me with a Regex problem? I'm trying to make a duplicate Musixmatch yaml that'll try to get lyrics for artists with swapped name order.

Example: I have a song titled "Kieru Daydream" by "Kawano Marina". But the Musixmatch URL is https://www.musixmatch.com/lyrics/Marina-Kawano/Kieru-Daydream. Predictably, here's what happens with the updated Musixmatch yaml from a few pages back:

Code
18/01/2022 09:27:38 [INFO] Musixmatch-Update tries to load the lyrics...
18/01/2022 09:27:38 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/kawano-marina/kieru-daydream
18/01/2022 09:27:38 [INFO] No lyrics found.
18/01/2022 09:27:38 [DEBUG] no lyrics found from Musixmatch-Update

I'm trying stuff like this, but it seems like it isn't matching:

Code
[regex, '(\w+) (\w+)', '\2 \1']
or
[regex, '([a-z]+) ([a-z]+)', '\2 \1']

Code
18/01/2022 09:37:59 [INFO] Musixmatch-Name-Order tries to load the lyrics...
18/01/2022 09:37:59 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/kawano-marina/kieru-daydream
18/01/2022 09:37:59 [INFO] No lyrics found.
18/01/2022 09:37:59 [DEBUG] no lyrics found from Musixmatch-Name-Order
Title: Re: LyricsReloaded (Updated)
Post by: avitar on January 19, 2022, 09:29:07 AM
Quote
[regex, '(\w+) (\w+)', '\2 \1']

You were on the right track. The problem was mostly the backreference. What you need is this:

Code
    - [regex, '(\w+)(\s)(\w+)', $3$2$1]

Unlike normal find/replace syntax, you are passing these variables back to plugin - written in C#. The plugin won't recognize the \1 syntax and throws an error.

You probably already know, but you would place this line above the following line in the artist variable area:

Code
     - [strip_nonascii, -]

Another problem you may face is that many of these configuration files use the filters from the "artist" field  for the title and album fields. It reduces typing. You'll see something like this.


Code
   title:
        type: title
        filters: artist


Obviously if yours does that then you would have to modify the title filter. Otherwise your title would swap as well.

Another caveat to remember is that if your artist name is more than two names, then the above solution will not work. You would just be swapping the first two names around.  However I can't imagine that Musixmatch would do this swapping thing for an artist with more than two names - ie David Allen Coe vs Coe Allen David or some such nonsense. So you should be good.

Anyway, I have included the yml code with everything modified and in the right place. I tested it prior to posting and it works fine (or rather I got a bunch of lyrics; in Japanese I think.) The bottom line is that I received lyrics from  the site.


The following yml file code is a special case. It will not work for normal requests to Musixmatch.

Code
name: Musixmatch Swap Artist Order

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        # -----------Library Unique------------ #
        - [replace, "!!!", "chk-chik-chick"]    
        - [regex, '(?<=\W|\s)+(featuring.+|feat[\W\s]+|ft[\W\s]+|(f[\W\s])).+', ""]                          
        #--------------URL Unique-------------- #
        # [regex, ' & ', " and "]              
        # ------------------------------------- #
        - [regex, '[^a-z0-9\s]{1,}', ""]      
        - [regex, '[\W]{2,}', " "]              
        - [regex, '(\W+(?=$))|(^\W+)', ""]
        - [regex, '(\w+)(\s)(\w+)', $3$2$1]          
        - [strip_nonascii, -]
    
    title:
        type: title
        filters:
        - strip_diacritics
        - lowercase
        # -----------Library Unique------------ #
                        
        #--------------URL Unique-------------- #
            
        # ------------------------------------- #
        - [regex, '[^a-z0-9\s]{1,}', ""]      
        - [regex, '[\W]{2,}', " "]              
        - [regex, '(\W+(?=$))|(^\W+)', ""]          
        - [strip_nonascii, -]

    album:
        type: album
        filters:
        - strip_diacritics
        - lowercase
        # -----------Library Unique------------ #
                        
        #--------------URL Unique-------------- #
            
        # ------------------------------------- #
        - [regex, '[^a-z0-9\s]{1,}', ""]      
        - [regex, '[\W]{2,}', " "]              
        - [regex, '(\W+(?=$))|(^\W+)', ""]          
        - [strip_nonascii, -]

headers:
    User-Agent: 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:77.0) Gecko/20100101 Firefox/77.0'  

config:
    url: "http://www.musixmatch.com/lyrics/{artist}/{title}"
    pattern: ['<p class="mxm-lyrics__content.*?">(?<lyrics>.*?)<div [^>]*"lyrics-report".*?>', s]

post-filters:
        #------------Website Unique------------- #
        - [replace, "</span></p><div>", "\n"]
        - [regex, "<script.*?</script>", "", 's']
        #--------------------------------------- #
        - br2nl        
        - strip_html                            
        - utf8_encode                          
        - entity_decode                        
        - clean_spaces                          
        - [regex, '\[.+\]', ""]                  
        - [regex, '\n{2,}',"\n\n", 's']          
        - trim

Let me know if you need any more assistance.
Title: Re: LyricsReloaded (Updated)
Post by: LazR on January 27, 2022, 04:49:29 AM
Small change for Genius. With the old '(2021-11-30)' version it just started adding -- 'xxxx Lyrics' to the top so changed the div class where lyrics should start.

If anyone knows how to regex fix there not being a space where ads would appear that would be great.

Code
name: Genius (2022)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\n{2,}',"\n\n", 's']
- trim
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on January 27, 2022, 08:07:55 PM
Small change for Genius. With the old '(2021-11-30)' version it just started adding -- 'xxxx Lyrics' to the top so changed the div class where lyrics should start.
Thanks LazR for the working fix!

For those who prefer to keep the "section" type headers out of the lyrics ([refrain], etc) add the code line below above the existing regex expression in the post-filters section:

Code
- [regex, '\[.{1,75}\]', ""]
Remember to re-add Genius after the substitution in the provider hierarchy if keeping the changed "Name" line in LazR's code.  Like him I prefer to keep a date designation there.  Here is the complete code that includes the added regex line mentioned above:

Code
name: Genius (2022)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[.{1,75}\]', ""]
- [regex, '\n{2,}',"\n\n", 's']
- trim
Title: Re: LyricsReloaded (Updated)
Post by: phred on January 27, 2022, 09:11:06 PM
Thanks to both LazR and sveakul for this update.
Title: Re: LyricsReloaded (Updated)
Post by: DareNova on January 28, 2022, 08:24:21 AM
I noticed when 2 artists work in collaboration, they'd sometimes get a separate page on genius, kinda like this: https://genius.com/artists/Oliver-tree-and-little-big (https://genius.com/artists/Oliver-tree-and-little-big). But the provider made by both LazR and sveakul wouldn't account for this, so I tried fixing this. This seems to work after putting it under the replace already in there
Code
- [replace, "&", "and"]
I don't know if this messes anything else up, but like I said, it seems to work pretty well for me

Another thing I tried doing was trying to get it to recognize "w/ ..." and "+ ..." similar to things like "feat." and "ft."
A good example would be this song: Twikipedia - titles (https://genius.com/Twikipedia-titles-lyrics)
In my library it is titled "titles 웃 w/ funeral" to keep it similar to it's soundcloud title, but this causes the search to include the "w/" part
Here is the log created by it:
Code
28/01/2022 08:16:52 [DEBUG] Lyrics request: twikipedia - titles 웃 w/ funeral - titles 웃 - Genius
28/01/2022 08:16:52 [INFO] Genius (2022) tries to load the lyrics...
28/01/2022 08:16:52 [DEBUG] The constructed URL: https://genius.com/twikipedia-titles-w-funeral-lyrics
A similar thing happens with titles including "+" as the feat bit, like "medusa +pichu (souls1 & lewisgoing)"
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on January 28, 2022, 05:14:41 PM
I noticed when 2 artists work in collaboration, they'd sometimes get a separate page on genius, kinda like this: https://genius.com/artists/Oliver-tree-and-little-big (https://genius.com/artists/Oliver-tree-and-little-big). But the provider made by both LazR and sveakul wouldn't account for this, so I tried fixing this. This seems to work after putting it under the replace already in there
Code
- [replace, "&", "and"]
I don't know if this messes anything else up, but like I said, it seems to work pretty well for me
Thanks DareNova for this!  I notice that another user "beat you to it", ShotgunStev3 (https://getmusicbee.com/forum/index.php?topic=25406.msg189875#msg189875 (https://getmusicbee.com/forum/index.php?topic=25406.msg189875#msg189875)), but it didn't show up in complete yml posts so far.  Has anyone else been using this as described, and have you noitced any unintended results?  BTW you mentioned me in your "made by" statement, actually I haven't made any personal coding contributions other than re-arranging some lines already made by others.  The honors go to frankz, LaZr, Redearth, crisp, hiccup, and probably others I've missed.
Title: Re: LyricsReloaded (Updated)
Post by: Nayan Nepal on February 12, 2022, 06:31:31 AM
Can anyone help me? Whenever I click on search next provider, I only get results from 2 sites : chartlyrics and songlyrics even though I have checked every other boxes. What is wrong?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on February 12, 2022, 06:35:59 AM
The plug-in is seen as one provider by MusicBee no matter how many individual providers you search within the plug-in.  So whichever is the first site to return lyrics within the plug-in, it will always be the one offered up by MusicBee even if other sites from the plug-in also have lyrics.
Title: Re: LyricsReloaded (Updated)
Post by: Nayan Nepal on February 12, 2022, 06:38:08 AM
The plug-in is seen as one provider by MusicBee no matter how many individual providers you search within the plug-in.  So whichever is the first site to return lyrics within the plug-in, it will always be the one offered up by MusicBee even if other sites from the plug-in also have lyrics.

So if I disable songlyrics and chartlyrics and only check Genius or any other site that has the lyrics, it should work as usual? Because I think I've encountered a problem with that too as no results show up when both of the aforementioned sites are disabled.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on February 12, 2022, 06:44:29 AM
Each lyrics site native to MusicBee will be seen as an individual site and get cycled through by search next provider. All sites enabled through the plugin will be seen as one provider.  Song Lyrics and Genius are plugin providers. Chart Lyrics is not. 

If you have a specific problem song or songs, you can also just paste the lyrics for that song or those songs into MusicBee. You are not bound to let MusicBee automatically discover them.
Title: Re: LyricsReloaded (Updated)
Post by: Nayan Nepal on February 12, 2022, 06:48:21 AM
Each lyrics site native to MusicBee will be seen as an individual site and get cycled through by search next provider. All sites enabled through the plugin will be seen as one provider.  Song Lyrics and Genius are plugin providers. Chart Lyrics is not. 

If you have a specific problem song or songs, you can also just paste the lyrics for that song or those songs into MusicBee. You are not bound to let MusicBee automatically discover them.
I could do it manually, but then what would be the point of installing a plugin in the first place? Thanks for the info anyway.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on February 12, 2022, 06:50:36 AM
I could do it manually, but then what would be the point of installing a plugin in the first place?
Because it works pretty well in most situations. 
Title: Re: LyricsReloaded (Updated)
Post by: Nayan Nepal on February 12, 2022, 06:55:54 AM
Well, it works..It's just that I wanted to cycle through lyrics for a song from different sites from just the lyrics window without doing any copy-paste work. I guess chartlyrics and songlyrics will have to do for now. :)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on February 12, 2022, 06:57:17 AM
Well, it works..It's just that I wanted to cycle through lyrics for a song from different sites from just the lyrics window without doing any copy-paste work. I guess chartlyrics and songlyrics will have to do for now. :)
It's hard when the things we download from the internet for free aren't perfect, but it's a burden we must all bear.  ;D

Just wait until you start trying to look at artist pictures!
Title: Re: LyricsReloaded (Updated)
Post by: Nayan Nepal on February 12, 2022, 07:03:18 AM
Maybe I'm misremembering but finding lyrics worked flawlessly some years ago for me while cycling through the providers option. As for the artist pictures, I'm just content with getting the lyrics and album artwork tag, so no worries there. At least the album art works almost always.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on February 12, 2022, 07:06:10 AM
Maybe I'm misremembering but finding lyrics worked flawlessly some years ago for me while cycling through the providers option.
I'm sorry this is happening to you.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on February 12, 2022, 05:35:05 PM
Maybe I'm misremembering but finding lyrics worked flawlessly some years ago for me while cycling through the providers option. As for the artist pictures, I'm just content with getting the lyrics and album artwork tag, so no worries there. At least the album art works almost always.
You still haven't said if you downloaded the latest version of the plugin.  Also, if you read the latter part of this forum as I initially advised, you'll see that some sources that went inactive due to site changes have since been fixed through contributions of newer yml files--Genius and MusixMatch are two of these--that now produce all kinds of results if downloaded from the relevant posts and put in your "C:\...\AppData\mb_LyricsReloaded\providers" directory.
Title: Re: LyricsReloaded (Updated)
Post by: Tybot on February 22, 2022, 03:07:17 AM
The updated yml's are very much appreciated! My lyrics fetching have been kind of shitty for a while now and I couldn't be bothered to fix it, but the last pages of this thread solved everything.

Don't know if this is something Genius added recently, but there's a string just above the lyrics "(song title) Lyrics" that are being fetched as well by the latest yml. Example: https://genius.com/Britney-spears-toxic-lyrics

If someone has a regex that could remove the first line (good/bad solution?), then that would be awesome.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on February 22, 2022, 03:47:33 AM
The following (complete) yml has the fix by LazR that removes the "(title) Lyrics" line in Genius.  You will have to re-select it in your prefs if keeping the name-with-date, or change it in code to match what you use now:

Code
name: Genius (2022-1-27)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[.{1,75}\]', ""]
- [regex, '\n{2,}',"\n\n", 's']
- trim
Title: Re: LyricsReloaded (Updated)
Post by: Tybot on February 23, 2022, 12:45:52 AM
The following (complete) yml has the fix by LazR that removes the "(title) Lyrics" line in Genius.  You will have to re-select it in your prefs if keeping the name-with-date, or change it in code to match what you use now:

Code
name: Genius (2022-1-27)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

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

Great. Now I feel really stupid. Thought I was using the latest one but it was 2021-11-30. 2022-01-27 worked perfectly. Thanks a lot to both of you!
Title: Re: LyricsReloaded (Updated)
Post by: SkyZippr on March 09, 2022, 04:30:54 AM
This is more of a note to myself.
In case anyone prefers to keep those section headers (stuff like [Verse 1:], [Chorus:]) from Genius, but also hates that sometimes there's no blank line between the sections to properly set them apart, here's what my post-filters look like:
Code
post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[',"\n["]
- [regex, '\n{2,}',"\n\n", 's']
- trim
I don't know much about regex, but this is working for me so far.
Title: Re: LyricsReloaded (Updated)
Post by: LazR on March 21, 2022, 05:29:28 AM
This is more of a note to myself.
In case anyone prefers to keep those section headers (stuff like [Verse 1:], [Chorus:]) from Genius, but also hates that sometimes there's no blank line between the sections to properly set them apart, here's what my post-filters look like:
Code
post-filters:
- br2nl
- strip_html
- utf8_encode
- entity_decode
- clean_spaces
- [regex, '\[',"\n["]
- [regex, '\n{2,}',"\n\n", 's']
- trim
I don't know much about regex, but this is working for me so far.

Thank you for that, for some reason I could not figure that one out!
Title: Re: LyricsReloaded (Updated)
Post by: belomeclone on March 23, 2022, 05:35:03 AM
I've seen some posts with the data printout, but how can I see why Lyrics Reloaded is failing to scrape a song? I have a song that it fails to scrape from Genius and I can't understand why. I don't NEED it to scrape from Genius, but now I'm curious! Everything seems to match just fine!

Is there a way to show that? I don't scrape to add to the files (though I might), I scrape to add to the cache, so if it's a feature that's only visible there I'll have to explore that.

EDIT: I'm guessing it's having trouble with the parentheses when they are part of the song title. Did I miss a fix for that? I don't understand yml or what language it is in, but in my yml file for Genius I see only this for title. I'm guessing it needs to be added on to?
Quote
   title:
        type: title
        filters: artist
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on March 23, 2022, 05:47:07 PM
Copy the code as-is from this post and save it to a text file;  then, rename the file "genius.yml":  https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321 (https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321) .

Then, move the new file genius.yml into the folder MusicBee\AppData\mb_LyricsReloaded\providers, overwriting any file of the same name.  If you have the Installer version of MB the path is probably like C:\Users\(username)\AppData.. etc.  If you have the Windows Store version you can't do this at all;  I recommend you move to the Portable version.

Next, go into MB Preferences/Tags(2)/auto-tagging/lyrics, press the "..." button next to the lyrics box, and in the source choices check "Genius (2022-1-27)", and uncheck any other Genius entry (techniques here may vary, this is what I do).  Hit the "Update" button, then Save.

This will give you working Genius lyrics retrieval.  Follow the same general procedure for A-Z Lyrics Universe (https://getmusicbee.com/forum/index.php?topic=25406.msg196786#msg196786 (https://getmusicbee.com/forum/index.php?topic=25406.msg196786#msg196786)) and MusixMatch (use the second code script from the post at https://getmusicbee.com/forum/index.php?topic=25406.msg195077#msg195077 (https://getmusicbee.com/forum/index.php?topic=25406.msg195077#msg195077)).

Tweaks to the Genius code to provide different results in spacing, etc. can be found in other posts on the thread.
Title: Re: LyricsReloaded (Updated)
Post by: Kasionz on March 23, 2022, 09:21:26 PM
Awesome thanks all!
Title: Re: LyricsReloaded (Updated)
Post by: belomeclone on March 23, 2022, 11:29:52 PM
Copy the code as-is from this post and save it to a text file;  then, rename the file "genius.yml":  https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321 (https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321) .

Then, move the new file genius.yml into the folder MusicBee\AppData\mb_LyricsReloaded\providers, overwriting any file of the same name.  If you have the Installer version of MB the path is probably like C:\Users\(username)\AppData.. etc.  If you have the Windows Store version you can't do this at all;  I recommend you move to the Portable version.

Next, go into MB Preferences/Tags(2)/auto-tagging/lyrics, press the "..." button next to the lyrics box, and in the source choices check "Genius (2022-1-27)", and uncheck any other Genius entry (techniques here may vary, this is what I do).  Hit the "Update" button, then Save.

This will give you working Genius lyrics retrieval.  Follow the same general procedure for A-Z Lyrics Universe (https://getmusicbee.com/forum/index.php?topic=25406.msg196786#msg196786 (https://getmusicbee.com/forum/index.php?topic=25406.msg196786#msg196786)) and MusixMatch (use the second code script from the post at https://getmusicbee.com/forum/index.php?topic=25406.msg195077#msg195077 (https://getmusicbee.com/forum/index.php?topic=25406.msg195077#msg195077)).

Tweaks to the Genius code to provide different results in spacing, etc. can be found in other posts on the thread.

I have the proper yml for Genius. It just is having trouble with songs that have a parenthesis in their name it seems.

This is my yml

Quote
name: Genius (2022-1-27)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<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
Title: Re: LyricsReloaded (Updated)
Post by: LazR on April 06, 2022, 11:20:10 PM
Wouldn't using
Code
- [regex, '\s&(?=\s)', " and"]
be better than
Code
- [regex, '((?<=\s)([^a-z0-9\s-])(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
for artist filters because Genius changes '&' to 'and' in URLs? Is there something else that the current longer regex also does that I can't figure out?
Title: Re: LyricsReloaded (Updated)
Post by: belomeclone on April 10, 2022, 02:52:39 AM
Wouldn't using
Code
- [regex, '\s&(?=\s)', " and"]
be better than
Code
- [regex, '((?<=\s)([^a-z0-9\s-])(\s|\W)+)|((?<=\w)([^a-z0-9-])+(\s|\W)+)', " "]
for artist filters because Genius changes '&' to 'and' in URLs? Is there something else that the current longer regex also does that I can't figure out?

I made this change and lyrics are now pulling from Genius for artists like Hall & Oates!! Your knowledge of how Genius works is impressive!
Any idea what in the code is causing it to not recognize parenthesis correctly? I have two songs, one the regular and one with a (Remix) tag at the end. It matches what's on Genius, but it pulls the regular song lyrics for both files.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on April 15, 2022, 03:49:40 AM
Is there a way to remove [Intro], [Chorus], [Verse], etc ?
If you mean from Genius, the code at the post below already does that, thanks to a mod by frankz:
https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321 (https://getmusicbee.com/forum/index.php?topic=25406.msg198321#msg198321)
Title: Re: LyricsReloaded (Updated)
Post by: RetroGameReaper on April 19, 2022, 01:58:37 AM
Is there a way to make it so the script can read
Code
’ ( )
signs? I don't know how to make my own script since YAML is new to me. I took a script from here
Code
name: Genius (2022-1-27)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<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

This is the log file when using tracks with an apostrophe and parenthesis:
Code
18/04/2022 08:28:06 [DEBUG] Lyrics request: Andrew Jackson Jihad - We Didn’t Come Here To Rock - Can’t Maintain - Genius (2022-1-27)
18/04/2022 08:28:06 [INFO] Genius (2022-1-27) tries to load the lyrics...
18/04/2022 08:28:06 [DEBUG] The constructed URL: https://genius.com/andrew-jackson-jihad-we-didn-t-come-here-to-rock-lyrics
18/04/2022 08:28:06 [INFO] No lyrics found.
18/04/2022 08:28:06 [DEBUG] no lyrics found from Genius (2022-1-27)
18/04/2022 08:28:23 [DEBUG] Lyrics request: Andrew Jackson Jihad - Olde(y) Tyme - Can’t Maintain - Genius (2022-1-27)
18/04/2022 08:28:23 [INFO] Genius (2022-1-27) tries to load the lyrics...
18/04/2022 08:28:23 [DEBUG] The constructed URL: https://genius.com/andrew-jackson-jihad-olde-y-tyme-lyrics
18/04/2022 08:28:23 [INFO] No lyrics found.
18/04/2022 08:28:23 [DEBUG] no lyrics found from Genius (2022-1-27)
18/04/2022 08:28:39 [DEBUG] Lyrics request: Andrew Jackson Jihad - Kazoo Sonata In Cmaj - Can’t Maintain - Genius (2022-1-27)
18/04/2022 08:28:39 [INFO] Genius (2022-1-27) tries to load the lyrics...
18/04/2022 08:28:39 [DEBUG] The constructed URL: https://genius.com/andrew-jackson-jihad-kazoo-sonata-in-cmaj-lyrics
18/04/2022 08:28:40 [DEBUG] gzip compression detected
18/04/2022 08:28:40 [WARN] The pattern <div data-lyrics-container="true" class="Lyrics__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc- didn't match!
18/04/2022 08:28:40 [INFO] No lyrics found.
18/04/2022 08:28:40 [DEBUG] no lyrics found from Genius (2022-1-27)
18/04/2022 08:34:03 [DEBUG] Received a notification of type TagsChanging
18/04/2022 08:35:16 [DEBUG] Received a notification of type TagsChanging
18/04/2022 08:39:05 [DEBUG] Received a notification of type TagsChanging
18/04/2022 08:44:43 [DEBUG] Lyrics request: Aimee Mann - That’s Just What You Are - I’m With Stupid - Genius (2022-1-27)
18/04/2022 08:44:43 [INFO] Genius (2022-1-27) tries to load the lyrics...
18/04/2022 08:44:43 [DEBUG] The constructed URL: https://genius.com/aimee-mann-that-s-just-what-you-are-lyrics
18/04/2022 08:44:44 [INFO] No lyrics found.
18/04/2022 08:44:44 [DEBUG] no lyrics found from Genius (2022-1-27)

I noticed that for songs with an apostrophe, Genius ignores the sign in the URL. Ex: That’s Just What You Are --> https://genius.com/Aimee-mann-thats-just-what-you-are-lyrics
The same goes for parenthess: Olde(y) Tyme(y) --> https://genius.com/Ajj-oldey-tymey-lyrics
Title: Re: LyricsReloaded (Updated)
Post by: Crash on May 22, 2022, 03:18:53 AM
I just clean install Musicbee, new pc, and I'm a bit lost...
On my old install I had so many plugins and I have rewrite all the code on every config files...
I don't want to use all my old config .ini, too old, I even had old custom plugins like Ipod autosync, lastfm things, minilyrics...
Was it from winamp ? Idk, I don't use my ipod 160go anymore  ;D
I use Tidal with Roon Labs... But that's not the point.
When I'm gaming or partying I prefer Musicbee  :-*

So I clean install musicbee, I use some of my MusicBeeLibrarySettings.ini and skins config, looks nice and organise !

I just miss auto lyrics display..
And, sorry, I don't feel like reading all this topic :s

So, maybe we need an abstract, a TLDR,  how how to configure this shit ? Where to download ?

Ps: I still have my old files for perfect auto-lyrics and all, just wanna do a clean install.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on May 22, 2022, 08:19:47 AM
And, sorry, I don't feel like reading all this topic :s
So, maybe we need an abstract, a TLDR,  how how to configure this shit ? Where to download ?
read post #1
Title: Re: LyricsReloaded (Updated)
Post by: Newbee22 on May 29, 2022, 06:28:05 PM
Hello,

I created a thread about this in Questions and was pointed here. I can confirm I have it [mostly] working now, so thank you for that! However although this now works great for more mainstream songs, where the internet is full of lyrics for them, it still isn't working properly.

For example I searched google for 'jewel half life lyrics' and the first one that comes up is the full set of lyrics from Musixmatch. Another is the song by Stars called To Feel What They Feel, these lyrics are on Genius I'm looking at them right now, but again not showing in my Lyrics panel of MB it just says "No lyrics found". Clicking Redo Search multiple times makes no difference.

When I go to Preferences > Tags (2) > Lyrics I have selected 3 and ordered them as so:

1. Musixmatch; 2. Genius; 3. A-Z Lyrics Universe

I have also tried with only 1 and 2 selected above.

Don't get me wrong, I am glad to have lyrics working for some songs now rather than none, but is there anybody that can help me fix this so that it works flawlessly like it used to?
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 29, 2022, 07:33:53 PM
The first place to start is to make sure you are using the updated versions of the yml files corresponding to the selected search sites.  You can find these posted elsewhere within this thread, but for the heckuvit I will post them here.  You need to copy the code from the box, and paste that individually into text files renamed with the *yml extenson, like "genius.yml," and then put those into the folder "C:\MusicBee\AppData\mb_LyricsReloaded\providers" (example path is with Portable version, will vary with Installer version and is a no-go with Store version).  Restart MusicBee if it wasn't closed.  Then, select those versions in Prefs/Tags(2)/lyrics/Lyrics Providers ("..." button).  Note that the name on the selection list will correspond to the name on the first code line "name:," not the yml filename itself if those are different.  Then, choose "Update", and Save.  This is all easier than it sounds.

Genius:

Code
name: Genius (2022-1-27)

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__Container-sc-1ynbvzw-6 jYfhrf">(?<lyrics>.*)<div class="Lyrics__Footer-sc-', 's']

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

AZLyrics:

Code
name: A-Z Lyrics Universe

variables:
    artist:
        type: artist
        filters:
        - lowercase
        - strip_nonascii
    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: "http://www.azlyrics.com/lyrics/{artist}/{title}.html"
    pattern: ['<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->(?<lyrics>.+?)<!-- MxM banner -->', s]
    
post-filters:
- strip_html
- trim
- utf8_encode

Musixmatch:

Code
name: Musixmatch-new

variables:
    artist:
        type: artist
        filters:
        - strip_diacritics
        - lowercase
        - [regex, "'", ""]
        - [regex, "/", " "]
        - [regex, '\s&(?=\s)', " "]
        - [regex, '(?<=\W|\s)+(feat.+|ft[\W\s]+|(f\.\s)).+', ""]
        - [regex, '[^\sa-z0-9]\s*', ""]
        - [strip_nonascii, -]
    title:
        type: title
        filters:
        - strip_diacritics
        - lowercase
        - [regex, " '|' |/", " "]
        - [regex, "'", " "]
        - [regex, '\.+|,+|/+|(\W+(?=$))|(^\W+)', ""]
        - [regex, '\s&(?=\s)', " and"]
        - [strip_nonascii, -]

config:
    url: "http://www.musixmatch.com/lyrics/{artist}/{title}"
    pattern: ['<p class="mxm-lyrics__content.*?">(?<lyrics>.*?)<div [^>]*"lyrics-report".*?>', s]

post-filters:
- [regex, "<script.*?</script>", "", s]
- strip_html
- utf8_encode
- entity_decode
- clean_spaces

The built-in Song Lyrics code also works fine for me as-is, select it also as it has stuff others do not.  The rest are "feel free to try."
Title: Re: LyricsReloaded (Updated)
Post by: Newbee22 on May 29, 2022, 09:12:20 PM
Thank you for the above, that's really helpful.

I've followed all of the steps. I'm now looking in the logs (AppData\Roaming\MusicBee\mb_LyricsReloaded) and can see the error it's getting - are you able to tell me in layman terms what might be going wrong and how I can fix it?

29/05/2022 09:06:05 [DEBUG] Lyrics request:  - Jewel - Half Life - Freewheelin' Woman - Genius
29/05/2022 09:06:05 [INFO] Genius tries to load the lyrics...
29/05/2022 09:06:05 [DEBUG] The constructed URL: http://genius.com/jewel-half-life-lyrics
29/05/2022 09:06:05 [DEBUG] Lyrics request:  - Jewel - Half Life - Freewheelin' Woman - Musixmatch
29/05/2022 09:06:05 [INFO] Musixmatch tries to load the lyrics...
29/05/2022 09:06:05 [DEBUG] The constructed URL: http://www.musixmatch.com/lyrics/jewel/half-life
29/05/2022 09:06:05 [DEBUG] Lyrics request:  - Jewel - Half Life - Freewheelin' Woman - A-Z Lyrics Universe
29/05/2022 09:06:05 [INFO] A-Z Lyrics Universe tries to load the lyrics...
29/05/2022 09:06:05 [DEBUG] The constructed URL: http://www.azlyrics.com/lyrics/jewel/halflife.html
29/05/2022 09:06:05 [DEBUG] gzip compression detected
29/05/2022 09:06:05 [WARN] The pattern <!-- start of lyrics -->(?<lyrics>.+?)<!-- end of lyrics --> didn't match!
29/05/2022 09:06:05 [INFO] No lyrics found.
29/05/2022 09:06:05 [DEBUG] no lyrics found
29/05/2022 09:06:05 [DEBUG] gzip compression detected
29/05/2022 09:06:05 [DEBUG] lyrics found
29/05/2022 09:06:05 [DEBUG] gzip compression detected
29/05/2022 09:06:05 [WARN] The pattern <div\s+class="song_body-lyrics"[^>]*?>[\s\S]*?<p>(?<lyrics>[\s\S]*?)</p> didn't match!
29/05/2022 09:06:05 [INFO] No lyrics found.
29/05/2022 09:06:05 [DEBUG] no lyrics found
Title: Re: LyricsReloaded (Updated)
Post by: Newbee22 on May 29, 2022, 09:37:03 PM
UPDATE: One thing I've noticed is that in Lyrics Providers panel of Preferences I don't have Genius (2022-1-27) I just have Genius, same with I have Musixmatch but I do not see Musixmatch-new could this be my problem?

I definitely have the YML files in the correct place so not sure why they're not being picked up.
Title: Re: LyricsReloaded (Updated)
Post by: Newbee22 on May 29, 2022, 09:46:54 PM
BETTER UPDATE !!

I just rebooted and they appeared in the list, and it's now working perfectly.

Thank you so much - this is great!  :D
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on May 29, 2022, 10:01:14 PM
OK, glad it's working for you.  I assumed the yml file additions would be made with MusicBee closed;  have updated the instructions thanks to your input.
Title: Re: LyricsReloaded (Updated)
Post by: Tybot on June 01, 2022, 02:26:50 AM
Anyone else having issues with line breaks being removed or inserted?

This one is not a plugin issue, but Musixmatch has done this for a while. When copying the lyrics from their site, a line break gets inserted at the 4th line, which usually separates the last line of the first verse from the previous ones which results in this:

line1
line2
line3

line4

line5
line6

No idea why...

Lately, though, this plugin along with the latest Genius yml started to remove line breaks from a lot of songs. Copying them manually from the web works fine, but not when using the plugin. The exact opposite of the issue described above with Musixmatch in other words.

Apologies for using a Swedish example, but here's the most recent experience I had with this. Line break between 2nd and 3rd verse is removed whenever the plugin is being used to fetch the lyrics: https://genius.com/Sakert-far-jag-lyrics

Using ublock origin on the Genius site reveals a container called PrimisPlayer, located between the above mentioned verses, which I assume has something to do with this.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 01, 2022, 04:40:35 AM
I started feeling bad that everyone had worked so hard updating these scripts and that sveakul kept having to tell people how to use them, so I updated the plugin one last time:

https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.11

This includes the three scripts posted a couple of posts above.  I didn't change or remove anything else because I'm no longer sure what works and what doesn't.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on June 01, 2022, 05:44:07 PM
This includes the three scripts posted a couple of posts above.
Thanks (again) frankz!

Perhaps I am doing something wrong, but could it be that A-Z Lyrics is missing?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 01, 2022, 08:32:13 PM
This includes the three scripts posted a couple of posts above.
Thanks (again) frankz!

Perhaps I am doing something wrong, but could it be that A-Z Lyrics is missing?
You're not doing anything wrong.  I think I forgot how to add providers.  I put the yml in but don't remember how to reference it.  I think I can remember if I put a little time behind it - standby for 1.1.12 tonight or tomorrow.  Sorry - it's what happens when you do something once every two years and were never really solid on it to begin with.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on June 01, 2022, 08:36:30 PM
standby for 1.1.12 tonight or tomorrow.
Obviously: no pressure, no hurries.
We can only be grateful that somebody is voluntarily making an effort on this stuff to begin with.
Title: Re: LyricsReloaded (Updated)
Post by: phred on June 01, 2022, 08:44:27 PM
We can only be grateful that somebody is voluntarily making an effort on this stuff to begin with.
A huge +1
Thank you frankz.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 01, 2022, 08:49:44 PM
Sorry about that.  It's there now

https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.12
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on June 01, 2022, 08:57:36 PM
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?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 01, 2022, 09:01:22 PM
That I don't know.  It's been A-Z Lyrics Universe in the plug-in so I kept it that way.
Title: Re: LyricsReloaded (Updated)
Post by: HexxTheSwagger on June 03, 2022, 06:55:35 PM
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.
Title: Re: LyricsReloaded (Updated)
Post by: rgujiohgrwuio on June 04, 2022, 01:35:00 AM
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
Title: Re: LyricsReloaded (Updated)
Post by: phred on June 04, 2022, 02:25:58 AM
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.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 04, 2022, 02:31:52 AM
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.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 04, 2022, 02:43:20 AM
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.
Title: Re: LyricsReloaded (Updated)
Post by: HexxTheSwagger on June 04, 2022, 01:04:43 PM
No, I found it in the example.yml (https://github.com/mbfrankz/LyricsReloaded/blob/1.1.12/LyricsReloaded/Configs/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!
Title: Re: LyricsReloaded (Updated)
Post by: rgujiohgrwuio on June 07, 2022, 08:03:26 PM
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!  :)
Title: Re: LyricsReloaded (Updated)
Post by: frankuaku on June 14, 2022, 05:08:26 PM
Using Musixmatch, only after the third line of lyrics there is no new line character.

MusicBee:
(https://i.imgur.com/gWhAev2.png)

MusixMatch:
(https://i.imgur.com/0A1n1IT.png)

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.
Title: Re: LyricsReloaded (Updated)
Post by: crisp on June 18, 2022, 03:11:26 AM
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 (https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/musixmatch.com.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.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on June 18, 2022, 04:29:16 AM
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 (https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/musixmatch.com.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
Title: Re: LyricsReloaded (Updated)
Post by: Tybot on June 20, 2022, 02:47:11 AM
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 (https://raw.githubusercontent.com/mbfrankz/LyricsReloaded/master/LyricsReloaded/Configs/musixmatch.com.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
Title: Re: LyricsReloaded (Updated)
Post by: Steven on July 01, 2022, 02:41:06 AM
I have split the plugin criticism/discussion started by RedEarth to https://getmusicbee.com/forum/index.php?topic=36802.0
Title: Re: LyricsReloaded (Updated)
Post by: LazR on July 01, 2022, 09:44:34 PM
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 '&')
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on July 01, 2022, 11:03:32 PM
Thanks LazR for this, working great after the class line change!
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 01, 2022, 11:50:03 PM
https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14/
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 02, 2022, 04:03:46 AM
https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14/
Thanks for keeping this going, frankz.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on July 02, 2022, 07:08:58 AM
Thanks, LazR and frankz.
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on July 02, 2022, 10:06:18 AM
https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14/

Thanks very much, frankz, for figuring out how to build and release a package. I legitimately have appreciated your work. I've used it for years.
Any chance you would write up how you got it to build? I, and I think others, would be grateful.

Regardless, I would love updating the readme to just successfully building the plugin. It would really help.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 02, 2022, 01:56:23 PM
https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14/

Thanks very much, frankz, for figuring out how to build and release a package. I legitimately have appreciated your work. I've used it for years.
Any chance you would write up how you got it to build? I, and I think others, would be grateful.

Regardless, I would love updating the readme to just successfully building the plugin. It would really help.
I'm not sure exactly what you're asking here.  

I basically make all of the changes
- then I go to Build->Build Solution (F6) in Visual Studio
- then I go to the folder where the dll gets written (\%ProjectFolder%\bin\Release\merged) and copy the dll to my own installation to make sure it works.  
- If it does, I put it in a zip file.
- Then I commit the changes and sync them to github.  
- Then I create a release in github and upload the zip file.  
- Then I update the readme on github.
- Then I post a link in this thread and update the first post in this thread.  
- Then I update the musicbee add-on site from the dashboard here.  
- Then I wait for it to break again and hope someone who knows what they're doing takes it over.

Is that what you were asking?
Title: Re: LyricsReloaded (Updated)
Post by: Redearth on July 04, 2022, 10:19:59 AM
https://github.com/mbfrankz/LyricsReloaded/releases/tag/1.1.14/

Thanks very much, frankz, for figuring out how to build and release a package. I legitimately have appreciated your work. I've used it for years.
Any chance you would write up how you got it to build? I, and I think others, would be grateful.

Regardless, I would love updating the readme to just successfully building the plugin. It would really help.
I'm not sure exactly what you're asking here.  

I basically make all of the changes
- then I go to Build->Build Solution (F6) in Visual Studio
- then I go to the folder where the dll gets written (\%ProjectFolder%\bin\Release\merged) and copy the dll to my own installation to make sure it works.  
- If it does, I put it in a zip file.
- Then I commit the changes and sync them to github.  
- Then I create a release in github and upload the zip file.  
- Then I update the readme on github.
- Then I post a link in this thread and update the first post in this thread.  
- Then I update the musicbee add-on site from the dashboard here.  
- Then I wait for it to break again and hope someone who knows what they're doing takes it over.

Is that what you were asking?

frankz..
people, myself included, have been asking you to incorporate pull requests, and help build this package for what, nearly 2+ years?
You were resistant and seemed to agree that this project might not be worth saving. I agreed with you.
Now that you seem to be willing to help with this, can we just drop it and get together to build this project and improve it?
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 04, 2022, 02:19:50 PM
frankz..
people, myself included, have been asking you to incorporate pull requests, and help build this package for what, nearly 2+ years?
You were resistant and seemed to agree that this project might not be worth saving. I agreed with you.
Now that you seem to be willing to help with this, can we just drop it and get together to build this project and improve it?
I'm not sure how much more clear I can be.  I think I'm being very clear, actually, as literally every single other person on this thread seems to get it.

I am - barely - willing to do what I have been doing, which is to incorporate script fixes for the current structure of the plug-in.

I am not interested in expanding the plug-in or participating in overhauling the way it works.  I am, frankly, not capable of it.  I barely remember how to do what I did.  I would be a drag on any group project of this sort.  I AM NOT A DEVELOPER and I do not care to go further down the road of learning to be one.

Anyone who is inclined to expand the plug-in is invited to - encouraged to - fork the plug-in, take responsibility for it and for the people who rely on it, and do what they like with it.

For sites with an API, the best course of action would be to make a wishlist item to incorporate that site into MusicBee's native lyric search rather than re-invent the wheel.

There's a reason this line of discussion was split off from this thread, and that reason is that it is a pointless distraction that has no potential to be anything but one, because being involved beyond how I'm involved at this moment is not happening. Ever.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on July 04, 2022, 05:53:23 PM
frankz..
people, myself included, have been asking you to incorporate pull requests, and help build this package for what, nearly 2+ years?
You were resistant and seemed to agree that this project might not be worth saving. I agreed with you.
Now that you seem to be willing to help with this, can we just drop it and get together to build this project and improve it?
You've got some balls taking someone like frankz up to measure.

You have not accomplished anything at all here that is of any use to anyone.
All you have done is complaining, measuring other people's work and effort, and polluting this topic. (and also the one concerning the Spotify plugin, and probably the Beenius topic too)

Everything that people have been trying to properly explain to you has been a complete waste of time and effort.

Personally I am getting extremely tired of you.

You have your mouth full about 'DEVELOPERS'.
Saying things such as "you are not a developer", " he is not a developer', "they are not developers".
Are you?
Then CREATE something good and useful, and then share it.
Hold up your own big-boy pants.

Prove me wrong that by now I am convinced you are incapable of creating anything of value to others.
 
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 30, 2022, 05:24:24 PM
There is a new version of the plug-in here (https://getmusicbee.com/forum/index.php?topic=36952).

I will keep the latest update to this version up for download as linked in this thread's start post, but will not be updating it further.

It's been a fun ride.
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on July 30, 2022, 05:30:14 PM
It's been a fun ride.
Thanks for all that you have done Frankz!
(and I hope it indeed has brought some happiness under your nose)
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 30, 2022, 05:46:30 PM
I at least can look at and vaguely understand someone else's code now and sort of fine-tune what I see.  My big sticking point was in trying to add new things, because I'd have to research how to do every single little thing every single time.

But it was nice to feel like I was contributing to a piece of software (MB) and a community (this one) that I really like, and I hope everyone enjoys the breath of life Mayibongwe has given the plug-in and the new direction it's being taken in (a direction which appears to have been the original intent and one that I could never in a million years have even begun to accomplish).
Title: Re: LyricsReloaded (Updated)
Post by: hiccup on July 30, 2022, 05:52:50 PM
I trust that you ran it by redearth first before accepting Mayibongwe as the new torch carrier?
(I'm sorry, I couldn't help myself, haha)

Thanks, and good luck Mayibongwe!
Title: Re: LyricsReloaded (Updated)
Post by: phred on July 30, 2022, 06:17:58 PM
Thanks frankz. Your time and reluctance in maintaining this plugin is greatly appreciated.
Title: Re: LyricsReloaded (Updated)
Post by: sveakul on July 30, 2022, 07:27:45 PM
But it was nice to feel like I was contributing to a piece of software (MB) and a community (this one) that I really like, and I hope everyone enjoys the breath of life Mayibongwe has given the plug-in and the new direction it's being taken in (a direction which appears to have been the original intent and one that I could never in a million years have even begun to accomplish).
Thanks again frankz for taking this plugin through the slippery slopes and coming out successfully at the end!  Your work (incl. the GitHub page etc.) much appreciated.
Title: Re: LyricsReloaded (Updated)
Post by: frankz on July 30, 2022, 07:33:36 PM
Thanks frankz. Your time and reluctance in maintaining this plugin is greatly appreciated.
Thanks again frankz for taking this plugin through the slippery slopes and coming out successfully at the end!  Your work (incl. the GitHub page etc.) much appreciated.
You're welcome.  You guys were great throughout.  Most were.

I don't want to clog up Mayibongwe's thread with my comments and I am mostly away from the computer and not able to test the new version right now, but I saw you mention the YML files and I should mention the YML files that were built-into the last update (plus some that are way out of date and were removed from the plug-in) can be found here:

https://github.com/mbfrankz/LyricsReloaded/tree/master/LyricsReloaded/Configs

View them as "Raw" and copy them to a text file with a yml extension in the "Providers" folder to use them.

These will, of course, slowly stop working as sites makes changes.
Title: Re: LyricsReloaded (Updated)
Post by: phred on August 02, 2022, 05:12:37 PM
NOTE!!
This plugin is no longer updated, supported, or maintained.

A new and supported version can be found here:  https://getmusicbee.com/forum/index.php?topic=36952
Title: Re: LyricsReloaded (Updated)
Post by: Astro Gaze on August 15, 2022, 03:31:58 AM
Thanks for all your hard work, frankz!

Your efforts saved me countless hours of manual searching and copying. Before MusicBee, I was an iTunes user of over 15 years. There, all tagging is manual and I could only dream of lyrics magically appearing in my songs. Adding lyrics was a priority of mine, but I still had a giant backlog I couldn't catch up to on my own. Once I hopped on MusicBee, this was the first plugin I tried, and boy was it fruitful!

Long before I signed up, I was always in awe of how you and the community kept this plugin alive. Given your lack of programming background and blatant honesty, somehow you made it work. For years!
You're a real hero in my eyes.

So to You, and the community members who supported you,
Thank you all,
From the bottom of my heart.

Astro Gaze
Title: Re: LyricsReloaded (Updated)
Post by: frankz on August 15, 2022, 04:13:04 AM
Thanks for all your hard work, frankz!

Your efforts saved me countless hours of manual searching and copying. Before MusicBee, I was an iTunes user of over 15 years. There, all tagging is manual and I could only dream of lyrics magically appearing in my songs. Adding lyrics was a priority of mine, but I still had a giant backlog I couldn't catch up to on my own. Once I hopped on MusicBee, this was the first plugin I tried, and boy was it fruitful!

Long before I signed up, I was always in awe of how you and the community kept this plugin alive. Given your lack of programming background and blatant honesty, somehow you made it work. For years!
You're a real hero in my eyes.

So to You, and the community members who supported you,
Thank you all,
From the bottom of my heart.

Astro Gaze
Gosh - you just made me feel pretty good.  Thank you.  I hope you (and everyone) enjoy the new version.  It seems to be a real step (or several) forward in functionality.