初始提交:短剧库源码(含转码优化 ultrafast)

This commit is contained in:
yvan
2026-09-17 19:09:08 +08:00
commit 07dc0f1059
247 changed files with 43242 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package app
import (
"context"
"net/http"
)
func (app *UIApp) handleFFmpeg(writer http.ResponseWriter, request *http.Request) {
installer := app.downloader.ffmpegInstallation()
switch request.Method {
case http.MethodGet:
writeJSON(writer, http.StatusOK, installer.snapshot())
case http.MethodPost:
var input struct{}
if !readPlaybackRequest(writer, request, &input) {
return
}
installer.retry()
go func() { _, _ = installer.ensure(context.Background()) }()
writeJSON(writer, http.StatusAccepted, map[string]bool{"ok": true})
default:
writeJSON(writer, http.StatusMethodNotAllowed, map[string]string{"error": "method not allowed"})
}
}