export type PlayerState = 'playing' | 'paused'; export interface RawPlexResponse { MediaContainer: { size: number; Metadata?: { // Path to artwork parentThumb: string; // Album name parentTitle: string; // Album release year parentYear: number; // Song name title: string; // Artist originalTitle?: string; // Also potentially Artist grandparentTitle?: string; // ms into track viewOffset: number; Media: { audioCodec: string; duration: number; Part: { container: string; file: string; duration: number; Stream: { audioChannelLayout: 'stereo' | 'mono'; // Pre-formated Codec string displayTitle: string; // Pre-formated Codec string extendedDisplayTitle: string; }[]; }[]; }[]; User: { title: string; }; Player: { device: string; platform: string; product: string; state: PlayerState; title: string; }; }[]; }; } export interface PlexNowListening { user: string; device: string; state: PlayerState; progress: number; duration: number; albumName: string; albumArtist?: string; albumYear?: number; trackName: string; thumbPath?: string; }