Author Topic: MusicBee API  (Read 295139 times)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1158
  • Heal The World
would it be better to leave it to the lyrics plugin developers to remove any bracketed text in the track title at their choice?
My personal opinion based on the workings of Lyrics Reloaded and my library:

Leaving it unaltered would be a plus for web scrapers.
Changing it would be a plus for API-based plugins.

The reason it was done in the first case was to handle the cases where track titles contain an artist name or comments
Still valid reasons to this day, I would think.
I'm not sure how popular the following tagging structure is, but my title tags always contain guest artists in the form of (feat. A, B & C).
That's over 90% of my music and I doubt most databases recognize such titles.

__________

It's worth noting that your approach to situations like this over the years has been to introduce alternative methods rather than revamp existing behaviour in fear of breaking functionality elsewhere.
I think that approach has worked tremendously in the name of backwards compatibility.

So what I would suggest instead, is adding support for the sourceFileUrl parameter like Charlie pointed out.
That way, whoever wants the original title can seamlessly get the tag themselves using this (incomplete) parameter.
The source code to any of my contributions is available on the same download link as the add-ons


vidz97

  • Newbie
  • *
  • Posts: 10
This latest 3.5 release produces the following error:

MusicBee v3.5.8877.29160D  (Win10.0), 21 Apr 2024 21:38:

Code
System.InvalidCastException: Unable to cast object of type '#=zb1GcBWSkGkmiEXINZQ==' to type 'System.String'.
   at #=zrbDttskFerZnvGPRu7vQSrLiIig0.#=z5dkWyXz0a43S.#=zgWcTkwjOfOtS8mGbXg==(Object #=zIOqGacA=)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)


CharlieJiang

  • Jr. Member
  • **
  • Posts: 23
Confirmed to be working, thanks Steven and Mayibongwe!
宇宙に始まりはあるが、終わりはない。 ---無限

slonopot

  • Jr. Member
  • **
  • Posts: 50
would it be better to leave it to the lyrics plugin developers to remove any bracketed text in the track title at their choice?
The reason it was done in the first case was to handle the cases where track titles contain an artist name or comments

Just make it an option during plugin initialization for compatibility, maybe there are plugins that will never be updated and changing the default behavior would affect the amount of successful results. For example, my plugins gradually broaden the query if no good results were found on the first try, it removes additional features that might be contained in tha Artist field. I don't mind updating the logic to first try as-is and later strip the parts I find unnecessary

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34439
would it be better to leave it to the lyrics plugin developers to remove any bracketed text in the track title at their choice?
The reason it was done in the first case was to handle the cases where track titles contain an artist name or comments

Just make it an option during plugin initialization for compatibility, maybe there are plugins that will never be updated and changing the default behavior would affect the amount of successful results. For example, my plugins gradually broaden the query if no good results were found on the first try, it removes additional features that might be contained in tha Artist field. I don't mind updating the logic to first try as-is and later strip the parts I find unnecessary
the default behaviour of removing the brackets is unchanged. What has changed is the url field is populated so you can use that to re-query the original title tag and use as you want

boroda

  • Hero Member
  • *****
  • Posts: 4748
Steven is this possible for plugin hotkeys?

All the functions needed to set up the hotkey as a plugin were already available, so I have created one here:
https://getmusicbee.com/forum/index.php?topic=41310.0
That's some impressively fast and good service/solution.

Just a thought about it from a technical perspective:
Perhaps it would be useful if it allowed for having separate icons for disabled and enabled status?
Like this:


Not sure if that's even possible for a shortcut like this one (and I personally don't care since I wouldn't use this feature) but I thought to mention it anyway.