[banshee] Set the Podcast flag on import based on genre (BGO #589831)



commit 62c97febef549029b63c7b302d969e006ce9cba0
Author: Jack Deslippe <jdeslip gmail com>
Date:   Wed Jul 29 17:21:13 2009 -0700

    Set the Podcast flag on import based on genre (BGO #589831)
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../Banshee.Core/Banshee.Streaming/StreamTagger.cs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
index 81a0981..5586fcd 100644
--- a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
+++ b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
@@ -99,11 +99,16 @@ namespace Banshee.Streaming
                 track.MediaAttributes |= TrackMediaAttributes.VideoStream;
             }
             
+            if (file.Tag.FirstGenre == "Podcast" || file.Tag.Album == "Podcast") {
+                track.MediaAttributes |= TrackMediaAttributes.Podcast;
+            }
+
             // TODO: Actually figure out, if possible at the tag/file level, if
             // the file is actual music, podcast, audiobook, movie, tv show, etc.
-            // For now just assume that if it's only audio, it's music, since that's
-            // what we've just historically assumed on any media type
-            if ((track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0) {
+            // For now just assume that if it's only audio and not podcast, it's
+            // music, since that's what we've just historically assumed on any media type
+            if (!track.HasAttributes (TrackMediaAttributes.VideoStream) &&
+                !track.HasAttributes (TrackMediaAttributes.Podcast)) {
                 track.MediaAttributes |= TrackMediaAttributes.Music;
             }
         }



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