|
@@ -91,13 +91,11 @@ def update_tables ( |
|
|
) -> None: |
|
|
) -> None: |
|
|
video_ids: list[int] = [] |
|
|
video_ids: list[int] = [] |
|
|
for datum in api_data: |
|
|
for datum in api_data: |
|
|
tag_names = datum['tags'].split () |
|
|
|
|
|
|
|
|
tag_names: list[str] = datum['tags'].split () |
|
|
video = VideoDto (code = datum['contentId'], |
|
|
video = VideoDto (code = datum['contentId'], |
|
|
title = datum['title'], |
|
|
title = datum['title'], |
|
|
description = datum['description'], |
|
|
|
|
|
|
|
|
description = datum['description'] or '', |
|
|
uploaded_at = datetime.fromisoformat (datum['startTime'])) |
|
|
uploaded_at = datetime.fromisoformat (datum['startTime'])) |
|
|
if video.description is None: |
|
|
|
|
|
video.description = '' |
|
|
|
|
|
video_dao.upsert (video, False) |
|
|
video_dao.upsert (video, False) |
|
|
if video.id_ is not None: |
|
|
if video.id_ is not None: |
|
|
video_ids.append (video.id_) |
|
|
video_ids.append (video.id_) |
|
|