mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Change thumbnail default size and resize algorithm (#336)
* Change thumbnail resize algorithm and add size parameter * Height -> Width * Change default size from 100px to 200px * Height -> width
This commit is contained in:
@@ -28,6 +28,7 @@ var once sync.Once
|
||||
type flagStruct struct {
|
||||
configFilePath string
|
||||
}
|
||||
|
||||
var flags = flagStruct{}
|
||||
|
||||
func GetInstance() *singleton {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
streamingFiles = make(map[string][]*http.ResponseWriter)
|
||||
streamingFiles = make(map[string][]*http.ResponseWriter)
|
||||
streamingFilesMutex = sync.RWMutex{}
|
||||
)
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
|
||||
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
"github.com/stashapp/stash/pkg/utils"
|
||||
)
|
||||
|
||||
func DestroyScene(sceneID int, tx *sqlx.Tx) (error) {
|
||||
func DestroyScene(sceneID int, tx *sqlx.Tx) error {
|
||||
qb := models.NewSceneQueryBuilder()
|
||||
jqb := models.NewJoinsQueryBuilder()
|
||||
|
||||
|
||||
_, err := qb.Find(sceneID)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -40,7 +40,7 @@ func DestroyScene(sceneID int, tx *sqlx.Tx) (error) {
|
||||
if err := qb.Destroy(strconv.Itoa(sceneID), tx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -130,4 +130,4 @@ func DeleteSceneFile(scene *models.Scene) {
|
||||
if err != nil {
|
||||
logger.Warnf("Could not delete file %s: %s", scene.Path, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ const testExtension = ".mp4"
|
||||
const existingStudioName = "ExistingStudio"
|
||||
|
||||
const existingStudioSceneName = testName + ".dontChangeStudio" + testExtension
|
||||
|
||||
var existingStudioID int
|
||||
|
||||
var testSeparators = []string{
|
||||
|
||||
Reference in New Issue
Block a user