12 #include "messaging/IMessageTarget.h" 13 #include "playlists/PlayListTypes.h" 45 bool PlayNext(
int offset = 1,
bool autoPlay =
false);
51 bool PlaySongId(
int songId);
60 bool Play(
const CFileItemPtr& pItem,
const std::string& player);
68 const std::string& player,
70 bool playPreviousOnFail =
false);
90 int GetNextSong(
int offset)
const;
122 void ClearPlaylist(PLAYLIST::Id playlistId);
133 void SetShuffle(PLAYLIST::Id playlistId,
bool shuffle,
bool notify =
false);
141 bool IsShuffled(PLAYLIST::Id playlistId)
const;
155 void SetRepeat(PLAYLIST::Id playlistId, PLAYLIST::RepeatState state,
bool notify =
false);
156 PLAYLIST::RepeatState GetRepeat(PLAYLIST::Id playlistId)
const;
159 void Add(PLAYLIST::Id playlistId,
const CPlayList& playlist);
160 void Add(PLAYLIST::Id playlistId,
const CFileItemPtr& pItem);
161 void Add(PLAYLIST::Id playlistId,
const CFileItemList& items);
162 void Insert(PLAYLIST::Id playlistId,
const CPlayList& playlist,
int iIndex);
163 void Insert(PLAYLIST::Id playlistId,
const CFileItemPtr& pItem,
int iIndex);
164 void Insert(PLAYLIST::Id playlistId,
const CFileItemList& items,
int iIndex);
165 void Remove(PLAYLIST::Id playlistId,
int iPosition);
166 void Swap(PLAYLIST::Id playlistId,
int indexItem1,
int indexItem2);
168 bool IsSingleItemNonRepeatPlaylist()
const;
170 bool OnAction(
const CAction &action);
176 bool Repeated(PLAYLIST::Id playlistId)
const;
184 void ReShuffle(PLAYLIST::Id playlistId,
int iPosition);
186 void AnnouncePropertyChanged(PLAYLIST::Id playlistId,
187 const std::string& strProperty,
190 bool m_bPlayedFirstFile;
191 bool m_bPlaybackStarted;
193 std::chrono::time_point<std::chrono::steady_clock> m_failedSongsStart;
195 PLAYLIST::Id m_iCurrentPlayList{PLAYLIST::TYPE_NONE};
199 std::map<PLAYLIST::Id, PLAYLIST::RepeatState> m_repeatState{
200 {PLAYLIST::TYPE_MUSIC, PLAYLIST::RepeatState::NONE},
201 {PLAYLIST::TYPE_VIDEO, PLAYLIST::RepeatState::NONE},
202 {PLAYLIST::TYPE_PICTURE, PLAYLIST::RepeatState::NONE},
void SetShuffle(PLAYLIST::Id playlistId, bool shuffle, bool notify=false)
Set shuffle state of a playlist. If the shuffle state changes, the playlist is shuffled or unshuffled...
Definition: PlayListPlayer.cpp:523
Definition: Application.h:64
A class wishing to receive messages should implement this and call.
Definition: IMessageTarget.h:23
std::shared_ptr< CFileItem > CFileItemPtr
A shared pointer to CFileItem.
Definition: FileItem.h:688
Represents a list of files.
Definition: FileItem.h:721
bool RepeatedOne(PLAYLIST::Id playlistId) const
Returns true if the given is set to repeat one.
Definition: PlayListPlayer.cpp:515
Definition: ThreadMessage.h:25
CPlayList & GetPlaylist(PLAYLIST::Id playlistId)
Get a particular playlist object.
Definition: PlayListPlayer.cpp:449
PLAYLIST::Id GetCurrentPlaylist() const
Get the currently active playlist.
Definition: PlayListPlayer.cpp:417
Definition: IMsgTargetCallback.h:22
Definition: PlayList.h:23
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
void Reset()
Resets the current song and unplayable counts. Does not alter the active playlist.
Definition: PlayListPlayer.cpp:491
void OnApplicationMessage(KODI::MESSAGING::ThreadMessage *pMsg) override
This gets called whenever a message matching the registered message mask is processed.
Definition: PlayListPlayer.cpp:819
void SetCurrentPlaylist(PLAYLIST::Id playlistId)
Set the active playlist.
Definition: PlayListPlayer.cpp:422
int GetMessageMask() override
Should return the message mask that it wishes to receive messages for.
Definition: PlayListPlayer.cpp:814
bool Repeated(PLAYLIST::Id playlistId) const
Returns true if the given is set to repeat all.
Definition: PlayListPlayer.cpp:507
bool HasPlayedFirstFile() const
Return whether or not something has been played yet from the current playlist.
Definition: PlayListPlayer.cpp:502
int GetCurrentSong() const
Returns the index of the current item in active playlist.
Definition: PlayListPlayer.cpp:412
Definition: GUIMessage.h:365
void SetCurrentSong(int index)
Change the current item in the active playlist.
Definition: PlayListPlayer.cpp:406
int RemoveDVDItems()
Removes any item from all playlists located on a removable share.
Definition: PlayListPlayer.cpp:483
void SetRepeat(PLAYLIST::Id playlistId, PLAYLIST::RepeatState state, bool notify=false)
Set repeat state of a playlist. If called while in Party Mode, repeat is disabled.
Definition: PlayListPlayer.cpp:588
Definition: PlayListPlayer.h:29
bool PlayPrevious()
Play the previous entry in the current playlist.
Definition: PlayListPlayer.cpp:203
bool IsShuffled(PLAYLIST::Id playlistId) const
Return whether a playlist is shuffled. If partymode is enabled, this always returns false...
Definition: PlayListPlayer.cpp:576
bool PlayNext(int offset=1, bool autoPlay=false)
Play the next (or another) entry in the current playlist.
Definition: PlayListPlayer.cpp:183
Represents a file on a share.
Definition: FileItem.h:102