Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# If the downloads.VideoDownloader object collected any
# youtube-dl error/warning messages, display them in the
# Error List
if media_data_obj.error_list or media_data_obj.warning_list:
GObject.timeout_add(
0,
app_obj.main_win_obj.errors_list_add_row,
media_data_obj,
)
# In the event of an error, nothing updates the video's row in
# the Video Catalogue, and therefore the error icon won't be
# visible
# Do that now (but don't if mainwin.ComplexCatalogueItem
# objects aren't being used in the Video Catalogue)
if return_code == VideoDownloader.ERROR \
and isinstance(media_data_obj, media.Video) \
and app_obj.catalogue_mode != 'simple_hide_parent' \
and app_obj.catalogue_mode != 'simple_show_parent':
GObject.timeout_add(
0,
app_obj.main_win_obj.video_catalogue_update_row,
media_data_obj,
)
# Call the destructor function of VideoDownloader object
self.video_downloader_obj.close()
# This worker is now available for a new job
self.available_flag = True
# Send a message to the Output Tab's summary page