tartube
tartube copied to clipboard
Issues with getting video info / stopping download
I downloaded a folder and none of the video info for new items (11) was shown, ie:

When all of the items were finished downloading, it still showed that a download operation was in progress.
I clicked the stop button and nothing happened, and when I click the power button this was in terminal:
b'[download] Finished downloading playlist: Jason Whitlock - Videos' mainapp.py:3789: Warning: Source ID 253855 was not found when attempting to remove it GObject.source_remove(self.dl_timer_id)
https://github.com/axcore/tartube/blob/f0b046d2fdf93214f1a9f01299b111c25373be8c/tartube/mainapp.py#L3789
It's happened before in previous versions as well, and the source ID seems to always be different.
The strange thing is that I took that video above into my test db and it downloaded just fine, and same thing when I put it in unsorted videos of my main db, so it seems to be something related to downloading multiple channels at once.
Any thoughts Axcore?
Happened again overnight, upon quitting tartube b/c it was stuck "download in progress" got the same line:
mainapp.py:3789: Warning: Source ID 884841 was not found when attempting to remove it GObject.source_remove(self.dl_timer_id)
I'm wondering if there's somehow an issue with one of the channels under that particular folder? It seems to happen there more than other folders.
The short answer is that I don't have an explanation for this behaviour, because it is extremely difficult to reproduce.
The GObject.source_remove message you're seeing is part of Tartube's normal tidying up, just before shutting down. I can make that message go away, but it won't solve your problem.
I suppose the thing to do, is to set up a new Tartube data folder containing just the channels/playlists that are failing to download, then download them from scracth a few times and see how often you can reproduce the problem. You can set a minimum download size (Edit > General download options... > Format, use Any format [144p]).
There is a tiny possibility that this code in downloads.py might be to blame.
def stop(self):
"""Called by DownloadWorker.close() and also by
mainwin.MainWin.on_progress_list_stop_now().
Terminates the child process and sets this object's return code to
self.STOPPED.
"""
if self.is_child_process_alive():
if os.name == 'nt':
# os.killpg is not available on MS Windows (see
# https://bugs.python.org/issue5115 )
self.child_process.kill()
# When we kill the child process on MS Windows the return code
# gets set to 1, so we want to reset the return code back to
# 0
self.child_process.returncode = 0
else:
os.killpg(self.child_process.pid, signal.SIGKILL)
self.set_return_code(self.STOPPED)
You didn't say which Tartube version you are using, but it's at line 6320 approximately.
If you are able to reproduce the problem consistently, you could try tweaking this code, starting by removing exactly four spaces from the beginning of the last line, like this:
` def stop(self):
"""Called by DownloadWorker.close() and also by
mainwin.MainWin.on_progress_list_stop_now().
Terminates the child process and sets this object's return code to
self.STOPPED.
"""
if self.is_child_process_alive():
if os.name == 'nt':
# os.killpg is not available on MS Windows (see
# https://bugs.python.org/issue5115 )
self.child_process.kill()
# When we kill the child process on MS Windows the return code
# gets set to 1, so we want to reset the return code back to
# 0
self.child_process.returncode = 0
else:
os.killpg(self.child_process.pid, signal.SIGKILL)
self.set_return_code(self.STOPPED)`
You could even try something much more dtrastic:
def stop(self):
"""Called by DownloadWorker.close() and also by
mainwin.MainWin.on_progress_list_stop_now().
Terminates the child process and sets this object's return code to
self.STOPPED.
"""
try:
if os.name == 'nt':
# os.killpg is not available on MS Windows (see
# https://bugs.python.org/issue5115 )
self.child_process.kill()
# When we kill the child process on MS Windows the return code
# gets set to 1, so we want to reset the return code back to
# 0
self.child_process.returncode = 0
else:
os.killpg(self.child_process.pid, signal.SIGKILL)
self.set_return_code(self.STOPPED)
except:
print('Child process wasn\'t alive anyway')
Closed for inactivity. If the same problem occurs with current versions of tartube/yt-dlp-gtk, feel free to re-open the issue.