diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-03-23 11:53:27 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-03-23 11:53:27 +0000 |
commit | 478a6ac491e013bd0c9b13a34177c46d5645314b (patch) | |
tree | f447882e54f7b79e0fd8a6346ee3cd95944c3b00 /src | |
parent | 6e61d86ba202b5c7ef939970a74be13c6bcc2d20 (diff) | |
download | ayatana-indicator-sound-478a6ac491e013bd0c9b13a34177c46d5645314b.tar.gz ayatana-indicator-sound-478a6ac491e013bd0c9b13a34177c46d5645314b.tar.bz2 ayatana-indicator-sound-478a6ac491e013bd0c9b13a34177c46d5645314b.zip |
video playlists now filtered out
Diffstat (limited to 'src')
-rw-r--r-- | src/playlists-menu-item.vala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 782b5a2..c784734 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -46,8 +46,9 @@ public class PlaylistsMenuitem : PlayerItem public new void update (PlaylistDetails[] playlists) { foreach ( PlaylistDetails detail in playlists ){ - - if (this.already_observed(detail)) continue; + // We don't want to list playlists which are for videos)' + if (this.already_observed(detail) || this.is_video_related(detail)) + continue; Dbusmenu.Menuitem menuitem = new Menuitem(); menuitem.property_set (MENUITEM_PROP_LABEL, detail.name); @@ -119,6 +120,13 @@ public class PlaylistsMenuitem : PlayerItem return false; } + private bool is_video_related (PlaylistDetails new_detail) + { + var location = (string)new_detail.path; + if (location.contains ("/VideoLibrarySource/")) return true; + return false; + } + public void active_playlist_update (PlaylistDetails detail) { var update = detail.name; |