Clean missing galleries (#489)

* Clean missing galleries
* Refactor matchFile
This commit is contained in:
WithoutPants
2020-04-25 09:32:55 +10:00
committed by GitHub
parent 8a4d853a5d
commit 5923917e6c
5 changed files with 93 additions and 35 deletions

View File

@@ -3,6 +3,7 @@ package models
import (
"database/sql"
"path/filepath"
"strconv"
"github.com/jmoiron/sqlx"
"github.com/stashapp/stash/pkg/database"
@@ -51,6 +52,10 @@ func (qb *GalleryQueryBuilder) Update(updatedGallery Gallery, tx *sqlx.Tx) (*Gal
return &updatedGallery, nil
}
func (qb *GalleryQueryBuilder) Destroy(id int, tx *sqlx.Tx) error {
return executeDeleteQuery("galleries", strconv.Itoa(id), tx)
}
type GalleryNullSceneID struct {
SceneID sql.NullInt64
}