[banshee] [Daap] Support disc number and count (bgo#612993)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Daap] Support disc number and count (bgo#612993)
- Date: Mon, 15 Mar 2010 22:40:27 +0000 (UTC)
commit 6a9c99b5aaca52eb16d873fb20612d67add7e4d2
Author: Konstantin Oshiyko <konstantin oshiyko gmail com>
Date: Tue Mar 16 09:38:17 2010 +1100
[Daap] Support disc number and count (bgo#612993)
Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>
.../Banshee.Daap/Banshee.Daap/DaapTrackInfo.cs | 2 +
src/Extensions/Banshee.Daap/Daap/Track.cs | 28 ++++++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapTrackInfo.cs b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapTrackInfo.cs
index 97a8561..183c89e 100644
--- a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapTrackInfo.cs
+++ b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapTrackInfo.cs
@@ -51,6 +51,8 @@ namespace Banshee.Daap
FileSize = track.Size;
TrackCount = track.TrackCount;
TrackNumber = track.TrackNumber;
+ DiscNumber = track.DiscNumber;
+ DiscCount = track.DiscCount;
Year = track.Year;
Duration = track.Duration;
MimeType = track.Format;
diff --git a/src/Extensions/Banshee.Daap/Daap/Track.cs b/src/Extensions/Banshee.Daap/Daap/Track.cs
index 13621d1..8c3ab44 100644
--- a/src/Extensions/Banshee.Daap/Daap/Track.cs
+++ b/src/Extensions/Banshee.Daap/Daap/Track.cs
@@ -35,6 +35,8 @@ namespace Daap {
private string genre;
private int trackNumber;
private int trackCount;
+ private int discNumber;
+ private int discCount;
private string fileName;
private DateTime dateAdded = DateTime.Now;
private DateTime dateModified = DateTime.Now;
@@ -126,6 +128,22 @@ namespace Daap {
}
}
+ public int DiscNumber {
+ get { return discNumber; }
+ set {
+ discNumber = value;
+ EmitUpdated ();
+ }
+ }
+
+ public int DiscCount {
+ get { return discCount; }
+ set {
+ discCount = value;
+ EmitUpdated ();
+ }
+ }
+
public string FileName {
get { return fileName; }
set {
@@ -235,10 +253,10 @@ namespace Daap {
val = dateModified;
break;
case "daap.songdisccount":
- val = (short) 0;
+ val = (short) discCount;
break;
case "daap.songdiscnumber":
- val = (short) 0;
+ val = (short) discNumber;
break;
case "daap.songdisabled":
val = (byte) 0;
@@ -351,6 +369,12 @@ namespace Daap {
case "daap.songdatemodified":
track.dateModified = (DateTime) field.Value;
break;
+ case "daap.songdiscnumber":
+ track.discNumber = (short) field.Value;
+ break;
+ case "daap.songdisccount":
+ track.discCount = (short) field.Value;
+ break;
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]