mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-09 11:37:51 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
53
lib/models/video_detail/episode.dart
Normal file
53
lib/models/video_detail/episode.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'package:PiliPlus/models/video_detail/arc.dart';
|
||||
import 'package:PiliPlus/models/video_detail/page.dart';
|
||||
|
||||
class EpisodeItem {
|
||||
int? seasonId;
|
||||
int? sectionId;
|
||||
int? id;
|
||||
int? aid;
|
||||
int? cid;
|
||||
String? title;
|
||||
int? attribute;
|
||||
Arc? arc;
|
||||
Part? page;
|
||||
String? bvid;
|
||||
List<Part>? pages;
|
||||
String? badge;
|
||||
|
||||
EpisodeItem({
|
||||
this.seasonId,
|
||||
this.sectionId,
|
||||
this.id,
|
||||
this.aid,
|
||||
this.cid,
|
||||
this.title,
|
||||
this.attribute,
|
||||
this.arc,
|
||||
this.page,
|
||||
this.bvid,
|
||||
this.pages,
|
||||
this.badge,
|
||||
});
|
||||
|
||||
factory EpisodeItem.fromJson(Map<String, dynamic> json) => EpisodeItem(
|
||||
seasonId: json['season_id'] as int?,
|
||||
sectionId: json['section_id'] as int?,
|
||||
id: json['id'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
cid: json['cid'] as int?,
|
||||
title: json['title'] as String?,
|
||||
attribute: json['attribute'] as int?,
|
||||
arc: json['arc'] == null
|
||||
? null
|
||||
: Arc.fromJson(json['arc'] as Map<String, dynamic>),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Part.fromJson(json['page'] as Map<String, dynamic>),
|
||||
bvid: json['bvid'] as String?,
|
||||
pages: (json['pages'] as List<dynamic>?)
|
||||
?.map((e) => Part.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
badge: json['badge'],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user