Download the new plugin version from the add-on link
here.
What started out last weekend as a quest to learn the general workings of regular expressions has somehow led to me finding my way around the Lyrics Reloaded plugin. I am not really someone who knows what they're doing, but I figured since I could make sense of some of the code, I might as well make one or two enhancements...and that is exactly what I have done. I have received permission from frankz - the forum hero member who revived the then-abandoned plugin and kept it alive ever since - to publish my version of this plugin and essentially take over the responsibilities associated with it and its userbase.
Changes:- The plugin appears to have originally been designed to make use of three lyrics loaders or retrieval methods (static, search and API)
But only one was ever implemented from what I can tell - the static loader which requires websites to have straightforward, predictable URLs.
Users can now make use of a search loader which is capable of retrieving lyrics from URLs with unique IDs for every track.
- The log file has now been programmed to reset every ten MusicBee sessions (startups, to be precise) in order to keep its length at a reasonable range.
- Genius, Musixmatch and Deezer have been added as built-in providers.
- Added a
non-UI setting that allows you to either enable or disable the line that shows where retrieved lyrics are from.
There's also
another setting to accompany it that allows you to position the displayed source at the top or bottom.
Credits: - @quick_wango (created this invaluable plugin)
- @frankz (resuscitated the plugin)
- @Steven (no MusicBee, no plugin)
- Every other MusicBee user who contributed towards this project (such as providing regex fixes, etc.)
How to use the new loader:The search loader functions more or less the same as the static loader. The difference lies in the definition of the config section.
identity url refers to the site address where the song search is conducted.
identity pattern refers to the pattern that extracts the unique ID for the song (if it exists).
lyrics url refers to the previous url's homepage which will be auto-concatenated with the unique ID previously extracted.
lyrics pattern refers to the pattern that extracts the lyric content.
Example:
name: Lyrics Freak
loader: search
variables:
artist:
type: artist
filters:
- lowercase
title:
type: title
filters: artist
config:
identity url: "https://www.lyricsfreak.com/search.php?q={artist}+{title}"
identity pattern: ['[^a]\shref="(?<identity>.*?)"', 's']
lyrics url: "https://www.lyricsfreak.com"
lyrics pattern: ['data-title=".*">(?<lyrics>.*)<div class="lf-marker\s', 's']
post-filters:
- strip_html
- utf8_encode
- entity_decode
- [regex, '\[.*?\].*?(\w)', '$1', s]
- [regex, '\(feat\..*?\)', '', s]
- [regex, '.*?(\w.*)', '$1', s]
- trim