[banshee] [Ipod] Don't sync tracks with zero duration



commit 3219dd60fd75c9a92eca134a18f077257f447d94
Author: Andrés G. Aragoneses <aaragoneses novell com>
Date:   Thu Dec 3 16:21:05 2009 -0800

    [Ipod] Don't sync tracks with zero duration
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../Banshee.Dap.Ipod/IpodSource.cs                 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
index 4ccdafb..ec38bd2 100644
--- a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
+++ b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
@@ -461,6 +461,10 @@ namespace Banshee.Dap.Ipod
                     return;
                 }
 
+                if (track.Duration.Equals (TimeSpan.Zero)) {
+                    throw new Exception (Catalog.GetString ("Track duration is zero"));
+                }
+
                 IpodTrackInfo ipod_track = new IpodTrackInfo (track);
                 ipod_track.Uri = fromUri;
                 ipod_track.PrimarySource = this;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]