Author Topic: MusicBee API  (Read 289091 times)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1078
  • 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.
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.


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

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

slonopot

  • Jr. Member
  • **
  • Posts: 37
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
  • Sr. Member
  • *****
  • Posts: 34386
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