[gnome-music] Don't crash in about-to-finish on last song
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Don't crash in about-to-finish on last song
- Date: Tue, 30 Apr 2013 16:18:01 +0000 (UTC)
commit 23e4cce8ea52145de7ac3b49960750bf4987b02f
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Tue Apr 30 18:17:53 2013 +0200
Don't crash in about-to-finish on last song
src/player.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/player.js b/src/player.js
index d2a3fa9..58be97d 100644
--- a/src/player.js
+++ b/src/player.js
@@ -109,10 +109,13 @@ const Player = new Lang.Class({
return true;
}));
+
// Set URI earlier - this will enable gapless playback
this.player.connect("about-to-finish", Lang.bind(this, function(player) {
- player.set_property('uri', player.next_url);
- GLib.idle_add(GLib.PRIORITY_HIGH, Lang.bind(this, this.load_next_track));
+ if(player.next_url != null) {
+ player.set_property('uri', player.next_url);
+ GLib.idle_add(GLib.PRIORITY_HIGH, Lang.bind(this, this.load_next_track));
+ }
return true;
}));
this._setup_view();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]