[soundconverter] 2.0.4-20

Michael Schwendt mschwendt at fedoraproject.org
Sun Feb 24 16:36:07 UTC 2013


commit aaed2017376d109b80169cf79f73928be6003ef4
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Sun Feb 24 17:36:01 2013 +0100

    2.0.4-20
    
    - Restart tag reading after GStreamer plug-in installation.
    - 2.0.4-19
    - Make "Cancel" also end the wait-for-tagreaders loop, since the async
      events for plugin installation are problematic.

 soundconverter-2.0.4-fedora.patch |   65 +++++++++++++++++++++++++++++-------
 soundconverter.spec               |   10 ++++--
 2 files changed, 59 insertions(+), 16 deletions(-)
---
diff --git a/soundconverter-2.0.4-fedora.patch b/soundconverter-2.0.4-fedora.patch
index 46e9b3e..261c666 100644
--- a/soundconverter-2.0.4-fedora.patch
+++ b/soundconverter-2.0.4-fedora.patch
@@ -32,8 +32,16 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/fileoperations.py soundconver
  
 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-24 16:01:24.705306377 +0100
-@@ -181,13 +181,16 @@
++++ soundconverter-2.0.4/soundconverter/gstreamer.py	2013-02-24 17:20:44.126131622 +0100
+@@ -142,6 +142,7 @@
+         self.error = None
+         self.connected_signals = []
+         self.aborted = False
++        self.plugin_added = False
+ 
+     def started(self):
+         self.play()
+@@ -181,13 +182,17 @@
              gst.update_registry()
              self.parsed = False
              self.duration = None
@@ -43,6 +51,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2
 +            if hasattr(self,'output_filename'):
 +                if vfs_exists(self.output_filename):
 +                    vfs_unlink(self.output_filename)
++            self.plugin_added = True
              self.play()
              return
 -        self.done()
@@ -54,7 +63,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2
              return
  
          show_error('Error', 'failed to install plugins: %s' % gobject.markup_escape_text(str(result)))
-@@ -456,10 +459,14 @@
+@@ -456,10 +461,14 @@
  
      def finished(self):
          Pipeline.finished(self)
@@ -71,7 +80,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2
  
  
  class Converter(Decoder):
-@@ -501,24 +508,23 @@
+@@ -501,24 +510,23 @@
              'gst-profile': self.add_audio_profile,
          }
          self.add_command('audiorate')
@@ -105,7 +114,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2
                          self.output_type)
              return
  
-@@ -529,7 +535,7 @@
+@@ -529,7 +537,7 @@
          if dirname and not gnomevfs.exists(dirname):
              log('Creating folder: \'%s\'' % dirname)
              if not vfs_makedirs(str(dirname)):
