diff options
Diffstat (limited to 'src/playlists-menu-item.vala')
-rw-r--r-- | src/playlists-menu-item.vala | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 782b5a2..704f61c 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -46,15 +46,13 @@ 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); - var result = this.parse_icon_path (detail.icon_path); - if (result != null) { - menuitem.property_set (MENUITEM_PROP_ICON_NAME, (string)result); - } + menuitem.property_set (MENUITEM_PROP_ICON_NAME, "playlist-symbolic"); menuitem.property_set (MENUITEM_PATH, (string)detail.path); menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true); @@ -119,6 +117,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; |