GPodderPlayback: Notify when the player should be created
This commit is contained in:
parent
f96bfa6526
commit
a621f93311
1 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,8 @@ MediaPlayer {
|
|||
id: player
|
||||
|
||||
property int episode: 0
|
||||
signal playerCreated()
|
||||
|
||||
property var queue: ([])
|
||||
property bool isPlaying: playbackState == MediaPlayer.PlayingState
|
||||
|
||||
|
@ -55,11 +57,17 @@ MediaPlayer {
|
|||
}
|
||||
|
||||
// Load media / prepare and start playback
|
||||
var old_episode = player.episode;
|
||||
player.episode = episode_id;
|
||||
player.source = episode.source;
|
||||
player.seekTargetSeconds = episode.position;
|
||||
seekAfterPlay = true;
|
||||
|
||||
// Notify interested parties that the player is now active
|
||||
if (old_episode == 0) {
|
||||
player.playerCreated();
|
||||
}
|
||||
|
||||
player.play();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue