[grilo] core: add GRL_METADATA_KEY_EPISODE_TITLE
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: add GRL_METADATA_KEY_EPISODE_TITLE
- Date: Wed, 10 Dec 2014 12:44:12 +0000 (UTC)
commit 6af34f0fb9ab57eea1446a63740dd5b33afbc44d
Author: Victor Toso <me victortoso com>
Date: Tue Dec 9 19:32:04 2014 +0100
core: add GRL_METADATA_KEY_EPISODE_TITLE
Title of show's episode.
https://bugzilla.gnome.org/show_bug.cgi?id=741207
bindings/vala/grilo-0.2-custom.vala | 2 +
doc/grilo/grilo-sections.txt | 3 ++
src/data/grl-media-video.c | 36 +++++++++++++++++++++++++++++++++++
src/data/grl-media-video.h | 4 +++
src/grl-metadata-key.c | 10 +++++++++
src/grl-metadata-key.h | 1 +
6 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/bindings/vala/grilo-0.2-custom.vala b/bindings/vala/grilo-0.2-custom.vala
index b22d9c3..1d7949a 100644
--- a/bindings/vala/grilo-0.2-custom.vala
+++ b/bindings/vala/grilo-0.2-custom.vala
@@ -69,6 +69,8 @@ namespace Grl {
public static Grl.KeyID SEASON;
[CCode (cname ="GRL_METADATA_KEY_EPISODE")]
public static Grl.KeyID EPISODE;
+ [CCode (cname ="GRL_METADATA_KEY_EPISODE_TITLE")]
+ public static Grl.KeyID EPISODE_TITLE;
[CCode (cname ="GRL_METADATA_KEY_SHOW")]
public static Grl.KeyID SHOW;
[CCode (cname ="GRL_METADATA_KEY_CREATION_DATE")]
diff --git a/doc/grilo/grilo-sections.txt b/doc/grilo/grilo-sections.txt
index 43234ba..68629d6 100644
--- a/doc/grilo/grilo-sections.txt
+++ b/doc/grilo/grilo-sections.txt
@@ -506,6 +506,7 @@ grl_media_video_add_url_data
grl_media_video_get_director
grl_media_video_get_director_nth
grl_media_video_get_episode
+grl_media_video_get_episode_title
grl_media_video_get_framerate
grl_media_video_get_height
grl_media_video_get_original_title
@@ -520,6 +521,7 @@ grl_media_video_get_url_data_nth
grl_media_video_get_width
grl_media_video_set_director
grl_media_video_set_episode
+grl_media_video_set_episode_title
grl_media_video_set_framerate
grl_media_video_set_height
grl_media_video_set_original_title
@@ -645,6 +647,7 @@ GRL_METADATA_KEY_DESCRIPTION
GRL_METADATA_KEY_DIRECTOR
GRL_METADATA_KEY_DURATION
GRL_METADATA_KEY_EPISODE
+GRL_METADATA_KEY_EPISODE_TITLE
GRL_METADATA_KEY_EXPOSURE_TIME
GRL_METADATA_KEY_EXTERNAL_PLAYER
GRL_METADATA_KEY_EXTERNAL_URL
diff --git a/src/data/grl-media-video.c b/src/data/grl-media-video.c
index d84544e..347b2bf 100644
--- a/src/data/grl-media-video.c
+++ b/src/data/grl-media-video.c
@@ -177,6 +177,26 @@ grl_media_video_set_episode (GrlMediaVideo *video, gint episode)
}
/**
+ * grl_media_video_set_episode_title:
+ * @video: the media instance
+ * @show: the title of the episode
+ *
+ * Sets the title of an episode
+ *
+ * Since: 0.2.11
+ */
+void
+grl_media_video_set_episode_title (GrlMediaVideo *video,
+ const gchar *episode_title)
+{
+ g_return_if_fail (GRL_IS_MEDIA_VIDEO (video));
+
+ grl_data_set_string (GRL_DATA (video),
+ GRL_METADATA_KEY_EPISODE_TITLE,
+ episode_title);
+}
+
+/**
* grl_media_video_set_show:
* @video: the media instance
* @show: the video's show name
@@ -262,6 +282,22 @@ grl_media_video_get_episode (GrlMediaVideo *video)
}
/**
+ * grl_media_video_get_episode_title:
+ * @video: the media instance
+ *
+ * Returns: the title of the episode
+ *
+ * Since: 0.2.11
+ */
+const gchar *
+grl_media_video_get_episode_title (GrlMediaVideo *video)
+{
+ g_return_val_if_fail (GRL_IS_MEDIA_VIDEO (video), NULL);
+
+ return grl_data_get_string (GRL_DATA (video), GRL_METADATA_KEY_EPISODE_TITLE);
+}
+
+/**
* grl_media_video_get_show:
* @video: the media instance
*
diff --git a/src/data/grl-media-video.h b/src/data/grl-media-video.h
index c218ea2..a486fdb 100644
--- a/src/data/grl-media-video.h
+++ b/src/data/grl-media-video.h
@@ -95,6 +95,8 @@ void grl_media_video_set_season (GrlMediaVideo *video, gint season);
void grl_media_video_set_episode (GrlMediaVideo *video, gint episode);
+void grl_media_video_set_episode_title (GrlMediaVideo *video, const gchar *episode_title);
+
void grl_media_video_set_show (GrlMediaVideo *video, const gchar *show);
gint grl_media_video_get_width (GrlMediaVideo *video);
@@ -107,6 +109,8 @@ gint grl_media_video_get_season (GrlMediaVideo *video);
gint grl_media_video_get_episode (GrlMediaVideo *video);
+const gchar *grl_media_video_get_episode_title (GrlMediaVideo *video);
+
const gchar *grl_media_video_get_show (GrlMediaVideo *video);
GType grl_media_video_get_type (void) G_GNUC_CONST;
diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c
index 55aecdf..0f434df 100644
--- a/src/grl-metadata-key.c
+++ b/src/grl-metadata-key.c
@@ -348,6 +348,16 @@ grl_metadata_key_setup_system_keys (GrlRegistry *registry)
grl_registry_register_metadata_key_system (registry,
+ g_param_spec_string ("episode-title",
+ "Episode Title",
+ "The title from an episode of a show",
+ NULL,
+ G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE),
+ GRL_METADATA_KEY_EPISODE_TITLE,
+ NULL);
+
+
+ grl_registry_register_metadata_key_system (registry,
g_param_spec_string ("show",
"Show",
"Name of a show",
diff --git a/src/grl-metadata-key.h b/src/grl-metadata-key.h
index 1fbfa77..200fc14 100644
--- a/src/grl-metadata-key.h
+++ b/src/grl-metadata-key.h
@@ -102,6 +102,7 @@ typedef guint32 GrlKeyID;
#define GRL_METADATA_KEY_MB_TRACK_ID 53
#define GRL_METADATA_KEY_MB_ARTIST_ID 54
#define GRL_METADATA_KEY_MB_RECORDING_ID 55
+#define GRL_METADATA_KEY_EPISODE_TITLE 56
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]