@@ -116,7 +125,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2
          self.add_command('%s location="%s"' % (
 diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/soundconverter/ui.py
 --- soundconverter-2.0.4-orig/soundconverter/ui.py	2012-10-06 12:43:23.000000000 +0200
-+++ soundconverter-2.0.4/soundconverter/ui.py	2013-02-24 16:02:05.155190172 +0100
++++ soundconverter-2.0.4/soundconverter/ui.py	2013-02-24 17:30:25.781472411 +0100
 @@ -93,7 +93,10 @@
      def show_error(self, primary, secondary):
          self.primary.set_markup(primary)
@@ -227,7 +236,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
              self.filelist.remove(i)
              model, paths = self.filelist_selection.get_selected_rows()
          self.set_sensitive()
-@@ -1305,11 +1318,20 @@
+@@ -1305,11 +1318,22 @@
  
          tagreader = TagReader(sound_file)
          tagreader.set_found_tag_hook(self.tags_read)
@@ -236,6 +245,8 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
  
      def tags_read(self, tagreader):
 +        self.tag_reader_tasks.remove(tagreader)
++        if tagreader.plugin_added:
++            self.plugin_added = True
          sound_file = tagreader.get_sound_file()
 -        self.converter.add(sound_file)
 +        try:
@@ -249,17 +260,20 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
  
      def on_progress(self):
          if self.pulse_progress >= 0: # still waiting for tags
-@@ -1336,6 +1358,9 @@
+@@ -1335,7 +1359,11 @@
+                     sound_file.progress = None
          return running
  
-     def do_convert(self):
+-    def do_convert(self):
++    def do_convert_real(self):
++        self.plugin_added = False
 +        self.tag_reader_exception = None
 +        self.tag_reader_tasks = []
 +        self.converter.abort()  # to start with empty queues
          try:
              self.pulse_progress = -1
              gobject.timeout_add(100, self.on_progress)
-@@ -1347,6 +1372,10 @@
+@@ -1347,6 +1375,10 @@
              total = len(files)
              for i, sound_file in enumerate(files):
                  gtk_iteration()
@@ -270,7 +284,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
                  self.pulse_progress = float(i)/total
                  sound_file.progress = None
                  if self.prefs.require_tags:
-@@ -1354,6 +1383,13 @@
+@@ -1354,6 +1386,15 @@
                  else:
                      self.converter.add(sound_file)
  
@@ -280,11 +294,36 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
 +                if e:
 +                    log("Forwarded exception!")
 +                    raise e
++                if self.plugin_added:
++                    break
 +
          except ConverterQueueCanceled:
              log('cancelling conversion.')
              self.conversion_ended()
-@@ -1395,6 +1431,8 @@
+@@ -1362,12 +1403,22 @@
+             self.conversion_ended()
+             self.set_status(_('Error when converting'))
+         else:
++            if self.plugin_added:
++                print "Restarting after GStreamer plug-in installation!"
++                return False
+             self.set_status('')
+             self.pulse_progress = None
+             self.converter.start()
+             self.set_sensitive()
+         return False
+ 
++    def do_convert(self):
++        while (1):
++            r = self.do_convert_real()
++            if not self.plugin_added:
++                break
++        return r
++
+     def on_convert_button_clicked(self, *args):
+         # reset and show progress bar
+         self.set_progress(0)
+@@ -1395,6 +1446,8 @@
  
      def on_button_cancel_clicked(self, *args):
          self.converter.abort()
@@ -293,7 +332,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so
          self.set_status(_('Canceled'))
          self.set_sensitive()
          self.conversion_ended()
-@@ -1430,6 +1468,7 @@
+@@ -1430,6 +1483,7 @@
          self.filelist.hide_row_progress()
          self.status_frame.show()
          self.widget.set_sensitive(True)
diff --git a/soundconverter.spec b/soundconverter.spec
index e5cfeba..a372a04 100644
--- a/soundconverter.spec
+++ b/soundconverter.spec
@@ -2,7 +2,7 @@
 
 Name:           soundconverter
 Version:        2.0.4
-Release:        19%{?dist}
+Release:        20%{?dist}
 Summary:        Simple sound converter application for GNOME
 
 Group:          Applications/Multimedia
@@ -32,7 +32,8 @@ BuildArch:      noarch
 #     soundconverter-2.0.4-gst-pipeline.patch
 # reported, lp #1123410
 #     soundconverter-2.0.4-gst-install.patch
-#     TODO: async is problematic for the current tagreader tasks
+#     TODO: async is problematic for the current tagreader tasks,
+#     so restart tagreading after a plugin has been installed
 # fixed, lp #1123957
 #     TODO: recheck in >= 2.0.5
 #     soundconverter-2.0.4-no-gnome-audio-profiles.patch
@@ -134,7 +135,10 @@ update-desktop-database &> /dev/null ||:
 
 
 %changelog
-* Sun Feb 24 2013 Michael Schwendt <mschwendt at fedoraproject.org> - 2.0.4-19
+* Sun Feb 24 2013 Michael Schwendt <mschwendt at fedoraproject.org>
+- 2.0.4-20
+- Restart tag reading after GStreamer plug-in installation.
+- 2.0.4-19
 - Make "Cancel" also end the wait-for-tagreaders loop, since the async
   events for plugin installation are problematic.
 


More information about the scm-commits mailing list