From cec5fb0d6c23a7f337ef5a4cf11f934178267e2c Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 2 Jun 2023 16:44:12 -0400 Subject: [PATCH] Fix lint errors --- .golangci.yml | 1 - core/media_streamer.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index cf7a475d3..e7836b4c6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,7 +7,6 @@ linters: - asciicheck - bidichk - bodyclose - - depguard - dogsled - durationcheck - errcheck diff --git a/core/media_streamer.go b/core/media_streamer.go index 0b3203dac..8d32b2586 100644 --- a/core/media_streamer.go +++ b/core/media_streamer.go @@ -129,11 +129,11 @@ func (s *Stream) EstimatedContentLength() int { func selectTranscodingOptions(ctx context.Context, ds model.DataStore, mf *model.MediaFile, reqFormat string, reqBitRate int) (format string, bitRate int) { format = "raw" if reqFormat == "raw" { - return + return format, 0 } if reqFormat == mf.Suffix && reqBitRate == 0 { bitRate = mf.BitRate - return + return format, bitRate } trc, hasDefault := request.TranscodingFrom(ctx) var cFormat string @@ -159,7 +159,7 @@ func selectTranscodingOptions(ctx context.Context, ds model.DataStore, mf *model cBitRate = reqBitRate } if cBitRate == 0 && cFormat == "" { - return + return format, bitRate } t, err := ds.Transcoding(ctx).FindByFormat(cFormat) if err == nil {