[banshee] PrimarySource: Make sure AddTrackJob is marked as finished (bgo#657769)



commit c0a73c53dcbe771dd1db2c2d6bc7fb4567e03c54
Author: Fabrice Bellet <fabrice bellet info>
Date:   Tue Mar 27 11:21:47 2012 +0200

    PrimarySource: Make sure AddTrackJob is marked as finished (bgo#657769)
    
    When the list of tracks to add is empty, the Completed property is never
    incremented, and so the job was never considered to be finished.
    
    If the job is not marked as finished, call AddTrackJob.Finish () after
    going through the list, even if the list was empty.
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 .../Banshee.Sources/PrimarySource.cs               |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
index c935aaa..8f71ede 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
@@ -651,6 +651,9 @@ namespace Banshee.Sources
                     ErrorSource.AddMessage (e.Message, track.Uri.ToString ());
                 }
             }
+            if (!AddTrackJob.IsFinished) {
+                AddTrackJob.Finish ();
+            }
             is_adding = false;
         }
 



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