Skip to content

Commit

Permalink
Remove leading slashes. API obtained URLs might include them
Browse files Browse the repository at this point in the history
  • Loading branch information
hawken93 committed Dec 12, 2020
1 parent 4c815e0 commit c25814e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/jellyfinApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export abstract class JellyfinApi {
// Create a basic url.
// Cannot start with /.
public static createUrl(path: string): string {
// Remove leading slashes
while (path.charAt(0) === '/') path = path.substring(1);

return this.serverAddress + '/' + path;
}

Expand Down

0 comments on commit c25814e

Please sign in to comment.