| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /// Public identity of a Jellyfin server.
- class JellyfinServerInfo {
- const JellyfinServerInfo({required this.name, required this.version});
- final String name;
- final String version;
- }
- /// A pending Quick Connect request. The code is shown to the user; the secret
- /// is exchanged for an access token once the user approves the device.
- class JellyfinQuickConnect {
- const JellyfinQuickConnect({required this.code, required this.secret});
- final String code;
- final String secret;
- }
- /// The signed-in Jellyfin user for this device.
- class JellyfinUser {
- const JellyfinUser({required this.id, required this.name});
- final String id;
- final String name;
- }
- /// An access token plus the user it belongs to.
- class JellyfinSession {
- const JellyfinSession({
- required this.accessToken,
- required this.userId,
- required this.userName,
- });
- final String accessToken;
- final String userId;
- final String userName;
- }
- /// A Jellyfin request failed. [JellyfinUnreachable] means the server could not
- /// be contacted at all; [JellyfinAuthException] means the saved token is no
- /// longer accepted.
- class JellyfinException implements Exception {
- JellyfinException(this.message);
- final String message;
- @override
- String toString() => message;
- }
- class JellyfinUnreachable extends JellyfinException {
- JellyfinUnreachable(super.message);
- }
- class JellyfinAuthException extends JellyfinException {
- JellyfinAuthException(super.message);
- }
|