Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
|
Interface for an algorithm shuffling a playlist. More...
#include <shuffle.h>
Public Member Functions | |
Shuffle (const Playlist *parent) | |
virtual bool | canShuffleInAdvance () |
If this Shuffle implementation shuffles the entire list in advance. | |
virtual void | shuffleInAdvance () |
Shuffle the list in advance. Should only be called if canShuffleInAdvance() is called. | |
virtual void | next () |
The shuffle should determine the next item. | |
virtual void | previous () |
The shuffle should determine the previous item. | |
virtual void | setIndex (int i) |
Set the index of the now playing item. | |
virtual int | currentItem () const |
virtual int | itemAt (int index) const |
Determine the item index at at the shuffled index. | |
virtual int | nextItem () const |
virtual bool | hasPrevious () const |
virtual bool | hasNext () const |
void | setRepeatAll (bool repeatAll) |
Sets whether the shuffler to loop over the list if all items are played. | |
Static Protected Member Functions | |
static int | random (int max, int min=0) |
Protected Attributes | |
const Playlist * | m_playlist |
Playlist that can be used to gather information about the songs if needed for the algorithm. | |
bool | m_repeatAll = false |
Interface for an algorithm shuffling a playlist.
|
inline |
|
inlinevirtual |
If this Shuffle implementation shuffles the entire list in advance.
Some shuffle implementations may only shuffle the next item as they go.
Reimplemented in Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
Reimplemented in Jellyfin::Model::ListShuffleBase, Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
Reimplemented in Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
Reimplemented in Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
Determine the item index at at the shuffled index.
index | The shuffled index |
If canShuffleInAdvance() returns false, a new implemention is not needed or -1 may be returned. This function should not even be called in that case.
Reimplemented in Jellyfin::Model::ListShuffleBase, and Jellyfin::Model::NoShuffle.
|
inlinevirtual |
The shuffle should determine the next item.
Reimplemented in Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
Reimplemented in Jellyfin::Model::ListShuffleBase, Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
inlinevirtual |
The shuffle should determine the previous item.
Reimplemented in Jellyfin::Model::NoShuffle, and Jellyfin::Model::RandomShuffle.
|
staticprotected |
|
inlinevirtual |
|
inline |
Sets whether the shuffler to loop over the list if all items are played.
|
inlinevirtual |
Shuffle the list in advance. Should only be called if canShuffleInAdvance() is called.
Reimplemented in Jellyfin::Model::SimpleListShuffle.
|
protected |
Playlist that can be used to gather information about the songs if needed for the algorithm.
|
protected |