fix: Updated auth header (#62)

## Pull Request Description

Use updated auth header for jellyfin authentication

## Issue Being Fixed

Using deprecated auth headers

Resolves #61 

## Checklist

- [x] If a new package was added, did you ensure it works for all
supported platforms? Is the package also well maintained?
- [x] Did you add localization for any text? If yes, did you sort the
.arb file using ```arb_utils sort <INPUT_FILE>```?
- [x] Check that any changes are related to the issue at hand.

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-10-22 16:29:38 +02:00 committed by GitHub
parent 9fcb4e0285
commit f7ceb6c3a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,9 @@
import 'dart:convert';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:xid/xid.dart';
import 'package:fladder/util/application_info.dart';
import 'package:xid/xid.dart';
class CredentialsModel {
final String token;
@ -27,9 +27,8 @@ class CredentialsModel {
final application = ref.read(applicationInfoProvider);
final headers = {
'content-type': 'application/json',
'x-emby-token': token,
'x-emby-authorization':
'MediaBrowser Client="${application.name}", Device="${application.os}", DeviceId="$deviceId", Version="${application.version}"'
'authorization':
'MediaBrowser Token="$token", Client="${application.name}", Device="${application.os}", DeviceId="$deviceId", Version="${application.version}"'
};
return headers;
}