ui: add monitored field

This commit is contained in:
Simon Ding
2024-08-02 14:06:44 +08:00
parent aa320c6dcb
commit b24c1a1501
2 changed files with 19 additions and 2 deletions

View File

@@ -117,6 +117,7 @@ class Episodes {
int? seasonNumber;
String? overview;
String? status;
bool? monitored;
Episodes(
{this.id,
@@ -126,6 +127,7 @@ class Episodes {
this.airDate,
this.seasonNumber,
this.status,
this.monitored,
this.overview});
Episodes.fromJson(Map<String, dynamic> json) {
@@ -137,6 +139,7 @@ class Episodes {
seasonNumber = json['season_number'];
status = json['status'];
overview = json['overview'];
monitored = json["monitored"];
}
}
@@ -204,7 +207,8 @@ class TorrentResource {
this.source,
this.indexerId,
this.downloadFactor,
this.uploadFactor, this.isPrivate});
this.uploadFactor,
this.isPrivate});
String? name;
int? size;
@@ -226,7 +230,7 @@ class TorrentResource {
link: json["link"],
source: json["source"],
indexerId: json["indexer_id"],
isPrivate: json["is_private"]??false,
isPrivate: json["is_private"] ?? false,
downloadFactor: json["download_volume_factor"],
uploadFactor: json["upload_volume_factor"]);
}

View File

@@ -38,6 +38,18 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
for (final ep in details.episodes!) {
var row = DataRow(cells: [
DataCell(Text("${ep.episodeNumber}")),
DataCell(ep.monitored == true
? const Tooltip(
message: "监控中",
child: Opacity(
opacity: 0.7,
child: Icon(Icons.alarm),
),
)
: const Opacity(
opacity: 0.5,
child: Icon(Icons.alarm_off),
)),
DataCell(Text("${ep.title}")),
DataCell(Opacity(
opacity: 0.5,
@@ -104,6 +116,7 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
children: [
DataTable(columns: [
const DataColumn(label: Text("#")),
const DataColumn(label: Text("监控")),
const DataColumn(
label: Text("标题"),
),