Fixing Download.info_json name.

This commit is contained in:
Roland 2021-12-28 18:21:43 -07:00
parent b28bacfd5b
commit 8778d53fa1
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 6 additions and 6 deletions

View file

@ -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')

View file

@ -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()