[totem/gnome-3-8] backend: Fix Year tag not showing in some cases
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-8] backend: Fix Year tag not showing in some cases
- Date: Thu, 22 Aug 2013 15:46:44 +0000 (UTC)
commit 83ab06c8186c79b1b0c605a06d675449d6eb349a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Aug 22 17:39:50 2013 +0200
backend: Fix Year tag not showing in some cases
The DATE tag might not contain the year, but the DATE_TIME tag
might, so try and use that if the first one fails.
https://bugzilla.gnome.org/show_bug.cgi?id=706397
src/backend/bacon-video-widget.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index fc2f5bf..5b8c091 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -5379,11 +5379,16 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget * bvw,
case BVW_INFO_YEAR:
if (bvw->priv->tagcache != NULL) {
GDate *date;
+ GstDateTime *datetime;
if ((res = gst_tag_list_get_date (bvw->priv->tagcache,
GST_TAG_DATE, &date))) {
string = g_strdup_printf ("%d", g_date_get_year (date));
g_date_free (date);
+ } else if ((res = gst_tag_list_get_date_time (bvw->priv->tagcache,
+ GST_TAG_DATE_TIME, &datetime))) {
+ string = g_strdup_printf ("%d", gst_date_time_get_year (datetime));
+ gst_date_time_unref (datetime);
}
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]