aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index 28e034a..02ae1c9 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -4,25 +4,18 @@ using CommonDefs;
public class MetadataMenuitem : PlayerItem
{
- /* Not ideal duplicate definition of const - see common-defs/h */
- //const string DBUSMENU_METADATA_MENUITEM_TYPE = "x-canonical-metadata-menu-item";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST = "x-canonical-metadata-text-artist";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_TITLE = "x-canonical-metadata-text-title";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM = "x-canonical-metadata-text-album";
- //const string DBUSMENU_METADATA_MENUITEM_IMAGE_PATH = "x-canonical-metadata-image";
-
public MetadataMenuitem()
{
- this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_METADATA_MENUITEM_TYPE);
+ this.property_set(MENUITEM_PROP_TYPE, CommonDefs.DBUSMENU_METADATA_MENUITEM_TYPE);
}
public override void update(HashMap<string, string> data)
{
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, data.get("artist").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, data.get("title").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, data.get("album").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, sanitize_image_path(data.get("arturl")));
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, data.get("artist").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_TITLE, data.get("title").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM, data.get("album").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, sanitize_image_path(data.get("arturl")));
}
public static string sanitize_image_path(string path)
@@ -44,9 +37,9 @@ public class MetadataMenuitem : PlayerItem
{
HashMap<string, Type> result = new HashMap<string, Type>();
result.set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, typeof(string));
- result.set("x-canonical-metadata-text-title", typeof(string));
- result.set("x-canonical-metadata-text-album", typeof(string));
- result.set("x-canonical-metadata-text-image", typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_TEXT_TITLE, typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM, typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, typeof(string));
return result;
}