🐛 Plex tv-show formatting like jellyfin (#1304)

This commit is contained in:
Tagaishi
2023-08-20 20:02:50 +02:00
committed by GitHub
parent bc4009bd8b
commit d1873ebd24

View File

@@ -35,6 +35,7 @@ export class PlexClient {
const playerElement = this.findElement('Player', videoElement.elements);
const mediaElement = this.findElement('Media', videoElement.elements);
const sessionElement = this.findElement('Session', videoElement.elements);
const transcodingElement = this.findElement('TranscodeSession', videoElement.elements);
if (!playerElement || !mediaElement) {
return undefined;
@@ -43,7 +44,6 @@ export class PlexClient {
const { videoCodec, videoFrameRate, audioCodec, audioChannels, height, width, bitrate } =
mediaElement;
const transcodingElement = this.findElement('TranscodeSession', videoElement.elements);
return {
id: sessionElement?.id as string | undefined,
@@ -51,7 +51,10 @@ export class PlexClient {
userProfilePicture: userElement?.thumb as string | undefined,
sessionName: `${playerElement.product} (${playerElement.title})`,
currentlyPlaying: {
name: videoElement.attributes?.title as string,
name: `${videoElement.attributes?.grandparentTitle ?? videoElement.attributes?.title}`,
seasonName: videoElement.attributes?.parentTitle,
episodeName: videoElement.attributes?.title,
episodeCount: videoElement.attributes?.index ?? undefined,
type: this.getCurrentlyPlayingType(videoElement.attributes?.type as string),
metadata: {
video: {