refactor: remove unused parameters and redundant errors

This commit is contained in:
2026-05-12 12:25:18 +02:00
parent ebce2edb7d
commit 6e4fdf6314
4 changed files with 10 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ func (s *Service) ProxyStream(ctx context.Context, targetURL string, referer str
continue
}
return s.handleProxyResponse(ctx, resp, targetURL, referer, rangeHeader)
return s.handleProxyResponse(ctx, resp, targetURL, referer)
}
return 0, nil, nil, nil, fmt.Errorf("upstream request failed after %d retries: %w", maxRetries+1, lastErr)
@@ -55,7 +55,7 @@ func (s *Service) ProxyStream(ctx context.Context, targetURL string, referer str
// handleProxyResponse processes the upstream response.
// rewrites m3u8 playlists to proxy through our backend.
func (s *Service) handleProxyResponse(ctx context.Context, resp *http.Response, targetURL string, referer string, rangeHeader string) (int, http.Header, []byte, io.ReadCloser, error) {
func (s *Service) handleProxyResponse(ctx context.Context, resp *http.Response, targetURL string, referer string) (int, http.Header, []byte, io.ReadCloser, error) {
// check if response is an m3u8 playlist that needs rewriting
if isM3U8(targetURL, resp.Header.Get("Content-Type")) {