Support Remux and DirectStream transcode types, fixes #1
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
50941bb95d
commit
7651fa08fe
@ -40,7 +40,16 @@ class SessionsCollector(Collector):
|
|||||||
name = session["NowPlayingItem"]["SeriesName"]
|
name = session["NowPlayingItem"]["SeriesName"]
|
||||||
else:
|
else:
|
||||||
name = session["NowPlayingItem"]["Name"]
|
name = session["NowPlayingItem"]["Name"]
|
||||||
label_values = [session["Client"], name, session["PlayState"]["PlayMethod"], session["UserName"]]
|
|
||||||
|
playmethod = session["PlayState"]["PlayMethod"]
|
||||||
|
if playmethod == "Transcode":
|
||||||
|
if "TranscodingInfo" in session:
|
||||||
|
if session["TranscodingInfo"]["IsVideoDirect"] and session["TranscodingInfo"]["IsAudioDirect"]:
|
||||||
|
playmethod = "Remux"
|
||||||
|
elif session["TranscodingInfo"]["IsVideoDirect"] and not session["TranscodingInfo"]["IsAudioDirect"]:
|
||||||
|
playmethod = "DirectStream"
|
||||||
|
|
||||||
|
label_values = [session["Client"], name, playmethod, session["UserName"]]
|
||||||
sessions_metrics.add_metric(label_values, 1)
|
sessions_metrics.add_metric(label_values, 1)
|
||||||
|
|
||||||
yield sessions_metrics
|
yield sessions_metrics
|
||||||
|
Loading…
Reference in New Issue
Block a user