How to use the tartube.downloads.DownloadItem function in tartube

To help you get started, we’ve selected a few tartube examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github axcore / tartube / tartube / downloads.py View on Github external
and (
                self.operation_type != 'custom'
                or not self.app_obj.custom_dl_by_video_flag
            )
        ) or (
            (
                isinstance(media_data_obj, media.Channel) \
                or isinstance(media_data_obj, media.Playlist)
            ) and (
                self.operation_type != 'custom'
                or not self.app_obj.custom_dl_by_video_flag
            )
        ):
            # Create a new download.DownloadItem object...
            self.download_item_count += 1
            download_item_obj = DownloadItem(
                self.download_item_count,
                media_data_obj,
                options_manager_obj,
            )

            # ...and add it to our list
            self.download_item_list.append(download_item_obj.item_id)
            self.download_item_dict[download_item_obj.item_id] \
            = download_item_obj

        # If the media data object has children, call this function recursively
        #   for each of them
        if not isinstance(media_data_obj, media.Video):
            for child_obj in media_data_obj.child_list:
                self.create_item(child_obj)