[grilo-plugins] last-fm: add extra and mega large thumbnails
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] last-fm: add extra and mega large thumbnails
- Date: Tue, 8 Mar 2011 08:22:23 +0000 (UTC)
commit 66e02fee7dad3804e6228a359aad5f2dbe1aeec3
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date: Mon Mar 7 10:33:33 2011 +0000
last-fm: add extra and mega large thumbnails
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
src/metadata/lastfm-albumart/grl-lastfm-albumart.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/metadata/lastfm-albumart/grl-lastfm-albumart.c b/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
index d25b35a..cbb6f77 100644
--- a/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
+++ b/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
@@ -45,6 +45,8 @@ GRL_LOG_DOMAIN_STATIC(lastfm_albumart_log_domain);
#define LASTFM_XML_COVER_MEDIUM "/album/coverart/medium"
#define LASTFM_XML_COVER_LARGE "/album/coverart/large"
#define LASTFM_XML_COVER_SMALL "/album/coverart/small"
+#define LASTFM_XML_COVER_EXTRA "/album/coverart/extralarge"
+#define LASTFM_XML_COVER_MEGA "/album/coverart/mega"
/* ------- Pluging Info -------- */
@@ -216,7 +218,15 @@ read_done_cb (GObject *source_object,
return;
}
- image = xml_get_image (content, LASTFM_XML_COVER_MEDIUM);
+ image = xml_get_image (content, LASTFM_XML_COVER_MEGA);
+ if (image) {
+ relkeys = grl_related_keys_new_with_keys (GRL_METADATA_KEY_THUMBNAIL, image,
+ NULL);
+ grl_data_add_related_keys (GRL_DATA (rs->media), relkeys);
+ g_free (image);
+ }
+
+ image = xml_get_image (content, LASTFM_XML_COVER_EXTRA);
if (image) {
relkeys = grl_related_keys_new_with_keys (GRL_METADATA_KEY_THUMBNAIL, image,
NULL);
@@ -232,6 +242,14 @@ read_done_cb (GObject *source_object,
g_free (image);
}
+ image = xml_get_image (content, LASTFM_XML_COVER_MEDIUM);
+ if (image) {
+ relkeys = grl_related_keys_new_with_keys (GRL_METADATA_KEY_THUMBNAIL, image,
+ NULL);
+ grl_data_add_related_keys (GRL_DATA (rs->media), relkeys);
+ g_free (image);
+ }
+
image = xml_get_image (content, LASTFM_XML_COVER_SMALL);
if (image) {
relkeys = grl_related_keys_new_with_keys (GRL_METADATA_KEY_THUMBNAIL, image,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]