mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-02 09:41:07 +00:00
download thumbnail for manual import
This commit is contained in:
parent
44473a364f
commit
35f1084cc2
@ -12,6 +12,7 @@ import shutil
|
||||
import subprocess
|
||||
|
||||
from home.src.download.queue import PendingList
|
||||
from home.src.download.thumbnails import ThumbManager
|
||||
from home.src.es.connect import ElasticWrap
|
||||
from home.src.index.reindex import Reindex
|
||||
from home.src.index.video import YoutubeVideo, index_new_video
|
||||
@ -466,7 +467,8 @@ class ManualImport:
|
||||
|
||||
def index_metadata(self):
|
||||
"""get metadata from yt or json"""
|
||||
video = YoutubeVideo(self.current_video["video_id"])
|
||||
video_id = self.current_video["video_id"]
|
||||
video = YoutubeVideo(video_id)
|
||||
video.build_json(
|
||||
youtube_meta_overwrite=self._get_info_json(),
|
||||
media_path=self.current_video["media"],
|
||||
@ -474,6 +476,9 @@ class ManualImport:
|
||||
video.check_subtitles()
|
||||
video.upload_to_es()
|
||||
|
||||
url = video.json_data["vid_thumb_url"]
|
||||
ThumbManager(video_id).download_video_thumb(url)
|
||||
|
||||
return video.json_data
|
||||
|
||||
def _get_info_json(self):
|
||||
|
Loading…
Reference in New Issue
Block a user