banshee r3982 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3982 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data
- Date: Tue, 27 May 2008 17:50:58 +0000 (UTC)
Author: gburt
Date: Tue May 27 17:50:58 2008
New Revision: 3982
URL: http://svn.gnome.org/viewvc/banshee?rev=3982&view=rev
Log:
2008-05-27 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackInfo.cs:
Return the item's PubDate as the ReleaseDate.
* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs: If
the current track is a podcast item, display "from X published Y" instead
of "by X from Z".
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackInfo.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs Tue May 27 17:50:58 2008
@@ -521,14 +521,21 @@
string markup_end = "</span>";
string markup = null;
- if (track.ArtistName != null && track.AlbumTitle != null) {
+ if ((track.MediaAttributes & TrackMediaAttributes.Podcast) != 0) {
+ // Translators: {0} and {1} are for markup, {2} and {3}
+ // are Podcast Name and Published Date, respectively;
+ // e.g. 'from BBtv published 7/26/2007'
+ markup = String.Format ("{0}from{1} {2} {0}published{1} {3}", markup_begin, markup_end,
+ GLib.Markup.EscapeText (track.DisplayAlbumTitle),
+ GLib.Markup.EscapeText (track.ReleaseDate.ToShortDateString ()));
+ } else if (!String.IsNullOrEmpty (track.ArtistName) && !String.IsNullOrEmpty (track.AlbumTitle)) {
// Translators: {0} and {1} are for markup, {2} and {3}
// are Artist Name and Album Title, respectively;
// e.g. 'by Parkway Drive from Killing with a Smile'
markup = String.Format ("{0}by{1} {2} {0}from{1} {3}", markup_begin, markup_end,
GLib.Markup.EscapeText (track.DisplayArtistName),
GLib.Markup.EscapeText (track.DisplayAlbumTitle));
- } else if (track.AlbumTitle != null) {
+ } else if (!String.IsNullOrEmpty (track.AlbumTitle)) {
// Translators: {0} and {1} are for markup, {2} is for Album Title;
// e.g. 'from Killing with a Smile'
markup = String.Format ("{0}from{1} {2}", markup_begin, markup_end,
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackInfo.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastTrackInfo.cs Tue May 27 17:50:58 2008
@@ -101,6 +101,10 @@
get { return position; }
set { position = value; }
}
+
+ public override DateTime ReleaseDate {
+ get { return Item.PubDate; }
+ }
[DatabaseColumn ("ExternalID")]
public long ItemId {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]