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:
InfiniteTF
2020-01-31 23:19:15 +01:00
committed by GitHub
parent 03c07a429d
commit 6a6e8d8875
10 changed files with 30 additions and 21 deletions

View File

@@ -28,6 +28,7 @@ var once sync.Once
type flagStruct struct {
configFilePath string
}
var flags = flagStruct{}
func GetInstance() *singleton {

View File

@@ -9,7 +9,7 @@ import (
)
var (
streamingFiles = make(map[string][]*http.ResponseWriter)
streamingFiles = make(map[string][]*http.ResponseWriter)
streamingFilesMutex = sync.RWMutex{}
)

View File

@@ -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())
}
}
}

View File

@@ -26,6 +26,7 @@ const testExtension = ".mp4"
const existingStudioName = "ExistingStudio"
const existingStudioSceneName = testName + ".dontChangeStudio" + testExtension
var existingStudioID int
var testSeparators = []string{