fix: token reload
This commit is contained in:
@@ -95,12 +95,8 @@ func (d *DiscoverMedias) processVideo(video, to, hash string) (media_store.Video
|
||||
return info, errors.Wrapf(err, "ensure directory: %s", to)
|
||||
}
|
||||
|
||||
if err := d.ensureDirectory(filepath.Join(to, "posters")); err != nil {
|
||||
return info, errors.Wrapf(err, "ensure directory: %s", to)
|
||||
}
|
||||
|
||||
// extract poster
|
||||
posterFile := filepath.Join(to, "posters", hash+".jpg")
|
||||
posterFile := filepath.Join(to, hash+".jpg")
|
||||
if err := d.ffmpegVideoToPoster(video, posterFile); err != nil {
|
||||
return info, errors.Wrapf(err, "ffmpeg video to poster: %s", posterFile)
|
||||
}
|
||||
@@ -269,6 +265,10 @@ func (d *DiscoverMedias) runCleanup(to string) {
|
||||
if err := os.RemoveAll(filepath.Join(to, dir)); err != nil {
|
||||
d.log.Errorf("Remove dir: %s", dir)
|
||||
}
|
||||
|
||||
if err := os.RemoveAll(filepath.Join(to, dir+".jpg")); err != nil {
|
||||
d.log.Errorf("Remove poster: %s", dir+".jpg")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user