[gnome-music] Show release date in Artists view
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Show release date in Artists view
- Date: Thu, 18 Apr 2013 09:46:23 +0000 (UTC)
commit 08fb22ba1964e9d965762d614749c55bfb99ae93
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Apr 18 09:46:01 2013 +0000
Show release date in Artists view
src/widgets.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/widgets.js b/src/widgets.js
index 3befcb1..68be254 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -315,7 +315,12 @@ const ArtistAlbumWidget = new Lang.Class({
grilo.getAlbumSongs(album.get_id(), Lang.bind(this, function (source, prefs, track) {
if (track != null) {
tracks.push(track);
- this.title.set_markup("<span color='grey'><b>" + album.get_title() + "</b> (" +
track.get_creation_date() + ")</span>")
+ let released_date = album.get_publication_date();
+ if (released_date != null) {
+ this.title.set_markup("<span color='grey'><b>" + album.get_title() + "</b> (" +
released_date.get_year().toString() + ")</span>")
+ } else {
+ this.title.set_markup("<span color='grey'><b>" + album.get_title() + "</b></span>")
+ }
}
}));
this.title.set_alignment(0.0, 0.5)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]