Converting VideoPlayer to use FileGroup.url. Fixing downgrade to use FileGroup.url.

This commit is contained in:
Roland 2023-10-29 21:13:38 -06:00
parent 440b770a11
commit 0629c8b464
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ def downgrade():
session.execute('ALTER TABLE video ADD COLUMN IF NOT EXISTS viewed TIMESTAMP WITH TIME ZONE')
session.execute('''
UPDATE video
SET url=file_group.viewed
SET url=file_group.url
FROM file_group
WHERE file_group.id = video.file_group_id
''')

View file

@ -130,7 +130,7 @@ function VideoPage({videoFile, prevFile, nextFile, fetchVideo, ...props}) {
<p>{videoFile.size ? humanFileSize(videoFile.size) : 'Unknown'}</p>
<h3>Source URL</h3>
<p>{video.url ? <a href={video.url}>{video.url}</a> : 'N/A'}</p>
<p>{videoFile.url ? <a href={videoFile.url}>{videoFile.url}</a> : 'N/A'}</p>
<h3>View Count</h3>
<p>{video.view_count ? humanNumber(video.view_count) : 'N/A'}</p>