1
Fork 0

Cleanup regarding video support

This commit is contained in:
viktorstrate 2020-07-12 14:31:50 +02:00
parent 0e9d37ca77
commit d681d1538c
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,8 @@ func processVideo(tx *sql.Tx, mediaData *EncodeMediaData, videoCachePath *string
}
if videoWebURL == nil {
didProcess = true
web_video_name := fmt.Sprintf("web_video_%s_%s", path.Base(video.Path), utils.GenerateToken())
web_video_name = strings.ReplaceAll(web_video_name, ".", "_")
web_video_name = strings.ReplaceAll(web_video_name, " ", "_")
@ -62,6 +64,8 @@ func processVideo(tx *sql.Tx, mediaData *EncodeMediaData, videoCachePath *string
}
if videoThumbnailURL == nil {
didProcess = true
video_thumb_name := fmt.Sprintf("video_thumb_%s_%s", path.Base(video.Path), utils.GenerateToken())
video_thumb_name = strings.ReplaceAll(video_thumb_name, ".", "_")
video_thumb_name = strings.ReplaceAll(video_thumb_name, " ", "_")

View File

@ -141,7 +141,7 @@ const SearchResults = ({ result }) => {
))
const mediaElements = media.map(media => (
<PhotoRow key={media.id} query={query} photo={media} />
<PhotoRow key={media.id} query={query} media={media} />
))
return (