[grilo-plugins/0.1.x] local-metadata: Support using the Title
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/0.1.x] local-metadata: Support using the Title
- Date: Fri, 13 Apr 2012 14:41:25 +0000 (UTC)
commit e388b9cc661594190772ef3d5cbed95af961e38c
Author: Bastien Nocera <hadess hadess net>
Date: Wed Apr 11 17:48:20 2012 +0100
local-metadata: Support using the Title
For metadata guessing, in case the URL is unusable/unsupported.
https://bugzilla.gnome.org/show_bug.cgi?id=673916
src/metadata/local-metadata/grl-local-metadata.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
index 238bd17..b5b11b5 100644
--- a/src/metadata/local-metadata/grl-local-metadata.c
+++ b/src/metadata/local-metadata/grl-local-metadata.c
@@ -477,6 +477,7 @@ exit:
static void
resolve_video (GrlMetadataSource *source,
GrlMetadataSourceResolveSpec *rs,
+ GrlKeyID key,
resolution_flags_t flags)
{
gchar *title, *showname;
@@ -510,7 +511,7 @@ resolve_video (GrlMetadataSource *source,
if (!fill_flags)
return;
- video_guess_values_from_uri (grl_media_get_url (rs->media),
+ video_guess_values_from_uri (grl_data_get_string (GRL_DATA (rs->media), key),
&title, &showname, &date,
&season, &episode);
@@ -965,7 +966,7 @@ grl_local_metadata_source_resolve (GrlMetadataSource *source,
if (GRL_IS_MEDIA_VIDEO (rs->media)) {
if (priv->guess_video)
- resolve_video (source, rs, flags);
+ resolve_video (source, rs, can_access ? GRL_METADATA_KEY_URL : GRL_METADATA_KEY_TITLE, flags);
if (can_access)
resolve_image (source, rs, flags);
} else if (GRL_IS_MEDIA_IMAGE (rs->media)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]