banshee r2963 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Banshee.ThickClient/Banshee.Gui.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r2963 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Core/Banshee.ThickClient/Banshee.Gui.Widgets
- Date: Thu, 10 Jan 2008 22:11:53 +0000 (GMT)
Author: abock
Date: Thu Jan 10 22:11:53 2008
New Revision: 2963
URL: http://svn.gnome.org/viewvc/banshee?rev=2963&view=rev
Log:
2008-01-10 Aaron Bockover <abockover novell com>
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs:
Do some exception handling for crappy invalid pixbufs
* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs:
Handle TrackInfoUpdated events from the player engine and only start
the transition when we are already not in one; cover art is now downloaded
properly and shown in the track header when the song plays
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs Thu Jan 10 22:11:53 2008
@@ -95,16 +95,27 @@
string path = CoverArtSpec.GetPathForSize (id, size);
if (File.Exists (path)) {
if (Path.GetExtension (path) == "cover") {
- Pixbuf pixbuf = new Pixbuf (path);
- if (pixbuf.Width < 50 || pixbuf.Height < 50) {
+ try {
+ Pixbuf pixbuf = new Pixbuf (path);
+ if (pixbuf.Width < 50 || pixbuf.Height < 50) {
+ File.Delete (path);
+ return null;
+ }
+
+ pixbuf.Save (Path.ChangeExtension (path, "jpg"), "jpeg");
+ return pixbuf;
+ } catch {
File.Delete (path);
- return null;
}
- pixbuf.Save (Path.ChangeExtension (path, "jpg"), "jpeg");
- return pixbuf;
+
+ return null;
}
- return new Pixbuf (path);
+ try {
+ return new Pixbuf (path);
+ } catch {
+ return null;
+ }
}
string orig_path = CoverArtSpec.GetPathForSize (id, 0);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs Thu Jan 10 22:11:53 2008
@@ -356,7 +356,7 @@
private void OnPlayerEngineEventChanged (object o, PlayerEngineEventArgs args)
{
- if (args.Event == PlayerEngineEvent.StartOfStream) {
+ if (args.Event == PlayerEngineEvent.StartOfStream || args.Event == PlayerEngineEvent.TrackInfoUpdated) {
TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack;
if (track == current_track) {
@@ -378,8 +378,10 @@
} else {
incoming_pixbuf = pixbuf;
}
-
- BeginTransition ();
+
+ if (transition_id == 0) {
+ BeginTransition ();
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]