Indexer: Ignore sequential names for single photos

This commit is contained in:
Michael Mayer 2020-12-11 23:45:12 +01:00
parent 645df39c33
commit 468e177cd3

View file

@ -178,7 +178,7 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) (
if photoQuery = entity.UnscopedDb().First(&photo, "photo_path = ? AND photo_name = ?", filePath, fullBase); photoQuery.Error == nil || fileBase == fullBase || o.Single {
// Skip next query.
} else if photoQuery = entity.UnscopedDb().First(&photo, "photo_path = ? AND photo_name = ?", filePath, fileBase); photoQuery.Error == nil {
} else if photoQuery = entity.UnscopedDb().First(&photo, "photo_path = ? AND photo_name = ? AND photo_single = 0", filePath, fileBase); photoQuery.Error == nil {
fileStacked = true
}