mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Replace os.Rename with util.SafeMove to allow cross device moving to not fail. (#745)
Fixed annoyingly noisy transcoding progress log messages. Fixed minor minor issue with directories than are named "blah.mp4" being detected as files to be scanned.
This commit is contained in:
@@ -42,6 +42,11 @@ func (t *ScanTask) scanGallery() {
|
||||
return
|
||||
}
|
||||
|
||||
// Ignore directories.
|
||||
if isDir, _ := utils.DirExists(t.FilePath); isDir {
|
||||
return
|
||||
}
|
||||
|
||||
ok, err := utils.IsZipFileUncompressed(t.FilePath)
|
||||
if err == nil && !ok {
|
||||
logger.Warnf("%s is using above store (0) level compression.", t.FilePath)
|
||||
@@ -95,8 +100,9 @@ func (t *ScanTask) associateGallery(wg *sync.WaitGroup) {
|
||||
qb := models.NewGalleryQueryBuilder()
|
||||
gallery, _ := qb.FindByPath(t.FilePath)
|
||||
if gallery == nil {
|
||||
// shouldn't happen , associate is run after scan is finished
|
||||
logger.Errorf("associate: gallery %s not found in DB", t.FilePath)
|
||||
// associate is run after scan is finished
|
||||
// should only happen if gallery is a directory or an io error occurs during hashing
|
||||
logger.Warnf("associate: gallery %s not found in DB", t.FilePath)
|
||||
wg.Done()
|
||||
return
|
||||
}
|
||||
@@ -226,6 +232,11 @@ func (t *ScanTask) scanScene() {
|
||||
return
|
||||
}
|
||||
|
||||
// Ignore directories.
|
||||
if isDir, _ := utils.DirExists(t.FilePath); isDir {
|
||||
return
|
||||
}
|
||||
|
||||
videoFile, err := ffmpeg.NewVideoFile(instance.FFProbePath, t.FilePath)
|
||||
if err != nil {
|
||||
logger.Error(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user