Rework Playlist API
The playlists were initially designed to hold unique media, which isn't the case anymore. This means we can't remove a single occurrence of a media that was inserted multiple times.
Another issue is that the position is in the [1;N] range, instead of the usually expected [0;N-1]
-
Use a [0;N-1] position/index to add items to the playlist -
Curate the position records after deletion -
Change the API to delete media based on the position -
Change the API to move media based on the position -
Index the PlaylistMediaRelation table by playlist_id & position -
Migrate previous playlist to contiguous indexes -
This must be part of model 16, since model 15 is already used as part of vlc-android beta
This needs to be backported to 0.4.x afterward
Edited by Hugo Beauzée-Luyssen