diff --git a/modules/videos/downloader.py b/modules/videos/downloader.py index 4583a3cd..d2a61924 100755 --- a/modules/videos/downloader.py +++ b/modules/videos/downloader.py @@ -50,7 +50,7 @@ class ChannelDownloader(Downloader, ABC): name = 'video_channel' @classmethod - def valid_url(cls, url) -> tuple[bool, None]: + def valid_url(cls, url) -> Tuple[bool, None]: for ie in ChannelIEs: if ie.suitable(url): return True, None @@ -94,7 +94,7 @@ class VideoDownloader(Downloader, ABC): name = 'video' @classmethod - def valid_url(cls, url) -> tuple[bool, Optional[dict]]: + def valid_url(cls, url) -> Tuple[bool, Optional[dict]]: """ Match against all Youtube-DL Info Extractors, except those that match a Channel. """ @@ -117,7 +117,7 @@ class VideoDownloader(Downloader, ABC): raise UnrecoverableDownloadError('Max download attempts reached') url = download.url - info = download.info + info = download.info_json channel_name = info.get('channel') channel_id = info.get('channel_id') diff --git a/wrolpi/downloader.py b/wrolpi/downloader.py index bfe9fd22..b948da78 100644 --- a/wrolpi/downloader.py +++ b/wrolpi/downloader.py @@ -47,7 +47,7 @@ class Download(ModelHelper, Base): last_successful_download = Column(TZDateTime) next_download = Column(TZDateTime) status = Column(String, default='new') - info = Column(JSONB) + info_json = Column(JSONB) downloader = Column(Text) def __repr__(self): @@ -126,7 +126,7 @@ class Downloader: download_manager.register_downloader(self) @classmethod - def valid_url(cls, url) -> tuple[bool, Optional[dict]]: + def valid_url(cls, url) -> Tuple[bool, Optional[dict]]: raise NotImplementedError() def do_download(self, download: Download): @@ -268,7 +268,7 @@ class DownloadManager: download.downloader = downloader.name if isinstance(info, dict): - download.info = info + download.info_json = info session.commit()