@@ -135,7 +135,7 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
135
135
playbackInfoResponse .MediaSources [index ].TranscodingContainer = nil
136
136
directStreamURL := fmt .Sprintf ("/Videos/%s/stream?MediaSourceId=%s&Static=true" , * mediasource .ID , * mediasource .ID )
137
137
if mediasource .DirectStreamURL != nil {
138
- logging .Debugf ("%s 原直链播放链接: %s" , * mediasource .Name , * mediasource .DirectStreamURL )
138
+ logging .Debugf ("%s 原直链播放链接: %s" , * mediasource .Name , * mediasource .DirectStreamURL )
139
139
apikeypair , err := utils .ResolveEmbyAPIKVPairs (* mediasource .DirectStreamURL )
140
140
if err != nil {
141
141
logging .Warning ("解析API键值对失败:" , err )
@@ -146,9 +146,9 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
146
146
playbackInfoResponse .MediaSources [index ].DirectStreamURL = & directStreamURL
147
147
container := strings .TrimPrefix (path .Ext (* mediasource .Path ), "." )
148
148
playbackInfoResponse .MediaSources [index ].Container = & container
149
- logging .Info ( * mediasource . Name , " 强制禁止转码,直链播放链接为: " , directStreamURL , ",容器为: " , container )
149
+ logging .Infof ( "%s 强制禁止转码,直链播放链接为:%s,容器为: %s " , * mediasource . Name , directStreamURL , container )
150
150
} else {
151
- logging .Info ( * mediasource . Name , " 保持原有转码设置" )
151
+ logging .Infof ( "%s 保持原有转码设置", * mediasource . Name )
152
152
}
153
153
154
154
if playbackInfoResponse .MediaSources [index ].Size == nil {
@@ -163,7 +163,7 @@ func (jellyfinHandler *JellyfinHandler) ModifyPlaybackInfo(rw *http.Response) er
163
163
continue
164
164
}
165
165
playbackInfoResponse .MediaSources [index ].Size = & fsGetData .Size
166
- logging .Info ( * mediasource .Name , "设置文件大小为:" , fsGetData .Size )
166
+ logging .Infof ( "%s 设置文件大小为:%d" , * mediasource .Name , fsGetData .Size )
167
167
}
168
168
}
169
169
}
@@ -188,7 +188,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
188
188
}
189
189
190
190
mediaSourceID := ctx .Query ("mediasourceid" )
191
- logging .Debug ("请求 ItemsServiceQueryItem:" , mediaSourceID )
191
+ logging .Debugf ("请求 ItemsServiceQueryItem:%s " , mediaSourceID )
192
192
itemResponse , err := jellyfinHandler .server .ItemsServiceQueryItem (mediaSourceID , 1 , "Path,MediaSources" ) // 查询 item 需要去除前缀仅保留数字部分
193
193
if err != nil {
194
194
logging .Warning ("请求 ItemsServiceQueryItem 失败:" , err )
@@ -199,7 +199,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
199
199
item := itemResponse .Items [0 ]
200
200
201
201
if ! strings .HasSuffix (strings .ToLower (* item .Path ), ".strm" ) { // 不是 Strm 文件
202
- logging .Debug ("播放本地视频:" + * item .Path + ",不进行处理" )
202
+ logging .Debugf ("播放本地视频:%s,不进行处理" , * item .Path )
203
203
jellyfinHandler .proxy .ServeHTTP (ctx .Writer , ctx .Request )
204
204
return
205
205
}
@@ -210,7 +210,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
210
210
switch strmFileType {
211
211
case constants .HTTPStrm :
212
212
if * mediasource .Protocol == jellyfin .HTTP {
213
- logging .Info ("HTTPStrm 重定向至:" , * mediasource .Path )
213
+ logging .Infof ("HTTPStrm 重定向至:%s " , * mediasource .Path )
214
214
ctx .Redirect (http .StatusFound , * mediasource .Path )
215
215
}
216
216
return
@@ -235,7 +235,7 @@ func (jellyfinHandler *JellyfinHandler) VideosHandler(ctx *gin.Context) {
235
235
redirectURL += "?sign=" + fsGetData .Sign
236
236
}
237
237
}
238
- logging .Info ("AlistStrm 重定向至:" , redirectURL )
238
+ logging .Infof ("AlistStrm 重定向至:%s " , redirectURL )
239
239
ctx .Redirect (http .StatusFound , redirectURL )
240
240
return
241
241
case constants .UnknownStrm :
0 commit comments