aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-12-20 16:55:31 +0000
committerConor Curran <conor.curran@canonical.com>2010-12-20 16:55:31 +0000
commitbc927c2284c55ca8a30146ae905a76aa08f26fa1 (patch)
tree9d3696fadb043b36f48d695d1db3227efeec13ba /src/mpris2-controller.vala
parent80ce8f642c251dc765267fa1b1978fec59d23c97 (diff)
downloadayatana-indicator-sound-bc927c2284c55ca8a30146ae905a76aa08f26fa1.tar.gz
ayatana-indicator-sound-bc927c2284c55ca8a30146ae905a76aa08f26fa1.tar.bz2
ayatana-indicator-sound-bc927c2284c55ca8a30146ae905a76aa08f26fa1.zip
implemented suggested optional playlist mechanism
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r--src/mpris2-controller.vala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 58a1906..4990b38 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -102,9 +102,10 @@ public class Mpris2Controller : GLib.Object
public bool playlist_support()
{
- // awaiting spec updates
- // return this.mpris2_root.HasPlaylists;
- return true;
+ if (this.playlists == null) return false;
+ uint32? count = this.playlists.PlaylistCount;
+ if ( count == null || count <= 0 ) return false;
+ return true;
}
private bool ensure_correct_playback_status(){