Author Topic: [OBSOLETE] API Docs, HowTo's etc..  (Read 10490 times)

e-motiv

  • Full Member
  • ***
  • Posts: 188
[Edit]
OBSOLETE!!
Everything is here now:
http://musicbee.wikia.com/wiki/API_Documentation
http://musicbee.wikia.com/wiki/API_method_reference



First check this post and download the latest example files for your choice of language: 
Then get the latest weekly Musicbee build:

Here is my "very basics" for starting with the MB API, based on help from people on this forum:

Feel free to add API howto's to this thread. (No discussions please.)
Last Edit: June 30, 2013, 03:07:21 PM by R U Bn ?
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

e-motiv

  • Full Member
  • ***
  • Posts: 188
Trial to get a function help / reference. Please update this list if you find the time:

  • Please update this list if you find the time:

  • void MB_Releasestring(string p1);

  • void MB_Trace(string p1);

  • intPtr MB_WindowHandle();

  • void MB_RefreshPanels();

  • void MB_SendNotification(CallbackType type);

  • void MB_AddMenuItem(string menuPath, string hotkeyDescription, EventHandler handler);
    For use with boroda tag tools

  • string Setting_GetFieldName(MetaDataType type);

  • string Setting_GetPersistentStoragePath();

  • string Setting_GetSkin();

  • int Setting_GetSkinElementColour(SkinElement element, ElementState state, ElementComponent component);

  • bool Setting_IsWindowBordersSkinned();

  • string Library_GetFileProperty(string sourceFileUrl, FilePropertyType type);

  • string Library_GetFileTag(string sourceFileUrl, MetaDataType type);

  • bool Library_SetFileTag(string sourceFileUrl, MetaDataType type, string value);

  • bool Library_CommitTagsToFile(string sourceFileUrl);

  • string Library_GetLyrics(string sourceFileUrl, int type);

  • string Library_GetArtwork(string sourceFileUrl, int index);

  • bool Library_QueryFiles(string query);

  • string Library_QueryGetNextFile();

  • int Player_GetPosition();

  • bool Player_SetPosition(int position);

  • PlayState Player_GetPlayState();

  • bool Player_Action();

  • float Player_GetVolume();

  • bool Player_SetVolume(float volume);

  • bool Player_GetMute();

  • bool Player_SetMute(bool mute);

  • bool Player_GetShuffle();

  • bool Player_SetShuffle(bool shuffle);

  • RepeatMode Player_GetRepeat();

  • bool Player_SetRepeat(RepeatMode repeat);

  • bool Player_GetEqualiserEnabled();

  • bool Player_SetEqualiserEnabled(bool shuffle);

  • bool Player_GetDspEnabled();

  • bool Player_SetDspEnabled(bool shuffle);

  • bool Player_GetScrobbleEnabled();

  • bool Player_SetScrobbleEnabled(bool shuffle);

  • string NowPlaying_GetFileUrl();

  • int NowPlaying_GetDuration();

  • string NowPlaying_GetFileProperty(FilePropertyType type);

  • string NowPlaying_GetFileTag(MetaDataType type);

  • string NowPlaying_GetLyrics();

  • string NowPlaying_GetArtwork();

  • bool NowPlayingList_Action();

  • bool NowPlayingList_FileAction(string sourceFileUrl);

  • bool Playlist_QueryPlaylists();

  • string Playlist_QueryGetNextPlaylist();

  • PlaylistFormat Playlist_GetType(string playlistUrl);
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

e-motiv

  • Full Member
  • ***
  • Posts: 188
NotificationType.TrackChanged means that the player changes track (to another), not the track itself being changed
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig

e-motiv

  • Full Member
  • ***
  • Posts: 188
In build file,reference MB dll:
Code
			<references>
        <include name='C:\Program Files (x86)\MusicBee\System.Data.SQLite.dll'/>
</references>
In plugin, just SQlite away:
Code
using System.Data.SQLite; //http://system.data.sqlite.org
pluginDBFileName = mbApi.Setting_GetPersistentStoragePath()+sep+about.Name+".db";
DB = new SQLiteConnection(@"Data Source="+pluginDBFileName);
DB.Open();
  Developing @ e-motiv.net       --       Musicbee plugins: Speak Back - Ghost Tracks - Radio Dig