Author Topic: MusicBee API  (Read 285471 times)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
Just found out NowPlaying_GetSpectrumData can't return low to high frequency range on 3.1, it return centered frequency range now.
Anyway to fix it? :'(
https://getmusicbee.com/forum/index.php?topic=22822.0

ucynml

  • Newbie
  • *
  • Posts: 11
Hello. I can't find the API for v3.1.
Can I use the API to set sort tags?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
Hello. I can't find the API for v3.1.
Can I use the API to set sort tags?
i have updated the first post and it includes the new sort tags


MiDWaN

  • Jr. Member
  • **
  • Posts: 78
Steven, I wanted to try using the provided "CreateBackgroundThread" call instead of firing off a Thread myself in my plugin.
I have two questions regarding that:

1) Is there a way to Abort the Thread if it's already started? Or is that handled automatically by MB in some cases? (e.g. when Closing?)
2) Is there a way to detect if a specific Thread has already been started, to avoid starting it again?

Also, could we please consolidate and improve the documentation on the various functions the API provides?
Having to read through 19 (currently) pages in a forum just to find out if there's any information about a specific function is not very practical.

In an ideal scenario either the documentation should be included in the source code itself (e.g. in the form of comments) or on a dedicated page somewhere, with usage examples if possible. I believe that would also help a lot with minimizing support questions regarding the API.

If there's already such a place with documentation and I've missed it, I apologize - could you please point me to it?

cjoprey

  • Jr. Member
  • **
  • Posts: 32
  • MB Version: 3.4
Hi Steven,

Will the 3.1 API work with a 3.2 install, or should I wait for a new API?

Thanks!

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
it should work fine and any future changes will be non-breaking

cjoprey

  • Jr. Member
  • **
  • Posts: 32
  • MB Version: 3.4

neRok

  • Newbie
  • *
  • Posts: 10
Hi,
I've just submitted a new plugin, but there are some features I can't implement because there does not seem to be any suitable API methods for doing so. I've put a little info in some issues on my github repo, see https://github.com/neRok00/mb_SkipOverSong/issues/1 and https://github.com/neRok00/mb_SkipOverSong/issues/3. If you want any more info, I can give some here.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
I've approved the plugin. I cant see myself agreeing to either of the issues/requests

neRok

  • Newbie
  • *
  • Posts: 10
For the tag one, if not a way to read any tag, why not a way to set a custom tag via api call from plugin?

Or even a way to set settings from a plugin? The plugin could send a dict of settings to change to the program, and the program can have a popup asking the user to accept the following changes (with a list of those changes).

samlangten

  • Newbie
  • *
  • Posts: 9
Hello Steven,
I am trying to add internationalization support for my plugin, but I can not find API to get which languages user has set in MusicBee. Is there any way to access which languages user has set?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
MB_GetLocalisation(string id, string defaultText)
you can get the id's from the localisation file in the localisation topic

samlangten

  • Newbie
  • *
  • Posts: 9
In fact I have some custom texts in my plugins which does not exist in MusicBee definitions. I want to get language setting in MusicBee and enable the localization files for my plugin.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
In fact I have some custom texts in my plugins which does not exist in MusicBee definitions. I want to get language setting in MusicBee and enable the localization files for my plugin.
you will need to have your own localisation implementation
dotNET provides a good infrastructure for that