🐛 Plex tv-show formatting like jellyfin (#1304)
This commit is contained in:
@@ -35,6 +35,7 @@ export class PlexClient {
|
|||||||
const playerElement = this.findElement('Player', videoElement.elements);
|
const playerElement = this.findElement('Player', videoElement.elements);
|
||||||
const mediaElement = this.findElement('Media', videoElement.elements);
|
const mediaElement = this.findElement('Media', videoElement.elements);
|
||||||
const sessionElement = this.findElement('Session', videoElement.elements);
|
const sessionElement = this.findElement('Session', videoElement.elements);
|
||||||
|
const transcodingElement = this.findElement('TranscodeSession', videoElement.elements);
|
||||||
|
|
||||||
if (!playerElement || !mediaElement) {
|
if (!playerElement || !mediaElement) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -43,7 +44,6 @@ export class PlexClient {
|
|||||||
const { videoCodec, videoFrameRate, audioCodec, audioChannels, height, width, bitrate } =
|
const { videoCodec, videoFrameRate, audioCodec, audioChannels, height, width, bitrate } =
|
||||||
mediaElement;
|
mediaElement;
|
||||||
|
|
||||||
const transcodingElement = this.findElement('TranscodeSession', videoElement.elements);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: sessionElement?.id as string | undefined,
|
id: sessionElement?.id as string | undefined,
|
||||||
@@ -51,7 +51,10 @@ export class PlexClient {
|
|||||||
userProfilePicture: userElement?.thumb as string | undefined,
|
userProfilePicture: userElement?.thumb as string | undefined,
|
||||||
sessionName: `${playerElement.product} (${playerElement.title})`,
|
sessionName: `${playerElement.product} (${playerElement.title})`,
|
||||||
currentlyPlaying: {
|
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),
|
type: this.getCurrentlyPlayingType(videoElement.attributes?.type as string),
|
||||||
metadata: {
|
metadata: {
|
||||||
video: {
|
video: {
|
||||||
|
|||||||
Reference in New Issue
Block a user