mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 18:54:22 -04:00
Dont extract thumbnails if already exists
This commit is contained in:
parent
e6a9e2c7da
commit
8a862c86a5
@ -71,6 +71,10 @@ func extractThumbnail(path string, name string) (string, error) {
|
|||||||
sprite_path := fmt.Sprintf("%s/sprite.png", out)
|
sprite_path := fmt.Sprintf("%s/sprite.png", out)
|
||||||
vtt_path := fmt.Sprintf("%s/sprite.vtt", out)
|
vtt_path := fmt.Sprintf("%s/sprite.vtt", out)
|
||||||
|
|
||||||
|
if _, err := os.Stat(sprite_path); err != nil {
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
gen, err := screengen.NewGenerator(path)
|
gen, err := screengen.NewGenerator(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error reading video file: %v", err)
|
log.Printf("Error reading video file: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user