diff --git a/src/components/__tests__/jellyfinApi.test.ts b/src/components/__tests__/jellyfinApi.test.ts index b04a4e62..c0eb2287 100644 --- a/src/components/__tests__/jellyfinApi.test.ts +++ b/src/components/__tests__/jellyfinApi.test.ts @@ -52,43 +52,6 @@ describe('creating basic urls', () => { }); }); -describe('creating user urls', () => { - beforeAll(() => { - setupMockCastSenders(); - }); - - beforeEach(() => { - JellyfinApi.setServerInfo( - 'thisIsUserId', - 'thisIsAccessToken', - 'thisIsServerAddress' - ); - }); - - test('should return correct url', () => { - const result = JellyfinApi.createUserUrl('somePath'); - const correct = 'thisIsServerAddress/Users/thisIsUserId/somePath'; - - expect(result).toEqual(correct); - }); - - test('should remove leading slashes', () => { - const result = JellyfinApi.createUserUrl('////////somePath'); - const correct = 'thisIsServerAddress/Users/thisIsUserId/somePath'; - - expect(result).toEqual(correct); - }); - - test('should return empty string on undefined serverAddress', () => { - JellyfinApi.setServerInfo(); - - const result = JellyfinApi.createUserUrl('somePath'); - const correct = ''; - - expect(result).toEqual(correct); - }); -}); - describe('creating image urls', () => { beforeAll(() => { setupMockCastSenders(); diff --git a/src/components/jellyfinApi.ts b/src/components/jellyfinApi.ts index 410ac172..859b02e4 100644 --- a/src/components/jellyfinApi.ts +++ b/src/components/jellyfinApi.ts @@ -125,20 +125,6 @@ export abstract class JellyfinApi { return `${this.serverAddress}/${path}`; } - // create a path in /Users/userId/ - public static createUserUrl(path: string | null = null): string { - if (path) { - // Remove leading slashes - while (path.startsWith('/')) { - path = path.substring(1); - } - - return this.createUrl(`Users/${this.userId}/${path}`); - } else { - return this.createUrl(`Users/${this.userId}`); - } - } - /** * Create url to image * @param itemId - Item id