diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/playlists-menu-item.vala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 9b1f724..78fb6dc 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -49,10 +49,14 @@ public class PlaylistsMenuitem : PlayerItem menuitem.property_set (MENUITEM_PROP_LABEL, detail.name); var icon_file = File.new_for_path (detail.icon_path); - if (icon_file.query_exists () == true) { - debug ("icon name = %s", icon_file.get_basename ()); + + if (icon_file.get_basename () != null) { + debug ("icon name = %s", icon_file.get_basename().split(".")[0]); menuitem.property_set (MENUITEM_PROP_ICON_NAME, - icon_file.get_basename () ); + icon_file.get_basename().split(".")[0]); + } + // TODO: Make sure to set a stock playlist image + else{ } menuitem.property_set (MENUITEM_PROP_ICON_NAME, detail.icon_path); menuitem.property_set (MENUITEM_PATH, (string)detail.path); |