[grilo-plugins/0.1.x] local-metadata: Adapt may_resolve fixes to 0.1.x API
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/0.1.x] local-metadata: Adapt may_resolve fixes to 0.1.x API
- Date: Fri, 13 Apr 2012 14:57:38 +0000 (UTC)
commit 2b56faf2237ee4df7e5e94536780ed34515bb30f
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 13 15:56:31 2012 +0100
local-metadata: Adapt may_resolve fixes to 0.1.x API
GrlKeyID is of a different type, and can't be used in a switch
statement, and GRL_METADATA_KEY_PUBLICATION_DATE doesn't exist
in 0.1.x.
src/metadata/local-metadata/grl-local-metadata.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
index 2bc8e81..b48902d 100644
--- a/src/metadata/local-metadata/grl-local-metadata.c
+++ b/src/metadata/local-metadata/grl-local-metadata.c
@@ -912,12 +912,10 @@ grl_local_metadata_source_may_resolve (GrlMetadataSource *source,
}
if (GRL_IS_MEDIA_VIDEO (media)) {
- switch (key_id) {
- case GRL_METADATA_KEY_TITLE:
- case GRL_METADATA_KEY_SHOW:
- case GRL_METADATA_KEY_PUBLICATION_DATE:
- case GRL_METADATA_KEY_SEASON:
- case GRL_METADATA_KEY_EPISODE:
+ if (key_id == GRL_METADATA_KEY_TITLE ||
+ key_id == GRL_METADATA_KEY_SHOW ||
+ key_id == GRL_METADATA_KEY_SEASON ||
+ key_id == GRL_METADATA_KEY_EPISODE) {
if (!priv->guess_video)
return FALSE;
if (grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_URL) &&
@@ -926,7 +924,7 @@ grl_local_metadata_source_may_resolve (GrlMetadataSource *source,
if (!grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_TITLE))
goto missing_title;
return TRUE;
- case GRL_METADATA_KEY_THUMBNAIL:
+ } else if (key_id == GRL_METADATA_KEY_THUMBNAIL) {
if (grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_URL) == FALSE)
goto missing_url;
return has_compatible_media_url (media);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]