refactor/significant-changes #3

Merged
mkelvers merged 71 commits from refactor/significant-changes into main 2026-05-14 11:25:25 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 0f8d1c7dc0 - Show all commits

View File

@@ -176,11 +176,11 @@ func (h *PlaybackHandler) HandleProxyStream(c *gin.Context) {
c.Status(http.StatusBadGateway) c.Status(http.StatusBadGateway)
return return
} }
defer resp.Body.Close() defer func() { _ = resp.Body.Close() }()
for k, v := range resp.Header { for k, v := range resp.Header {
c.Header(k, v[0]) c.Header(k, v[0])
} }
c.Status(resp.StatusCode) c.Status(resp.StatusCode)
io.Copy(c.Writer, resp.Body) _, _ = io.Copy(c.Writer, resp.Body)
} }

View File

@@ -348,9 +348,10 @@ func (s *playbackService) fetchSkipSegments(ctx context.Context, malID int, epis
segments := make([]SkipSegment, 0, len(parsed.Result)) segments := make([]SkipSegment, 0, len(parsed.Result))
for _, r := range parsed.Result { for _, r := range parsed.Result {
skipType := strings.ToLower(r.SkipType) skipType := strings.ToLower(r.SkipType)
if skipType == "op" { switch skipType {
case "op":
skipType = "opening" skipType = "opening"
} else if skipType == "ed" { case "ed":
skipType = "ending" skipType = "ending"
} }
segments = append(segments, SkipSegment{ segments = append(segments, SkipSegment{