feat(media-server): add stats for nerds (#4170)
This commit is contained in:
@@ -117,6 +117,7 @@ export class EmbyIntegration extends Integration implements IMediaServerIntegrat
|
||||
episodeName: sessionInfo.NowPlayingItem.EpisodeTitle,
|
||||
albumName: sessionInfo.NowPlayingItem.Album ?? "",
|
||||
episodeCount: sessionInfo.NowPlayingItem.EpisodeCount,
|
||||
metadata: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,30 @@ export interface StreamSession {
|
||||
episodeName?: string | null;
|
||||
albumName?: string | null;
|
||||
episodeCount?: number | null;
|
||||
metadata: {
|
||||
video: {
|
||||
resolution: {
|
||||
width: number;
|
||||
height: number;
|
||||
} | null;
|
||||
frameRate: number | null;
|
||||
};
|
||||
audio: {
|
||||
channelCount: number | null;
|
||||
codec: string | null;
|
||||
};
|
||||
transcoding: {
|
||||
container: string | null;
|
||||
resolution: {
|
||||
width: number;
|
||||
height: number;
|
||||
} | null;
|
||||
target: {
|
||||
audioCodec: string | null;
|
||||
videoCodec: string | null;
|
||||
};
|
||||
};
|
||||
} | null;
|
||||
} | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,36 @@ export class JellyfinIntegration extends Integration implements IMediaServerInte
|
||||
episodeName: sessionInfo.NowPlayingItem.EpisodeTitle,
|
||||
albumName: sessionInfo.NowPlayingItem.Album ?? "",
|
||||
episodeCount: sessionInfo.NowPlayingItem.EpisodeCount,
|
||||
metadata: {
|
||||
video: {
|
||||
resolution:
|
||||
sessionInfo.NowPlayingItem.Width && sessionInfo.NowPlayingItem.Height
|
||||
? {
|
||||
width: sessionInfo.NowPlayingItem.Width,
|
||||
height: sessionInfo.NowPlayingItem.Height,
|
||||
}
|
||||
: null,
|
||||
frameRate: sessionInfo.TranscodingInfo?.Framerate ?? null,
|
||||
},
|
||||
audio: {
|
||||
channelCount: sessionInfo.TranscodingInfo?.AudioChannels ?? null,
|
||||
codec: sessionInfo.TranscodingInfo?.AudioCodec ?? null,
|
||||
},
|
||||
transcoding: {
|
||||
resolution:
|
||||
sessionInfo.TranscodingInfo?.Width && sessionInfo.TranscodingInfo.Height
|
||||
? {
|
||||
width: sessionInfo.TranscodingInfo.Width,
|
||||
height: sessionInfo.TranscodingInfo.Height,
|
||||
}
|
||||
: null,
|
||||
target: {
|
||||
audioCodec: sessionInfo.TranscodingInfo?.AudioCodec ?? null,
|
||||
videoCodec: sessionInfo.TranscodingInfo?.VideoCodec ?? null,
|
||||
},
|
||||
container: sessionInfo.TranscodingInfo?.Container ?? null,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ export class MediaServerMockService implements IMediaServerIntegration {
|
||||
episodeName: null,
|
||||
albumName: null,
|
||||
episodeCount: null,
|
||||
metadata: null,
|
||||
}
|
||||
: null,
|
||||
};
|
||||
|
||||
@@ -61,6 +61,7 @@ export class PlexIntegration extends Integration implements IMediaServerIntegrat
|
||||
episodeName: mediaElement.$.title ?? null,
|
||||
albumName: mediaElement.$.type === "track" ? (mediaElement.$.parentTitle ?? null) : null,
|
||||
episodeCount: mediaElement.$.index ?? null,
|
||||
metadata: null,
|
||||
},
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user