fix: issues
This commit is contained in:
@@ -97,6 +97,12 @@ func (d *DiscoverMedias) processVideo(video string, to string) (media_store.Vide
|
||||
return info, errors.Wrapf(err, "ensure directory: %s", to)
|
||||
}
|
||||
|
||||
// extract poster
|
||||
posterFile := filepath.Join(to, "poster.jpg")
|
||||
if err := d.ffmpegVideoToPoster(video, posterFile); err != nil {
|
||||
return info, errors.Wrapf(err, "ffmpeg video to poster: %s", video)
|
||||
}
|
||||
|
||||
// extract audio from video
|
||||
audioFile := filepath.Join(to, "audio.mp3")
|
||||
if err := d.extractAudio(video, audioFile); err != nil {
|
||||
@@ -114,12 +120,6 @@ func (d *DiscoverMedias) processVideo(video string, to string) (media_store.Vide
|
||||
return info, errors.Wrapf(err, "ffmpeg audio to m3u8: %s", audioFile)
|
||||
}
|
||||
|
||||
// extract poster
|
||||
posterFile := filepath.Join(to, "poster.jpg")
|
||||
if err := d.ffmpegVideoToPoster(video, posterFile); err != nil {
|
||||
return info, errors.Wrapf(err, "ffmpeg video to poster: %s", video)
|
||||
}
|
||||
|
||||
// get media duration
|
||||
duration, err := d.getMediaDuration(video)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user