diff --git a/dzen-assistant/admin/src/App.tsx b/dzen-assistant/admin/src/App.tsx index c45a23c..e97d5ea 100644 --- a/dzen-assistant/admin/src/App.tsx +++ b/dzen-assistant/admin/src/App.tsx @@ -45,6 +45,7 @@ type Video = { id: number title: string sourceUrl: string + manual?: boolean status: string progressPercent: number progressStage: string @@ -1523,7 +1524,7 @@ export default function App() {
{video.progressStage}
: null} diff --git a/dzen-assistant/app/routes.py b/dzen-assistant/app/routes.py index 0d01cf9..0904b78 100644 --- a/dzen-assistant/app/routes.py +++ b/dzen-assistant/app/routes.py @@ -463,7 +463,8 @@ def import_video(payload: ManualVideoIn, session: Session = Depends(get_session) if existing: raise HTTPException(status_code=409, detail=f"Этот ролик уже добавлен: #{existing.id}") - published_at = parse_upload_date(metadata.get("upload_date")) + # A manually imported video enters our queue now, regardless of its original age. + published_at = datetime.now(timezone.utc) duration = metadata.get("duration") try: duration = round(float(duration)) if duration is not None else None @@ -505,6 +506,7 @@ def list_videos(session: Session = Depends(get_session)) -> list[dict]: "id": video.id, "title": video.title, "sourceUrl": video.source_url, + "manual": video.source_id is None, "status": video.status, "progressPercent": video.progress_percent, "progressStage": video.progress_stage,