[banshee] [Gio] Importing over (eg) ssh works now



commit ed59ace0414311724c1ebccc9062b0cac50a1840
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Jan 15 20:59:47 2010 -0800

    [Gio] Importing over (eg) ssh works now

 .../Banshee.Core/Banshee.Streaming/StreamTagger.cs |    4 ++--
 .../DatabaseTrackInfo.cs                           |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
index a569c31..84ce86e 100644
--- a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
+++ b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
@@ -189,7 +189,7 @@ namespace Banshee.Streaming
                 }
             } else {
                 track.MediaAttributes = TrackMediaAttributes.AudioStream;
-                if (track.Uri != null && VideoExtensions.IsMatchingFile (track.Uri.LocalPath)) {
+                if (track.Uri != null && VideoExtensions.IsMatchingFile (track.Uri.AbsoluteUri)) {
                     track.MediaAttributes = TrackMediaAttributes.VideoStream;
                 }
             }
@@ -200,7 +200,7 @@ namespace Banshee.Streaming
 
             if (String.IsNullOrEmpty (track.TrackTitle)) {
                 try {
-                    string filename = System.IO.Path.GetFileNameWithoutExtension (track.Uri.LocalPath);
+                    string filename = System.IO.Path.GetFileNameWithoutExtension (track.Uri.AbsoluteUri);
                     if (!String.IsNullOrEmpty (filename)) {
                         track.TrackTitle = filename;
                     }
diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
index edb3b48..b58b6a9 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
@@ -648,7 +648,7 @@ namespace Banshee.Collection.Database
                 return copy_success;
             }
 
-            bool in_library = old_uri.AbsolutePath.StartsWith (PrimarySource.BaseDirectoryWithSeparator);
+            bool in_library = old_uri.IsLocalPath ? old_uri.AbsolutePath.StartsWith (PrimarySource.BaseDirectoryWithSeparator) : false;
 
             if (!in_library && (LibrarySchema.CopyOnImport.Get () || force_copy)) {
                 string new_filename = FileNamePattern.BuildFull (PrimarySource.BaseDirectory, this, Path.GetExtension (old_uri.ToString ()));



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