Search in sources :

Example 21 with PlaylistEntry

use of se.light.assembly64.model.PlaylistEntry in project assembly64fx by freabemania.

the class PlaylistService method moveSongInList.

public void moveSongInList(PlaylistInfo playlist, int from, int to) {
    getClient().target(server).path("/leet/playlistsnew/move/" + playlist.getId() + "/" + from + "/" + to).request().header("email", email).header("token", token).get().close();
    List<PlaylistEntry> list = playlistSongs.get(playlist.getId());
    PlaylistEntry entry = list.remove(from);
    list.add(to, entry);
    flushLocalList(playlist, list);
    playlist.setChecksum(getChksum(list));
    flushPlaylistInfo();
    Analytics.sendEvent("sidify", "movesong");
}
Also used : PlaylistEntry(se.light.assembly64.model.PlaylistEntry)

Aggregations

PlaylistEntry (se.light.assembly64.model.PlaylistEntry)19 PlaylistInfo (se.light.assembly64.model.PlaylistInfo)11 File (java.io.File)9 ContentEntry (se.light.assembly64.model.ContentEntry)9 ArrayList (java.util.ArrayList)8 List (java.util.List)8 Collectors (java.util.stream.Collectors)6 Set (java.util.Set)5 Executors (java.util.concurrent.Executors)5 SidTune (libsidplay.sidtune.SidTune)5 SearchException (se.light.assembly64.model.SearchException)5 SongNotAvailableException (se.light.assembly64.model.SongNotAvailableException)5 SpecifyFileIdException (se.light.assembly64.model.SpecifyFileIdException)5 Comparator (java.util.Comparator)4 ChangeListener (javafx.beans.value.ChangeListener)4 ObservableValue (javafx.beans.value.ObservableValue)4 ActionEvent (javafx.event.ActionEvent)4 ContextMenu (javafx.scene.control.ContextMenu)4 Menu (javafx.scene.control.Menu)4 MenuItem (javafx.scene.control.MenuItem)4