mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Images section (#813)
* Add new configuration options * Refactor scan/clean * Schema changes * Add details to galleries * Remove redundant code * Refine thumbnail generation * Gallery overhaul * Don't allow modifying zip gallery images * Show gallery card overlays * Hide zoom slider when not in grid mode
This commit is contained in:
@@ -14,15 +14,15 @@ func TestGalleryFind(t *testing.T) {
|
||||
gqb := models.NewGalleryQueryBuilder()
|
||||
|
||||
const galleryIdx = 0
|
||||
gallery, err := gqb.Find(galleryIDs[galleryIdx])
|
||||
gallery, err := gqb.Find(galleryIDs[galleryIdx], nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error finding gallery: %s", err.Error())
|
||||
}
|
||||
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdx, "Path"), gallery.Path)
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdx, "Path"), gallery.Path.String)
|
||||
|
||||
gallery, err = gqb.Find(0)
|
||||
gallery, err = gqb.Find(0, nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error finding gallery: %s", err.Error())
|
||||
@@ -42,7 +42,7 @@ func TestGalleryFindByChecksum(t *testing.T) {
|
||||
t.Fatalf("Error finding gallery: %s", err.Error())
|
||||
}
|
||||
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdx, "Path"), gallery.Path)
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdx, "Path"), gallery.Path.String)
|
||||
|
||||
galleryChecksum = "not exist"
|
||||
gallery, err = gqb.FindByChecksum(galleryChecksum, nil)
|
||||
@@ -65,7 +65,7 @@ func TestGalleryFindByPath(t *testing.T) {
|
||||
t.Fatalf("Error finding gallery: %s", err.Error())
|
||||
}
|
||||
|
||||
assert.Equal(t, galleryPath, gallery.Path)
|
||||
assert.Equal(t, galleryPath, gallery.Path.String)
|
||||
|
||||
galleryPath = "not exist"
|
||||
gallery, err = gqb.FindByPath(galleryPath)
|
||||
@@ -87,7 +87,7 @@ func TestGalleryFindBySceneID(t *testing.T) {
|
||||
t.Fatalf("Error finding gallery: %s", err.Error())
|
||||
}
|
||||
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdxWithScene, "Path"), gallery.Path)
|
||||
assert.Equal(t, getGalleryStringValue(galleryIdxWithScene, "Path"), gallery.Path.String)
|
||||
|
||||
gallery, err = gqb.FindBySceneID(0, nil)
|
||||
|
||||
@@ -149,7 +149,7 @@ func verifyGalleriesPath(t *testing.T, pathCriterion models.StringCriterionInput
|
||||
galleries, _ := sqb.Query(&galleryFilter, nil)
|
||||
|
||||
for _, gallery := range galleries {
|
||||
verifyString(t, gallery.Path, pathCriterion)
|
||||
verifyNullString(t, gallery.Path, pathCriterion)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user