From 224a15879f30d86f31e4298a44b7fe9033f8ed30 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Sun, 10 Nov 2024 14:48:33 +1100 Subject: [PATCH] Remove unused getSecurityHeaders function --- src/components/jellyfinApi.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/components/jellyfinApi.ts b/src/components/jellyfinApi.ts index a7b5a488..410ac172 100644 --- a/src/components/jellyfinApi.ts +++ b/src/components/jellyfinApi.ts @@ -108,39 +108,6 @@ export abstract class JellyfinApi { } } - // create the necessary headers for authentication - private static getSecurityHeaders(): { Authorization?: string } { - const parameters: Record = { - Client: 'Chromecast', - Version: packageVersion - }; - - if (this.accessToken) { - parameters.Token = this.accessToken; - } - - if (this.deviceId) { - parameters.DeviceId = this.deviceId; - } - - if (this.deviceName) { - parameters.Device = this.deviceName; - } - - let header = 'MediaBrowser'; - - for (const [key, value] of Object.entries(parameters)) { - header += ` ${key}="${encodeURIComponent(value)}", `; - } - - // Remove last comma - header = header.substring(0, header.length - 2); - - return { - Authorization: header - }; - } - // Create a basic url. // Cannot start with /. public static createUrl(path: string): string {