diff --git a/soundconverter-2.0.4-fedora.patch b/soundconverter-2.0.4-fedora.patch index 3704b6e..895b6c2 100644 --- a/soundconverter-2.0.4-fedora.patch +++ b/soundconverter-2.0.4-fedora.patch @@ -131,9 +131,39 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/gstreamer.py soundconverter-2 def finished(self): if self.running_tasks: +diff -Nur soundconverter-2.0.4-orig/soundconverter/queue.py soundconverter-2.0.4/soundconverter/queue.py +--- soundconverter-2.0.4-orig/soundconverter/queue.py 2012-01-04 00:23:34.000000000 +0100 ++++ soundconverter-2.0.4/soundconverter/queue.py 2013-02-26 13:06:45.066007125 +0100 +@@ -79,7 +79,8 @@ + + def started(self): + """ BackgroundTask setup callback """ +- log('Queue start: %d tasks, %d thread(s).' % (len(self.waiting_tasks), settings['jobs'])) ++ tn = len(self.waiting_tasks) + len(self.running_tasks) ++ log('Queue start: %d tasks, %d thread(s).' % (tn, settings['jobs'])) + self.count = 0 + self.finished_tasks = 0 + self.start_time = time.time() +@@ -96,9 +97,13 @@ + def task_finished(self, task=None): + if not self.running_tasks: + return +- self.running_tasks.remove(task) +- self.finished_tasks += 1 +- self.start_next_task() ++ # only remove known tasks and then start the next one, ++ # this shall avoid issues with an aborted task reaching finished() ++ # via done() ++ if task in self.running_tasks: ++ self.running_tasks.remove(task) ++ self.finished_tasks += 1 ++ self.start_next_task() + + def abort(self): + for task in self.running_tasks: 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-25 20:15:17.155521771 +0100 ++++ soundconverter-2.0.4/soundconverter/ui.py 2013-02-26 13:06:45.066007125 +0100 @@ -93,7 +93,10 @@ def show_error(self, primary, secondary): self.primary.set_markup(primary) @@ -308,7 +338,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so except ConverterQueueCanceled: log('cancelling conversion.') self.conversion_ended() -@@ -1362,12 +1403,22 @@ +@@ -1362,12 +1403,24 @@ self.conversion_ended() self.set_status(_('Error when converting')) else: @@ -317,6 +347,8 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so + return False self.set_status('') self.pulse_progress = None ++ for row in range(len(self.filelist.get_files())): ++ self.filelist.set_row_progress(row, 0.0) self.converter.start() self.set_sensitive() return False @@ -331,7 +363,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so def on_convert_button_clicked(self, *args): # reset and show progress bar self.set_progress(0) -@@ -1395,8 +1446,12 @@ +@@ -1395,6 +1448,8 @@ def on_button_cancel_clicked(self, *args): self.converter.abort() @@ -339,11 +371,7 @@ diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/so + self.converter.waiting_tasks = [] self.set_status(_('Canceled')) self.set_sensitive() -+ for row in range(len(self.filelist.get_files())): -+ self.filelist.set_row_progress(row, 0.0) self.conversion_ended() - - def on_select_all_activate(self, *args): @@ -1430,6 +1485,7 @@ self.filelist.hide_row_progress() self.status_frame.show() diff --git a/soundconverter.spec b/soundconverter.spec index f0d5b65..97e6a24 100644 --- a/soundconverter.spec +++ b/soundconverter.spec @@ -46,6 +46,8 @@ BuildArch: noarch # soundconverter-2.0.4-per-file-progress.patch # reported, lp #1132936 # soundconverter-2.0.4-cancel-per-file-progress.patch +# not yet reported: incorrect task queue size +# not yet reported: rare case of aborted task reaching task_finished() Patch0: soundconverter-2.0.4-fedora.patch BuildRequires: desktop-file-utils @@ -140,7 +142,9 @@ update-desktop-database &> /dev/null ||: %changelog * Mon Feb 25 2013 Michael Schwendt - 2.0.4-21 -- Reset progress-per-file indicators when cancelling conversion. +- Ignore aborted tasks in task_finished. +- Log correct number of tasks in queue. +- Reset progress-per-file indicators at (re)start of conversion. - Fix missing progress-per-file indicators for Ogg, so at least if the file is done that gets displayed.