RFE: task.py clarity
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SoundConverter |
New
|
Undecided
|
GautierPortet |
Bug Description
A few thoughts while I reviewed task.py and the classes that are derived from it:
self.paused = False
is set in two places, but neither BackgroundTask itself nor the derived TaskQueue uses it. The first time it's used is in ConverterQueue(
is similar. Except that TaskQueue updates this value actually. But with a float (or 0), so the default "None" is overwritten early and else it only makes it more troublesome to use this value. Indeed, ui.py would prefer a default of "0" already, too, and works around the "None": progress = queue.progress if queue.progress else 0
def abort(self):
is overridden by TaskQueue and ConverterQueue, but only Pipeline(
What happens in a decoder pipeline task? Whereas BackgroundTask.
You are right, I remove the unused Task.paused.
I don't see the problem with progress. Progress is None before being at an allowed value. So we know.
Well, it's not used, but whatever :)
Oh, sorry for the confusion with abort/finish. I've overlooked the whole thing. /github. com/kassoulet/ soundconverter/ commit/ a0896c4a992f683 ed59e0df79ad002 f3a44bed37
Check if this is better: https:/