Author Topic: Museexmatch - Musixmatch for MusicBee [+ synced]  (Read 9961 times)

slonopot

  • Jr. Member
  • **
  • Posts: 36
Read more here

Disclaimer
This plugin is made and published exclusively for educational purposes. The plugin uses the private Musixmatch API and may stop working whenever the legal owners decide to take action. I take no responsibility, if someone asks then it wasn't me.

Features
Using private Musixmatch API.
Synced lyrics supported.
Author and track title in the library should be the same as in the Musixmatch database. There's a configurable tolerance for minor edits.

Installation
Get a release and extract all .dll files into MusicBee/Plugins/ directory
If you use Beenius, update it as well.
Last Edit: November 17, 2023, 08:01:59 PM by slonopot

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
Thanks slonopot for the new plugin!  I was wondering if it is possible to configure the tolerance within the museexmatch.conf file to ignore a bracketed text phrase that immediately follows the title, as in the artist/title example,  Yazoo - Midnight [qeM].  While Musixmatch has the song, the trailing "[qeM]" in the title makes the search fail.  I have found a couple of radio streams that have the annoying habit of adding such "nonsense strings" to the metadata title for reasons known only to them.

slonopot

  • Jr. Member
  • **
  • Posts: 36
Thanks slonopot for the new plugin!  I was wondering if it is possible to configure the tolerance within the museexmatch.conf file to ignore a bracketed text phrase that immediately follows the title, as in the artist/title example,  Yazoo - Midnight [qeM].  While Musixmatch has the song, the trailing "[qeM]" in the title makes the search fail.  I have found a couple of radio streams that have the annoying habit of adding such "nonsense strings" to the metadata title for reasons known only to them.



This one seems fine. Does it fail with the plugin?

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
No, but the problem arises when a radio stream appends a bracketed expression to all of its title metadata in the the title field, which then of course fails to match the actual title.  In the example I gave before, the equivalent of the "track_name" string in your chart was being searched as "Midnight [qeM]" instead of just "Midnight."  You can see this in action with all titles sent by the streams given below;  when Musixmatch does have the title, none of them will be returned by the Museexmatch plugin due to the appendage.  The same problem was recently dealt with by the LyricsReloaded author but may not be relevant at all to your API-based project.

http://orion.shoutca.st:8123/stream

http://69.46.24.226:7242/listen.pls?sid=1
Last Edit: November 04, 2022, 06:26:51 PM by sveakul

slonopot

  • Jr. Member
  • **
  • Posts: 36
No, but the problem arises when a radio stream appends a bracketed expression to all of its title metadata in the the title field, which then of course fails to match the actual title.  In the example I gave before, the equivalent of the "track_name" string in your chart was being searched as "Midnight [qeM]" instead of just "Midnight."  You can see this in action with all titles sent by the streams given below;  when Musixmatch does have the title, none of them will be returned by the Museexmatch plugin due to the appendage.  The same problem was recently dealt with by the LyricsReloaded author but may not be relevant at all to your API-based project.

http://orion.shoutca.st:8123/stream

http://69.46.24.226:7242/listen.pls?sid=1

" [qeM]" is 6 characters, you may configure the tolerance using the "allowedDistance" in museexmatch.conf and it should pass after you set it to 6.

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
" [qeM]" is 6 characters, you may configure the tolerance using the "allowedDistance" in museexmatch.conf and it should pass after you set it to 6.

Changed to 6, then 7, but still did not produce a hit; neither with the streaming artist/title "GLIS - Sunrise [aow]"

slonopot

  • Jr. Member
  • **
  • Posts: 36
Changed to 6, then 7, but still did not produce a hit; neither with the streaming artist/title "GLIS - Sunrise [aow]"

It won't work because Musixmatch doesn't trim them as well and the search returns no results.
I've pulished an update with an option to remove the content in brackets, for Beenius too. That's fun cuz MusicBee removes round brackets in the track title by default and I've already asked for leaving the plugin to decide what to do with unnecessary additions like features or tags.

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
Thanks slonopot, this new version is working great and providing hits on both of those problem streams.  Thank you also for doing the same thing with Beenius, which is also returning correct results with the same type of titles.

