banshee r3937 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Streaming



Author: gburt
Date: Tue May 20 17:16:11 2008
New Revision: 3937
URL: http://svn.gnome.org/viewvc/banshee?rev=3937&view=rev

Log:
2008-05-20  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.Core/Banshee.Streaming/SaveTrackMetadataJob.cs: Disable
	writing metadata to file for video files for now, since TagLib# seems to run
	at 100% and consume lots of memory when we try.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/SaveTrackMetadataJob.cs

Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/SaveTrackMetadataJob.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/SaveTrackMetadataJob.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Streaming/SaveTrackMetadataJob.cs	Tue May 20 17:16:11 2008
@@ -53,14 +53,21 @@
                 Console.WriteLine ("Skipping scheduled metadata write, preference disabled after scheduling");
                 return;
             }
+            
+            // FIXME taglib# does not seem to handle writing metadata to video files well at all atm
+            // so not allowing
+            if ((track.MediaAttributes & TrackMediaAttributes.VideoStream) != 0) {
+                Hyena.Log.DebugFormat ("Avoiding 100% cpu bug with taglib# by not writing metadata to video file {0}", track);
+                return;
+            }
         
             // Note: this should be kept in sync with the metadata read in StreamTagger.cs
             TagLib.File file = StreamTagger.ProcessUri (track.Uri);
             file.Tag.Performers = new string [] { track.ArtistName };
             file.Tag.Album = track.AlbumTitle;
-            /* Bug in taglib-sharp-2.0.3.0: Crash if you send it a genre of "{ null }"
-             * on a song with both ID3v1 and ID3v2 metadata. It's happy with "{}", though.
-             * (see http://forum.taglib-sharp.com/viewtopic.php?f=5&t=239 ) */
+            // Bug in taglib-sharp-2.0.3.0: Crash if you send it a genre of "{ null }"
+            // on a song with both ID3v1 and ID3v2 metadata. It's happy with "{}", though.
+            // (see http://forum.taglib-sharp.com/viewtopic.php?f=5&t=239 )
             file.Tag.Genres = (track.Genre == null) ? new string[] {} : new string [] { track.Genre };
             file.Tag.Title = track.TrackTitle;
             file.Tag.Track = (uint)track.TrackNumber;



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