Skip to content

Commit

Permalink
Remove unused getSecurityHeaders function
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Nov 10, 2024
1 parent ace5bde commit 224a158
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/components/jellyfinApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,39 +108,6 @@ export abstract class JellyfinApi {
}
}

// create the necessary headers for authentication
private static getSecurityHeaders(): { Authorization?: string } {
const parameters: Record<string, string> = {
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 {
Expand Down

0 comments on commit 224a158

Please sign in to comment.