[banshee: 36/57] Added hooks for VideoItems in UPnPTrackInfo
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee: 36/57] Added hooks for VideoItems in UPnPTrackInfo
- Date: Mon, 13 Feb 2012 20:30:51 +0000 (UTC)
commit f824a2d1378a37aadc733d7585364a36e1b322b4
Author: Tobias Arrskog <topfs2 xbmc org>
Date: Thu Jul 14 21:50:11 2011 +0200
Added hooks for VideoItems in UPnPTrackInfo
.../Banshee.UPnPClient/UPnPTrackInfo.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.UPnPClient/Banshee.UPnPClient/UPnPTrackInfo.cs b/src/Extensions/Banshee.UPnPClient/Banshee.UPnPClient/UPnPTrackInfo.cs
index 0c09ef8..d91c398 100644
--- a/src/Extensions/Banshee.UPnPClient/Banshee.UPnPClient/UPnPTrackInfo.cs
+++ b/src/Extensions/Banshee.UPnPClient/Banshee.UPnPClient/UPnPTrackInfo.cs
@@ -35,6 +35,7 @@ using Mono.Upnp.Dcp.MediaServer1.ContentDirectory1.AV;
using Hyena;
+using Banshee.Sources;
using Banshee.Collection;
using Banshee.Collection.Database;
@@ -44,7 +45,7 @@ namespace Banshee.UPnPClient
{
static long id = 0;
- public UPnPTrackInfo (MusicTrack track, UPnPMusicSource source) : this (track as AudioItem, source)
+ public UPnPTrackInfo (MusicTrack track, UPnPMusicSource source) : this (track as Item, source)
{
ArtistName = track.Artists.Count > 0 ? track.Artists[0].Name : "";
AlbumTitle = track.Albums.Count > 0 ? track.Albums[0] : "";
@@ -54,7 +55,14 @@ namespace Banshee.UPnPClient
Genre = track.Genres.Count > 0 ? track.Genres[0] : "";
}
- public UPnPTrackInfo (AudioItem track, UPnPMusicSource source) : base ()
+ public UPnPTrackInfo (VideoItem track, UPnPVideoSource source) : this (track as Item, source)
+ {
+ ArtistName = track.Producers.Count > 0 ? track.Producers[0] : "";
+
+ Genre = track.Genres.Count > 0 ? track.Genres[0] : "";
+ }
+
+ public UPnPTrackInfo (Item track, PrimarySource source) : base()
{
if (track == null)
throw new ArgumentNullException("track");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]