Calculate and print job totals for scan and generate tasks (#188)

* Calculate and print job totals for scan and generate tasks

* Cosmetic print fixes
This commit is contained in:
bnkai
2019-11-15 19:23:58 +02:00
committed by Leopere
parent 4a5d2bd6e5
commit 5c0ec39db1
4 changed files with 113 additions and 1 deletions

View File

@@ -49,3 +49,18 @@ func (t *GenerateTranscodeTask) Start(wg *sync.WaitGroup) {
logger.Debugf("[transcode] <%s> created transcode: %s", t.Scene.Checksum, outputPath)
return
}
func (t *GenerateTranscodeTask) isTranscodeNeeded() bool {
videoCodec := t.Scene.VideoCodec.String
hasTranscode, _ := HasTranscode(&t.Scene)
if ffmpeg.IsValidCodec(videoCodec) {
return false
}
if hasTranscode {
return false
}
return true
}