Revert to Docker-only source paths, fix config validation, improve transcoding info

- handlers_sources.go: revert to relative paths rooted at /media (remove standalone absolute-path mode)
- settings.html: remove manual path input, restore auto-loading source tree from /media
- config.go: remove filesystem existence checks from Validate() — paths may be temporarily unavailable
- transcoder.go: always specify fps in ffmpeg args when MaxFPS is set, preserving source fps if lower than limit
- copier.go: include source codec/format and target codec/format in transcoding task message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 21:28:28 +03:00
parent e885e49647
commit 0a17d11bd1
5 changed files with 91 additions and 196 deletions

View File

@@ -97,8 +97,14 @@ func buildArgs(opts Options) []string {
if maxH := maxHeight(p.MaxResolution); maxH > 0 {
filters = append(filters, fmt.Sprintf("scale=-2:min(%d\\,ih)", maxH))
}
if p.MaxFPS > 0 && src.FPS > float64(p.MaxFPS)+0.01 {
filters = append(filters, fmt.Sprintf("fps=%d", p.MaxFPS))
if p.MaxFPS > 0 {
targetFPS := p.MaxFPS
if src.FPS > 0 && src.FPS < float64(targetFPS) {
// Источник медленнее лимита — сохраняем исходный FPS
filters = append(filters, fmt.Sprintf("fps=%.3f", src.FPS))
} else {
filters = append(filters, fmt.Sprintf("fps=%d", targetFPS))
}
}
if len(filters) > 0 {
args = append(args, "-vf", strings.Join(filters, ","))