Support for multiple media files

This enables support for starting media player with more than one file path specified. When a file playback finishes, next is loaded automatically.
This commit is contained in:
Rafostar
2020-09-10 19:53:04 +02:00
parent b8ed6b32dc
commit ed5d449142
2 changed files with 32 additions and 6 deletions

View File

@@ -264,10 +264,8 @@ var App = GObject.registerClass({
this.player.widget.disconnect(this.playerDrawSignal);
this.emit('ready', true);
if(!this.playlist.length)
return;
this.player.set_media(this.playlist[0]);
if(this.playlist.length)
this.player.set_playlist(this.playlist);
}
_onPlayerStateChanged(self, state)