处理无法播放的问题

处理无法播放的问题
This commit is contained in:
truewhile
2026-08-24 21:06:44 +08:00
parent 97d162569d
commit 43fdfe8202
19 changed files with 168 additions and 107 deletions
+5 -1
View File
@@ -410,7 +410,11 @@ func cancelPendingDownloadsHandler(svc *service.Container) gin.HandlerFunc {
func strmPlayHandler(svc *service.Container) gin.HandlerFunc {
return func(c *gin.Context) {
provider := strings.TrimSpace(c.Param("provider"))
result, err := svc.Strm.ResolvePlay(c.Request.Context(), provider, url.Values(c.Request.URL.Query()))
q := url.Values(c.Request.URL.Query())
if userAgent := c.GetHeader("User-Agent"); userAgent != "" {
q.Set("__ua", userAgent)
}
result, err := svc.Strm.ResolvePlay(c.Request.Context(), provider, q)
if err != nil {
if errors.Is(err, service.ErrStrmPlayNotFound) {
c.Status(http.StatusNotFound)