FWIW I noticed that since version 1.3.4 Beenius is no longer producing a log file anywhere on the PC (Museexmatch does).

Unloaded9118

  • Newbie
  • *
  • Posts: 1
I'm currently experiencing an error when trying to install this and Beenius. Not sure if I'm doing anything wrong. Both plugins are added to C:\Program Files (x86)\MusicBee\Plugins. Not sure if I'm doing something wrong or if the plugins are not working anymore?

They show up in MusicBee. When trying to enable them I get the same error:

Code
"Unable to initialise plugin: *plugin_name*
"Exception has been thrown by the target of an invocation."

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
They work!  Did you also extract the other 3 files in the zips into the Plugins folder--Nlog.dll, Topten.Jsonkit.dll, and the .template files?  The other dll's are required for the pluguns to function.  Exit MusicBee, extract all the files into the Plugins folder, then start MusicBee.

Once active, be sure you have selected them as sources in Prefs/Tags(2)/Lyrics (hit the "..." button to the right of the sources box).  They run just fine besides any other sources you may have selected.
Last Edit: January 08, 2023, 08:38:29 PM by sveakul

slonopot

  • Jr. Member
  • **
  • Posts: 36
I'm currently experiencing an error when trying to install this and Beenius. Not sure if I'm doing anything wrong. Both plugins are added to C:\Program Files (x86)\MusicBee\Plugins. Not sure if I'm doing something wrong or if the plugins are not working anymore?

They show up in MusicBee. When trying to enable them I get the same error:

Code
"Unable to initialise plugin: *plugin_name*
"Exception has been thrown by the target of an invocation."

Make sure to drop all included dlls straight into the Plugins folder and not into a subfolder. You may keep/replace the external dlls with no issues.

cartman005

  • Member
  • Sr. Member
  • *****
  • Posts: 589
Hello,

I am trying to install this plugin but when I create the configuration file and start up MusicBee I get the following error.

Quote
An error occurred during Museexmatch startup: Access to the path 'C:\Program Files (x86)\MusicBee\Plugins\museexmatch.conf' is denied.

If I go into Preferences and try enabling the plugin, I get the following errors.

Quote
An error occurred during Museexmatch startup: 'System.Dynamic.ExapndoObject' does not contain a definition for 'body'

Quote
Unable to initialize this plugon: mb_Museexmatch.dll Exception has been thrown by the target of an invocation.

This only seems to happen when I have the configuration file. If I delete the configuration file, the plugin seems to work fine.

My configuration file is copied right from GitHub:

Code
{    
    "allowedDistance": 5,
    "delimiters": [ "&", ";", "," ],
    "verifyAlbum": false,
    "addLyricsSource": false,
    "trimTitle": false
}

Can you tell me if there's something I'm doing wrong?

Thank you.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
close mb, delete plugin from  'C:\Program Files (x86)\MusicBee\Plugins\', restart mb, and install plugin using 'add plugin' button in mb prefs> plugins. conf file must be copied manually to %AppData%\MusicBee\Plugins.

slonopot

  • Jr. Member
  • **
  • Posts: 36
Hello,

I am trying to install this plugin but when I create the configuration file and start up MusicBee I get the following error.

Quote
An error occurred during Museexmatch startup: Access to the path 'C:\Program Files (x86)\MusicBee\Plugins\museexmatch.conf' is denied.

The plugin can't write to the config file, this issue is exclusive to this plugin. The plugin gets a user token from Musixmatch and saves it into the config file.

You can install the plugin into %AppData%\MusicBee\Plugins as @boroda have already suggested, this folder is writable. You can simply unpack the zip there and restart MusicBee (but you can't have dlls in both places so remove them from Program Files first).

As an alternative workaround you can either start MusicBee as admin or change permissions for the Plugins folder (RMB on the folder, Properties tab, Edit..., Users group, Allow full access with the checkboxes). You can do the same for the config itself.

I think I've changed permissions on my side before even thinking of developing this plugin and that's why I had not encountered the issue myself.

cartman005

  • Member
  • Sr. Member
  • *****
  • Posts: 589
Putting the plugin in AppData rather than Program Files worked. Thank you!