@@ -135,7 +135,7 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
135135 playbackInfoResponse .MediaSources [index ].TranscodingContainer = nil
136136 directStreamURL := fmt .Sprintf ("/Videos/%s/stream?MediaSourceId=%s&Static=true" , * mediasource .ID , * mediasource .ID )
137137 if mediasource .DirectStreamURL != nil {
138- logging .Debugf ("%s 原直链播放链接: %s" , * mediasource .Name , * mediasource .DirectStreamURL )
138+ logging .Debugf ("%s 原直链播放链接: %s" , * mediasource .Name , * mediasource .DirectStreamURL )
139139 apikeypair , err := utils .ResolveEmbyAPIKVPairs (* mediasource .DirectStreamURL )
140140 if err != nil {
141141 logging .Warning ("解析API键值对失败:" , err )
@@ -146,9 +146,9 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
146146 playbackInfoResponse .MediaSources [index ].DirectStreamURL = & directStreamURL
147147 container := strings .TrimPrefix (path .Ext (* mediasource .Path ), "." )
148148 playbackInfoResponse .MediaSources [index ].Container = & container
149- logging .Info ( * mediasource . Name , " 强制禁止转码,直链播放链接为: " , directStreamURL , ",容器为: " , container )
149+ logging .Infof ( "%s 强制禁止转码,直链播放链接为:%s,容器为: %s " , * mediasource . Name , directStreamURL , container )
150150 } else {
151- logging .Info ( * mediasource . Name , " 保持原有转码设置" )
151+ logging .Infof ( "%s 保持原有转码设置", * mediasource . Name )
152152 }
153153
154154 if playbackInfoResponse .MediaSources [index ].Size == nil {
@@ -163,7 +163,7 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
163163 continue
164164 }
165165 playbackInfoResponse .MediaSources [index ].Size = & fsGetData .Size
166- logging .Info ( * mediasource .Name , "设置文件大小为:" , fsGetData .Size )
166+ logging .Infof ( "%s 设置文件大小为:%d" , * mediasource .Name , fsGetData .Size )
167167 }
168168 }
169169 }
@@ -188,7 +188,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
188188 }
189189
190190 mediaSourceID := ctx .Query ("mediasourceid" )
191- logging .Debug ("请求 ItemsServiceQueryItem:" , mediaSourceID )
191+ logging .Debugf ("请求 ItemsServiceQueryItem:%s " , mediaSourceID )
192192 itemResponse , err := jellyfinHandler .server .ItemsServiceQueryItem (mediaSourceID , 1 , "Path,MediaSources" ) // 查询 item 需要去除前缀仅保留数字部分
193193 if err != nil {
194194 logging .Warning ("请求 ItemsServiceQueryItem 失败:" , err )
@@ -199,7 +199,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
199199 item := itemResponse .Items [0 ]
200200
201201 if ! strings .HasSuffix (strings .ToLower (* item .Path ), ".strm" ) { // 不是 Strm 文件
202- logging .Debug ("播放本地视频:" + * item .Path + ",不进行处理" )
202+ logging .Debugf ("播放本地视频:%s,不进行处理" , * item .Path )
203203 jellyfinHandler .proxy .ServeHTTP (ctx .Writer , ctx .Request )
204204 return
205205 }
@@ -210,7 +210,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
210210 switch strmFileType {
211211 case constants .HTTPStrm :
212212 if * mediasource .Protocol == jellyfin .HTTP {
213- logging .Info ("HTTPStrm 重定向至:" , * mediasource .Path )
213+ logging .Infof ("HTTPStrm 重定向至:%s " , * mediasource .Path )
214214 ctx .Redirect (http .StatusFound , * mediasource .Path )
215215 }
216216 return
@@ -235,7 +235,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
235235 redirectURL += "?sign=" + fsGetData .Sign
236236 }
237237 }
238- logging .Info ("AlistStrm 重定向至:" , redirectURL )
238+ logging .Infof ("AlistStrm 重定向至:%s " , redirectURL )
239239 ctx .Redirect (http .StatusFound , redirectURL )
240240 return
241241 case constants .UnknownStrm :
0 commit comments