The model is initialized with 'None' for each entry, and then sets
episode for each one. Renaming immediately after selecting a channel
causes 'state' to be accessed on 'NoneType'.
Fixes#1446.
The indicator was previously shown only while queueing new tasks, but
not when queueing failed tasks or unpausing paused tasks. It is now
displayed while scanning the episodes and then restarts when queueing
new tasks.
The download update timer and download queue manager are also disabled
earlier to significantly speed up the process.
upload_downloads_list() is now called at upto 5 second intervals when
there are a lot of tasks. Previously, it could take 5 seconds to run and
then only sleep for 1.5 seconds, making the UI unresponsive for long
periods.
A fast key repeat rate can cause on_episode_list_selection_changed to be
called quicker than it can update the UI. This slows down
shift-selections and results in continued processing long after the key
has been released.
The 250ms timer batches multiple events into a single update, and
improves responsiveness on slower machines.
Add util.idle_timeout_add() to register timers with the same priority as
idle_add(). Change the IdleTimeout to also use the idle_add() priority.
This eliminates the chance of a timer blocking any idle_add from
running.
Change most timeout_add's to idle_timeout_add. Change the timer in
DownloadStatusModel::get_next() back to an idle_add.
Changing task state causes UI to hang while DownloadQueueManager spawns
threads and updates progress tab. And the update_downloads_list() timer
can hang UI for several seconds at a time when thousands of tasks are
queued.
Disabling both of these while a progress dialog is open allows tasks to
be queued faster and the dialog closed sooner.
Add on_ticks() and max_ticks to simplify code using progress indicators.
And support final ticks to set progress to 100% before a final long
operation.
Change interval from 100ms to 250ms, to allow more time to be spent on
the operation.
Add a checkbox in youtube-dl preferences to enable subtitle embedding if
ffmpeg is found. If ffmpeg is not found, show an infobox informing the
user that ffmpeg is required.