[banshee] AudiobookLibrarySource: Fix crash when adding tracks (bgo#662906)



commit 0c43cdc6b8cad96cf1cf3f7d7262cec896c10595
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Tue Nov 1 16:46:22 2011 +0100

    AudiobookLibrarySource: Fix crash when adding tracks (bgo#662906)
    
    We need to cast the TrackMediaAttributes enum value as an int, otherwise
    it is handled as string and the query fails.

 .../Banshee.Audiobook/AudiobookLibrarySource.cs    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
index 6fae03e..0d06777 100644
--- a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
@@ -124,7 +124,7 @@ namespace Banshee.Audiobook
 
                     ServiceManager.DbConnection.Execute (
                         "UPDATE CoreTracks SET Attributes = Attributes | ? WHERE PrimarySourceID = ?",
-                        TrackMediaAttributes.AudioBook, this.DbId);
+                        (int)TrackMediaAttributes.AudioBook, this.DbId);
                 }
             };
 



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