From d4011440f1231ba323d740a90dddd6199dffac04 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Feb 17 2013 19:42:01 +0000 Subject: Fix tracebacks upon successfully installing a missing GStreamer plugin. --- diff --git a/soundconverter-2.0.4-gst-install-abort.patch b/soundconverter-2.0.4-gst-install-abort.patch deleted file mode 100644 index 43a41b7..0000000 --- a/soundconverter-2.0.4-gst-install-abort.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2.0.4/soundconverter/gstreamer.py ---- soundconverter-2.0.4-orig/soundconverter/gstreamer.py 2012-10-04 13:56:26.000000000 +0200 -+++ soundconverter-2.0.4/soundconverter/gstreamer.py 2013-02-12 21:17:37.016741328 +0100 -@@ -185,6 +185,7 @@ - vfs_unlink(self.output_filename) - self.play() - return -+ self.error = 'Could not install missing GStreamer plug-in.' - self.done() - if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT: - show_error(_('Plugin installation aborted.')) -@@ -456,6 +457,8 @@ - - def finished(self): - Pipeline.finished(self) -+ if self.error: -+ return - self.sound_file.tags_read = True - if self.found_tag_hook: - gobject.idle_add(self.found_tag_hook, self) diff --git a/soundconverter-2.0.4-gst-install.patch b/soundconverter-2.0.4-gst-install.patch new file mode 100644 index 0000000..04c1063 --- /dev/null +++ b/soundconverter-2.0.4-gst-install.patch @@ -0,0 +1,32 @@ +diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2.0.4/soundconverter/gstreamer.py +--- soundconverter-2.0.4-orig/soundconverter/gstreamer.py 2012-10-04 13:56:26.000000000 +0200 ++++ soundconverter-2.0.4/soundconverter/gstreamer.py 2013-02-17 20:37:14.384991665 +0100 +@@ -182,9 +182,12 @@ + self.parsed = False + self.duration = None + self.finished() +- vfs_unlink(self.output_filename) ++ if hasattr(self,'output_filename'): ++ if vfs_exists(self.output_filename): ++ vfs_unlink(self.output_filename) + self.play() + return ++ self.error = 'Could not install missing GStreamer plug-in.' + self.done() + if result == gst.pbutils.INSTALL_PLUGINS_USER_ABORT: + show_error(_('Plugin installation aborted.')) +@@ -456,10 +459,13 @@ + + def finished(self): + Pipeline.finished(self) ++ if self.error: ++ return + self.sound_file.tags_read = True + if self.found_tag_hook: + gobject.idle_add(self.found_tag_hook, self) +- dontdelete.remove(self) ++ if self in dontdelete: ++ dontdelete.remove(self) + + + class Converter(Decoder): diff --git a/soundconverter.spec b/soundconverter.spec index f320c88..1c605ca 100644 --- a/soundconverter.spec +++ b/soundconverter.spec @@ -2,7 +2,7 @@ Name: soundconverter Version: 2.0.4 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Simple sound converter application for GNOME Group: Applications/Multimedia @@ -27,7 +27,9 @@ Patch5: soundconverter-2.0.4-abort-conversion.patch # applied, lp #1121132 Patch6: soundconverter-2.0.4-gst-pipeline.patch # reported, lp #1123410 -Patch7: soundconverter-2.0.4-gst-install-abort.patch +# reported, lp #1128332 +# reported, lp #1128340 +Patch7: soundconverter-2.0.4-gst-install.patch # reported, lp #1123957 Patch8: soundconverter-2.0.4-no-gnome-audio-profiles.patch # reported, lp #1123957 @@ -136,6 +138,9 @@ update-desktop-database &> /dev/null ||: %changelog +* Sun Feb 17 2013 Michael Schwendt - 2.0.4-16 +- Fix tracebacks upon successfully installing a missing GStreamer plugin. + * Wed Feb 13 2013 Michael Schwendt - 2.0.4-15 - Fix "Remove" to use gtk.TreeModelSort.convert_path_to_child_path