public void Reset() { _sortedPlaylist.Clear(); _shuffledPlaylist.Clear(); PlayingItemIndex = NoPlayingItemIndex; ShuffleMode = GroupShuffleMode.Sorted; RepeatMode = GroupRepeatMode.RepeatNone; LastChange = DateTime.UtcNow; }
/// <summary> /// Initializes a new instance of the <see cref="PlayQueueUpdate"/> class. /// </summary> /// <param name="reason">The reason for the update.</param> /// <param name="lastUpdate">The UTC time of the last change to the playing queue.</param> /// <param name="playlist">The playlist.</param> /// <param name="playingItemIndex">The playing item index in the playlist.</param> /// <param name="startPositionTicks">The start position ticks.</param> /// <param name="shuffleMode">The shuffle mode.</param> /// <param name="repeatMode">The repeat mode.</param> public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList <QueueItem> playlist, int playingItemIndex, long startPositionTicks, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode) { Reason = reason; LastUpdate = lastUpdate; Playlist = playlist; PlayingItemIndex = playingItemIndex; StartPositionTicks = startPositionTicks; ShuffleMode = shuffleMode; RepeatMode = repeatMode; }
public void SetRepeatMode(GroupRepeatMode mode) { RepeatMode = mode; LastChange = DateTime.UtcNow; }
/// <summary> /// Initializes a new instance of the <see cref="SetRepeatModeGroupRequest"/> class. /// </summary> /// <param name="mode">The repeat mode.</param> public SetRepeatModeGroupRequest(GroupRepeatMode mode) { Mode = mode; }