mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-21 19:27:30 +08:00
ui: add monitored field
This commit is contained in:
@@ -117,6 +117,7 @@ class Episodes {
|
|||||||
int? seasonNumber;
|
int? seasonNumber;
|
||||||
String? overview;
|
String? overview;
|
||||||
String? status;
|
String? status;
|
||||||
|
bool? monitored;
|
||||||
|
|
||||||
Episodes(
|
Episodes(
|
||||||
{this.id,
|
{this.id,
|
||||||
@@ -126,6 +127,7 @@ class Episodes {
|
|||||||
this.airDate,
|
this.airDate,
|
||||||
this.seasonNumber,
|
this.seasonNumber,
|
||||||
this.status,
|
this.status,
|
||||||
|
this.monitored,
|
||||||
this.overview});
|
this.overview});
|
||||||
|
|
||||||
Episodes.fromJson(Map<String, dynamic> json) {
|
Episodes.fromJson(Map<String, dynamic> json) {
|
||||||
@@ -137,6 +139,7 @@ class Episodes {
|
|||||||
seasonNumber = json['season_number'];
|
seasonNumber = json['season_number'];
|
||||||
status = json['status'];
|
status = json['status'];
|
||||||
overview = json['overview'];
|
overview = json['overview'];
|
||||||
|
monitored = json["monitored"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +207,8 @@ class TorrentResource {
|
|||||||
this.source,
|
this.source,
|
||||||
this.indexerId,
|
this.indexerId,
|
||||||
this.downloadFactor,
|
this.downloadFactor,
|
||||||
this.uploadFactor, this.isPrivate});
|
this.uploadFactor,
|
||||||
|
this.isPrivate});
|
||||||
|
|
||||||
String? name;
|
String? name;
|
||||||
int? size;
|
int? size;
|
||||||
@@ -226,7 +230,7 @@ class TorrentResource {
|
|||||||
link: json["link"],
|
link: json["link"],
|
||||||
source: json["source"],
|
source: json["source"],
|
||||||
indexerId: json["indexer_id"],
|
indexerId: json["indexer_id"],
|
||||||
isPrivate: json["is_private"]??false,
|
isPrivate: json["is_private"] ?? false,
|
||||||
downloadFactor: json["download_volume_factor"],
|
downloadFactor: json["download_volume_factor"],
|
||||||
uploadFactor: json["upload_volume_factor"]);
|
uploadFactor: json["upload_volume_factor"]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,18 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
|||||||
for (final ep in details.episodes!) {
|
for (final ep in details.episodes!) {
|
||||||
var row = DataRow(cells: [
|
var row = DataRow(cells: [
|
||||||
DataCell(Text("${ep.episodeNumber}")),
|
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(Text("${ep.title}")),
|
||||||
DataCell(Opacity(
|
DataCell(Opacity(
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
@@ -104,6 +116,7 @@ class _TvDetailsPageState extends ConsumerState<TvDetailsPage> {
|
|||||||
children: [
|
children: [
|
||||||
DataTable(columns: [
|
DataTable(columns: [
|
||||||
const DataColumn(label: Text("#")),
|
const DataColumn(label: Text("#")),
|
||||||
|
const DataColumn(label: Text("监控")),
|
||||||
const DataColumn(
|
const DataColumn(
|
||||||
label: Text("标题"),
|
label: Text("标题"),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user