feat: 番剧播放

This commit is contained in:
guozhigq
2023-08-04 17:04:55 +08:00
parent 90c617a1a4
commit c961dc6cf5
17 changed files with 1155 additions and 49 deletions

View File

@ -95,7 +95,7 @@ class BangumiInfoModel {
jpTitle = json['jp_title'];
link = json['link'];
mediaId = json['media_id'];
newEp = json['newEp'];
newEp = json['new_ep'];
playStrategy = json['play_strategy'];
positive = json['positive'];
publish = json['publish'];
@ -184,7 +184,7 @@ class EpisodeItem {
EpisodeItem.fromJson(Map<String, dynamic> json) {
aid = json['aid'];
badge = json['badge'];
badge = json['badge'] != '' ? json['badge'] : null;
badgeInfo = json['badge_info'];
badgeType = json['badge_type'];
bvid = json['bvid'];

View File

@ -277,10 +277,12 @@ class SearchMBangumiModel {
SearchMBangumiModel({this.list});
List<SearchMBangumiItemModel>? list;
SearchMBangumiModel.fromJson(Map<String, dynamic> json) {
list = json['result']
.map<SearchMBangumiItemModel>(
(e) => SearchMBangumiItemModel.fromJson(e))
.toList();
list = json['result'] != null
? json['result']
.map<SearchMBangumiItemModel>(
(e) => SearchMBangumiItemModel.fromJson(e))
.toList()
: [];
}
}

View File

@ -57,7 +57,7 @@ class VideoDetailData {
bool? isChargeableSeason;
bool? isStory;
bool? noCache;
List<Page>? pages;
List<Part>? pages;
Subtitle? subtitle;
// Label? label;
UgcSeason? ugcSeason;
@ -136,7 +136,7 @@ class VideoDetailData {
noCache = json["no_cache"];
pages = json["pages"] == null
? []
: List<Page>.from(json["pages"]!.map((e) => Page.fromJson(e)));
: List<Part>.from(json["pages"]!.map((e) => Part.fromJson(e)));
subtitle =
json["subtitle"] == null ? null : Subtitle.fromJson(json["subtitle"]);
ugcSeason = json["ugc_season"] != null
@ -352,7 +352,7 @@ class Owner {
}
}
class Page {
class Part {
int? cid;
int? page;
String? from;
@ -363,7 +363,7 @@ class Page {
Dimension? dimension;
String? firstFrame;
Page({
Part({
this.cid,
this.page,
this.from,
@ -375,11 +375,11 @@ class Page {
this.firstFrame,
});
fromRawJson(String str) => Page.fromJson(json.decode(str));
fromRawJson(String str) => Part.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
Page.fromJson(Map<String, dynamic> json) {
Part.fromJson(Map<String, dynamic> json) {
cid = json["cid"];
page = json["page"];
from = json["from"];
@ -620,7 +620,7 @@ class EpisodeItem {
int? cid;
String? title;
int? attribute;
Page? page;
Part? page;
String? bvid;
EpisodeItem.fromJson(Map<String, dynamic> json) {
@ -631,7 +631,7 @@ class EpisodeItem {
cid = json['cid'];
title = json['title'];
attribute = json['attribute'];
page = Page.fromJson(json['page']);
page = Part.fromJson(json['page']);
bvid = json['bvid'];
}
}