Files
plezy/lib/models/plex_activity.dart
T

31 lines
811 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:json_annotation/json_annotation.dart';
part 'plex_activity.g.dart';
/// Represents a running background task on a Plex Media Server (from /activities endpoint).
@JsonSerializable(createToJson: false)
class PlexActivity {
@JsonKey(defaultValue: '')
final String uuid;
@JsonKey(defaultValue: '')
final String type;
@JsonKey(defaultValue: '')
final String title;
final String? subtitle;
@JsonKey(defaultValue: 0)
final int progress; // 0100
@JsonKey(defaultValue: false)
final bool cancellable;
const PlexActivity({
required this.uuid,
required this.type,
required this.title,
this.subtitle,
required this.progress,
required this.cancellable,
});
factory PlexActivity.fromJson(Map<String, dynamic> json) => _$PlexActivityFromJson(json);
}