View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018953 | MMW 5 | Extensions framework | public | 2022-03-29 19:01 | 2022-08-30 23:53 |
Reporter | drakinite | Assigned To | |||
Priority | urgent | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 5.0.3 | ||||
Target Version | 5.0.4 | Fixed in Version | 5.0.3 | ||
Summary | 0018953: Some COM methods not implemented | ||||
Description | Encountered a crash. I'm trying to add tracks to the current playlist like this: 1) call get_NewSongList 2) call the list's Add method with newly created SongData objects (Since I can't get pre-filled SongData objects - not sure which fields I need to set there - is ID sufficient?) 3) call PlaylistInsertTracks This triggers a NPE in Data.TJSONPair.GetJsonValue. You should have a crash log with ID AB1A677C. The following publicly documented methods of TSDBSongList are not implemented: Add* Insert Get_Artists Get_Albums Delete Get/Set_Item UpdateAll TSDBSongList.Add, as well as TSDBSongList.CreateEmpty, appear to be the cause of the crash as described in Ticket # 2159. The shared SongList object doesn't get transformed into the appropriate JSON, leading to a crash when being parsed. For completeness' sake, this is a list of the methods that appear to not be implemented. I'm sure most of them can be ignored, but I don't know which ones should or shouldn't be prioritized. MetadataFromFilename ReadTags ReadTagsAsExt WriteTags UpdateAlbum UpdateArtist Set_Mood Set_Occasion Set_Quality Set_Tempo Get/Set_Date UpdateAll UpdateDB _Data Get_MediaLabel FindSD Get_Artist Get_Album Get_Media RenameByMask ParseText CalculateGapData CalculateGapDataExt Get/Set_isBookmarkable Get/Set_canCrossfade Get/Set_isShuffleIgnored Get/Set_TempString MarkPlayed DiscardChanges | ||||
Additional Information | Helpdesk Ticket # 2159 | ||||
Tags | No tags attached. | ||||
Fixed in build | 2624 | ||||
related to | 0017174 | closed | petr | Issues with SDBApplication.Player getters and methods [COM] |
related to | 0017897 | closed | Ludek | Adding a reference to MediaMonkey5 Library in Visual Studio crashes Visual Studio |
related to | 0018999 | assigned | drakinite | API is unorganized, poorly documented, with many things missing or wrong |
|
As dicussed with MonkeyMote dev via [Ticket # 2159] we will implement the necessary stuff for the MonkeyMote app to work, full port of so deprecated "COM api" not planned atm |
|
Fixed in 2614 His testing plugin now correctly adds testing track into Playing queue. |
|
Re-opened, further feedback from the mmote dev (ticket # 2159): SDBPlayer::isShuffle can be set to true, but not to false SDBPlayer::isRepeat can be set to true, but not to false, only supports 'repeat all' SDBPlayer::CurrentPlaylist and CurrentSongList return empty lists SDBSonglist::Item crashes (maybe not implemented?) |
|
Hi, I've been looking into it today, compiled testing app in Visual Studio 2022 and the progress so far is: SDBPlayer::isShuffle can be set to true, but not to false => fixed SDBPlayer::isRepeat can be set to true, but not to false, only supports 'repeat all' => I have changed the property from bool to string, it can be now set as string values 'off', 'all', 'one' Or alternatively you can use this: m_app->runJSCode('app.player.repeatPlaylist = true; app.player.repeatOne = true;', false); i.e. execute it as native JS code (like in actions.js) SDBPlayer::CurrentPlaylist and CurrentSongList return empty lists => I've fixed this, but then I realized that it works only for shorter lists (with several files in Playing). For long lists with thousands of tracks it fails, because Petr implemented the messaging between browser process (MediaMonkey.exe) and render process (MediaMonkeyEngine.exe) as serialized JSON -- which fails for very long string messages. I will need to rewrite it all to shared memory (which will take me some time) -- this will improve performance and also resolves the issues with long lists. |
|
I've made some changes and fixes and asked the mmote dev to test it. Nevertheless I suppose he will face further issues with the incomplete COM api during implementation of his MonkeyMote plugin. So moving target to 5.0.4 |
|
Some tips for workarounding with SDB.runJSCode : https://www.mediamonkey.com/wiki/Controlling_MM5_from_External_Applications Fixed crash when adding MM5 COM reference in Visual Studio as 0017897 No longer supported interfaces/methods like SDBTree removed |
|
Verified 2625 Tested with adding MM5 COM reference in Visual Studio and Primal Script 2022. |
|
left resolved for further cleanup in 5.0.4 as needed. |
|
Verified and reviewed in 2661 Closed no more cleanup is needed for now. |