From d1873ebd247ccad37bd9594ba3618dc5e795ff56 Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Sun, 20 Aug 2023 20:02:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Plex=20tv-show=20formatting=20li?= =?UTF-8?q?ke=20jellyfin=20(#1304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/server/sdk/plex/plexClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/server/sdk/plex/plexClient.ts b/src/tools/server/sdk/plex/plexClient.ts index 2600bf2e2..f6bff9565 100644 --- a/src/tools/server/sdk/plex/plexClient.ts +++ b/src/tools/server/sdk/plex/plexClient.ts @@ -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: {