CApplicationMessenger::Get().PlayListPlayerPlay(g_playlistPlayer.GetCurrentSong());
}
- void Player::playPlaylist(const PlayList* playlist, bool windowed)
+ void Player::playPlaylist(const PlayList* playlist, bool windowed, int startpos)
{
TRACE;
DelayedCallGuard dc(languageHook);
// play a python playlist (a playlist from playlistplayer.cpp)
iPlayList = playlist->getPlayListId();
g_playlistPlayer.SetCurrentPlaylist(iPlayList);
- CApplicationMessenger::Get().PlayListPlayerPlay();
+ if (startpos > -1)
+ g_playlistPlayer.SetCurrentSong(startpos);
+ CApplicationMessenger::Get().PlayListPlayerPlay(startpos);
}
else
playCurrent(windowed);
void playStream(const String& item = emptyString, const XBMCAddon::xbmcgui::ListItem* listitem = NULL, bool windowed = false);
/**
- * playPlaylist([playlist, windowed]) -- Play this item.
+ * playPlaylist([playlist, windowed, startpos]) -- Play this item.
*
* playlist : [opt] playlist.
* windowed : [opt] bool - true=play video windowed, false=play users preference.(default)
+ * startpos : [opt] int - Playlist starting position (0 based). If not given, current position is used
*
* *Note, If playlist is not given then the Player will try to play the current item
* in the current playlist.
*
* example:
*/
- void playPlaylist(const PlayList* playlist = NULL, bool windowed = false);
+ void playPlaylist(const PlayList* playlist = NULL,
+ bool windowed = false, int startpos=-1);
/**
* play() -- try to play the current item in the current playlist.