Author Topic: MusicBee API  (Read 287327 times)


KissCool

  • Full Member
  • ***
  • Posts: 183
Over time I will add APIs to stream music data, control GUI aspects so you can create new views or possibly entirely skin MusicBee.

Is it doable atm (I mean without any restriction or limitation)?

e-motiv

  • Full Member
  • ***
  • Posts: 188
Steven,

I would like to work on teh issue my SpeakBack plugin's is experiencing wit multiple tracks changing at once.  The problem is nicely illustrated here with boroda's tag plugin, but it's also a more general problem. I don't agree with boroda that it's to differentiate between manual and automatic (since I experience it also as a problem when you select multiple tracks manually).

So, in 1 sentence, I think the right question would be:
"Is there a way to tell my plugin (at notification time) that there are more than 1 tracks that are changing tags ?"

As an alternate solution, I can try to make a timer that tries to pause my plugin when within, let's say, 300 ms another track is changed.  I have already a bit experimented with it, and I find it a bit too complex for the problem. Not only do I have to keep all the changes of every notification in memory for the first or last track (for when the timer times out, even more when it times out for just 1 track, when no issue), I am also wondering that those 300ms or more are never gonna be right, depending on delay from MB and other plugins themselves ánd the possible synchronous actions one of these might also make.
So, I'd really appreciate a simple "more-than-one-tracks-changing" variable somewhere (if you find the time for it or if it already exists in one form or another).
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
the interface file on the first page has been updated with the support available in MusicBee v2.2

Pako

  • Full Member
  • ***
  • Posts: 132
I found, that in the new MusicBee API, some new Notification Types were introduced.
For example, ReplayGainChanged, FileDeleting, FileDeleted and ApplicationWindowChanged.
I try to use it in EventGhost plugin, but in vain. Nothing happens.
Can you please explain under what circumstances the mentioned events are triggered?
It is of course possible that I am doing something wrong. I apologize in that case.

Pako

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
i think when i did file deleting/ deleted, it was only intended and is only implemented for use with device synchronisation for virtual device plugins so perhaps i should just remove it from the public interface file definition. Similarily ApplicationWindowChanged wasnt really intended for general use.

ReplayGainChanged should work though

e-motiv

  • Full Member
  • ***
  • Posts: 188
For the record:
FileDeleting / Deleted was also requested for my Ghost Track plugin here.  Since I released the latest version of the plugin nobody has asked the use of the delete-integration, so it might take a while before I integrate it, since I am working on improvement requests from other plugins* at the moment (when I find time for MB at all).  I did integrate the other things though! (Thanks again.)

* Also see earlier question in this thread about "multi-tracks changing on notification time"
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

Pako

  • Full Member
  • ***
  • Posts: 132
I have another feature request.
In my opinion there is missing a LibraryChanged event.
My "remote client" at startup retrieves the available playlists.
The remote user can then choose from these playlists.
However, if the "other" user (desktop GUI) opens another library,
the "remote client" does not know it. It is necessary to know it and update the list of available playlists.

Pako

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
In my opinion there is missing a LibraryChanged event.
thats done for the next v2.4 update
it will be notified via
PluginNotifyType.LibrarySwitched = 29

Pako

  • Full Member
  • ***
  • Posts: 132
thats done for the next v2.4 update
it will be notified via
PluginNotifyType.LibrarySwitched = 29
I finally had a chance to try.
It works beautifully, now list (offer) of playlists always correspond to reality.
Thank you very much.

Pako

bazinga

  • Guest
I think I have found 2 bugs in the API or in MusicBee.
When I do "mbApiInterface.Player_SetRepeat(RepeatMode.One);" MusicBee will set repeat to All instead of One.


Having exactly the same problem (but it returns None, not One as reported above)
Last Edit: April 26, 2014, 03:41:23 PM by bazinga

EpicCyndaquil

  • Guest
I'd like to enable changing of upmixing to 5.1 via the API. Is this something you could add in the next update, Steven?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
the links in the first post have been updated with the API interface that is available with MusicBee 2.4
The new API functions are described in previous posts on this topic

Pako

  • Full Member
  • ***
  • Posts: 132
I found a typo in new MusicBee API / C#.
There is an expression "FiledAddedToLibrary = 30".
I think it has to be "FileAddedToLibrary = 30".

Pako

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
its been corrected now - thanks for reporting this