View Issue Details

IDProjectCategoryView StatusLast Update
0019230MMW 5Extensions frameworkpublic2022-08-31 20:16
Reporterzvezdan Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version5.0.4Fixed in Version5.0.4 
Summary0019230: app.listen(app.playlists.root, 'playlistChanged' and 'playlistAdded' should have a playlist object as argument
Description 'playlistChanged' and 'playlistAdded' should be consistent with 'playlistRemoved' and with MM4 (ISDBApplicationEvents::OnPlaylistChanged and ISDBApplicationEvents::OnPlaylistAdded), which have a playlist object as an argument of the listener, not the playlist id.
Tagstodoc-dev
Fixed in build2656

Relationships

related to 0019023 closedLudek playlistRenamed and playlistMoved events needed 
related to 0019229 closedLudek app.listen(app.playlists.root, 'playlistChanged' ... doesn't fire when track is removed from playlist 

Activities

Ludek

2022-07-01 16:18

developer   ~0068753

I am afraid that changing it now from ID to Playlist object would break existing scripts/addons.

But we could add it as the second argument.

Ludek

2022-07-01 20:56

developer   ~0068759

Last edited: 2022-07-01 20:56

Added in 5.0.4.2656 and updated the documentation (to be updated on the web later) that the second argument is added in 5.0.4

Example:

app.listen(app.playlists.root, 'playlistAdded', (id, pl) => {
       uitools.toastMessage.show(id + ' -- ' + pl.title);
});

peke

2022-08-31 20:16

developer   ~0069130

Verified 2661