1
0
mirror of https://github.com/nxshock/gallery.git synced 2025-04-19 22:11:51 +05:00

Compare commits

..

No commits in common. "41d00de7b785e7a251fea3d03e4345352b9320e0" and "328331768a7faa0fc61cff4e81311ca4726cfda2" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ func getResponse(path string) ([]Item, error) {
} }
for i := range fileNames { for i := range fileNames {
fileNames[i] = strings.TrimPrefix(filepath.ToSlash(fileNames[i]), filepath.ToSlash(config.WorkingDirectory))[1:] // TODO: check is first slash properly removed fileNames[i] = strings.TrimPrefix(filepath.ToSlash(fileNames[i]), filepath.ToSlash(config.WorkingDirectory))
} }
items := make([]Item, 0) items := make([]Item, 0)

View File

@ -60,11 +60,11 @@ func (pc *PreviewCache) Add(filePath string) ([]byte, error) {
"-f", "avif", "-f", "avif",
tempFileName) tempFileName)
} else { } else {
cmd = exec.Command("ffmpeg", cmd = exec.Command("ffmpeg.exe",
"-i", filepath.FromSlash(filePath), "-i", filepath.FromSlash(filePath),
"-vf", "scale=240:240:force_original_aspect_ratio=increase,crop=240:240:exact=1", "-vf", "scale=240:240:force_original_aspect_ratio=increase,crop=240:240:exact=1",
"-frames:v", "1", "-frames:v", "1",
"-crf", strconv.FormatUint(config.Crf, 10), "-crf", "40",
"-f", "avif", "-f", "avif",
tempFileName) tempFileName)
} }