mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Handling if multiple videos exist at start of video download.
This commit is contained in:
parent
2aa30e1674
commit
b705e08e48
2 changed files with 3 additions and 1 deletions
|
|
@ -211,7 +211,8 @@ class VideoDownloader(Downloader, ABC):
|
|||
# Video may have been downloaded previously, get its location for error reporting.
|
||||
location = None
|
||||
with get_db_session() as session:
|
||||
video = Video.get_by_url(url, session=session)
|
||||
videos = session.query(Video).join(FileGroup).filter_by(url=url).all()
|
||||
video = videos[0] if videos else None
|
||||
if video and video.channel_id:
|
||||
location = f'/videos/channel/{video.channel_id}/video/{video.id}'
|
||||
elif video:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue