COM automation interface bugs and suggestions

To get bugs in the current release fixed, please report them here.

Moderator: Gurus

mmote
Posts: 14
Joined: Mon Mar 19, 2012 10:29 am

COM automation interface bugs and suggestions

Post by mmote »

While implementing an add-on I happened across a number of issues with the COM interface that I am accessing via C++.
All of these were tested with MediaMonkey 4.0.3 running on Win7 x64.
  • Boolean parameters:
    ISDBPlayer::get_isShuffle correctly returns VARIANT_BOOL
    ISDBPlayer::put_isShuffle fails for VARIANT_TRUE = -1, does work correctly when passing TRUE = 1 instead
  • A couple of APIs take SDBxxx** parameters, e.g.
    ISDBSongData::get_AlbumArt(SDBAlbumArtList **Value)
    shouldn't that be ISDBAlbumArtList**?
  • Freeze/Deadlock:
    I'm basically doing this (pseudocode):
    pl = ISDBApplication::get_PlaylistByID(id)
    tracks = pl->get_Tracks()
    ISDBPlayer::PlaylistAddTracks(tracks)
    The call to PlaylistAddTracks never returns, however
    ISDBPlayer::PlaylistInsertTracks(0, tracks)
    is working fine.
  • ISDBDBIterator::get_ValueByIndex
    The documentation states "The returned value is of the same type as in database"
    However, the function does not seem to return int but BSTR values for integer DB fields (e.g. SELECT ID FROM Songs)
  • Minor issue: Changing shuffle or repeat status does not redraw the GUI
Here are a couple of feature that I'd like to see in the automation interface:
  • volume change notifications
  • ability to get the number of items in a playlist without having to call get_Tracks and get_Count, which can be slow for large playlists
  • ISDBPlayer in general has several "convenience" functions for the 'now playing' playlist, e.g. changing track order or removing tracks, which would be useful for other playlists as well. Right now one has to call get_PlaylistByID, get_Tracks, get_Item, RemoveTrackNoConfirmation to do that.
  • ISDBPlaylist has an AddTrackById method, for the 'now playing' playlist one has to call getSongDataFromId and PlaylistAddTrack
mmote
Posts: 14
Joined: Mon Mar 19, 2012 10:29 am

Re: COM automation interface bugs and suggestions

Post by mmote »

Discovered another issue: Under certain circumstances ISDBAlbumArtItem::get_Image() returns a NULL pointer even though the result is S_OK.
mmote
Posts: 14
Joined: Mon Mar 19, 2012 10:29 am

Re: COM automation interface bugs and suggestions

Post by mmote »

Ok, apparently this behaviour is also found in other methods (ISDBDBIterator::get_StringByIndex). Not quite what I expected, as it makes error handling quite tedious.
mmote
Posts: 14
Joined: Mon Mar 19, 2012 10:29 am

Re: COM automation interface bugs and suggestions

Post by mmote »

Another bug:
ISDBPlaylist::InsertTracks can not insert tracks at the beginning of a playlist (i.e. with index = 0), it will simply add them to the end of the list. Adding a track at index 1 works as expected.
Post Reply