banshee r4884 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Streaming src/Core/Banshee.Services/Banshee.Collection src/Extensions/Banshee.Podcasting/Banshee.Podcasting
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4884 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Streaming src/Core/Banshee.Services/Banshee.Collection src/Extensions/Banshee.Podcasting/Banshee.Podcasting
- Date: Wed, 7 Jan 2009 20:50:27 +0000 (UTC)
Author: gburt
Date: Wed Jan 7 20:50:27 2009
New Revision: 4884
URL: http://svn.gnome.org/viewvc/banshee?rev=4884&view=rev
Log:
2009-01-07 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs:
* src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs: Avoid
dealing with Podcast files at all (BGO #552976).
* src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs: Add another
TrackInfoMerge override, avoid a NRE.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs Wed Jan 7 20:50:27 2009
@@ -106,6 +106,17 @@
track.MediaAttributes |= TrackMediaAttributes.Music;
}
}
+
+ public static void TrackInfoMerge (TrackInfo track, SafeUri uri)
+ {
+ track.Uri = uri;
+ TagLib.File file = StreamTagger.ProcessUri (uri);
+ TrackInfoMerge (track, file);
+
+ if (file == null) {
+ track.TrackTitle = uri.AbsoluteUri;
+ }
+ }
public static void TrackInfoMerge (TrackInfo track, TagLib.File file)
{
@@ -148,7 +159,7 @@
track.Bpm = Choose ((int)file.Tag.BeatsPerMinute, track.Bpm, preferTrackInfo);
} else {
track.MediaAttributes = TrackMediaAttributes.AudioStream;
- if (VideoExtensions.IsMatchingFile (track.Uri.LocalPath)) {
+ if (track.Uri != null && VideoExtensions.IsMatchingFile (track.Uri.LocalPath)) {
track.MediaAttributes = TrackMediaAttributes.VideoStream;
}
}
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs Wed Jan 7 20:50:27 2009
@@ -145,6 +145,11 @@
return null;
}
+ // Hack to ignore Podcast files
+ if (file_path.Contains ("Podcasts")) {
+ return null;
+ }
+
//Hyena.Log.DebugFormat ("Rescanning item {0}", file_path);
try {
string relative_path = Banshee.Base.Paths.MakePathRelative (file_path, psource.BaseDirectory);
@@ -163,8 +168,7 @@
} else {
// This URI is not in the database - try to find it based on MetadataHash in case it was simply moved
DatabaseTrackInfo track = new DatabaseTrackInfo ();
- TagLib.File file = Banshee.Streaming.StreamTagger.ProcessUri (new SafeUri (file_path));
- Banshee.Streaming.StreamTagger.TrackInfoMerge (track, file);
+ Banshee.Streaming.StreamTagger.TrackInfoMerge (track, new SafeUri (file_path));
IDataReader similar_reader = ServiceManager.DbConnection.Query (fetch_similar_command, psource.DbId, scan_started, track.MetadataHash);
DatabaseTrackInfo similar_track = null;
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs Wed Jan 7 20:50:27 2009
@@ -73,6 +73,7 @@
public PodcastService ()
{
// TODO translate Podcasts folder?
+ // If changed, change HACK in src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs too
tmp_enclosure_path = Path.Combine (Paths.LibraryLocation, "Podcasts");
tmp_download_path = Path.Combine (Paths.ApplicationData, "downloads");
Migo.Net.AsyncWebClient.DefaultUserAgent = Banshee.Web.Browser.UserAgent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]