COM automation interface bugs and suggestions

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: COM automation interface bugs and suggestions

Re: COM automation interface bugs and suggestions

by mmote » Mon Apr 01, 2013 9:02 am

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.

Re: COM automation interface bugs and suggestions

by mmote » Mon Jun 04, 2012 4:41 am

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.

Re: COM automation interface bugs and suggestions

by mmote » Wed May 30, 2012 4:37 pm

Discovered another issue: Under certain circumstances ISDBAlbumArtItem::get_Image() returns a NULL pointer even though the result is S_OK.

COM automation interface bugs and suggestions

by mmote » Sat Mar 31, 2012 5:47 am

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

Top