mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-10 03:57:49 +08:00
@@ -1,29 +1,17 @@
|
||||
import 'package:PiliPlus/models_new/video/video_detail/episode.dart';
|
||||
|
||||
class Choice extends BaseEpisodeItem {
|
||||
String? platformAction;
|
||||
String? nativeAction;
|
||||
String? condition;
|
||||
String? option;
|
||||
int? isDefault;
|
||||
|
||||
Choice({
|
||||
super.id,
|
||||
this.platformAction,
|
||||
this.nativeAction,
|
||||
this.condition,
|
||||
super.cid,
|
||||
this.option,
|
||||
this.isDefault,
|
||||
});
|
||||
|
||||
factory Choice.fromJson(Map<String, dynamic> json) => Choice(
|
||||
id: json['id'] as int?,
|
||||
platformAction: json['platform_action'] as String?,
|
||||
nativeAction: json['native_action'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
option: json['option'] as String?,
|
||||
isDefault: json['is_default'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,39 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/edges.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/preload.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/story_list.dart';
|
||||
|
||||
class EdgeInfoData {
|
||||
String? title;
|
||||
int? edgeId;
|
||||
List<StoryList>? storyList;
|
||||
Edges? edges;
|
||||
String? buvid;
|
||||
Preload? preload;
|
||||
int? isLeaf;
|
||||
|
||||
EdgeInfoData({
|
||||
this.title,
|
||||
this.edgeId,
|
||||
this.storyList,
|
||||
this.edges,
|
||||
this.buvid,
|
||||
this.preload,
|
||||
this.isLeaf,
|
||||
});
|
||||
|
||||
factory EdgeInfoData.fromJson(Map<String, dynamic> json) => EdgeInfoData(
|
||||
title: json['title'] as String?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
storyList: (json['story_list'] as List<dynamic>?)
|
||||
?.map((e) => StoryList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
edges: json['edges'] == null
|
||||
? null
|
||||
: Edges.fromJson(json['edges'] as Map<String, dynamic>),
|
||||
buvid: json['buvid'] as String?,
|
||||
preload: json['preload'] == null
|
||||
? null
|
||||
: Preload.fromJson(json['preload'] as Map<String, dynamic>),
|
||||
isLeaf: json['is_leaf'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/question.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/skin.dart';
|
||||
|
||||
class Edges {
|
||||
Dimension? dimension;
|
||||
List<Question>? questions;
|
||||
Skin? skin;
|
||||
|
||||
Edges({this.dimension, this.questions, this.skin});
|
||||
Edges({this.questions});
|
||||
|
||||
factory Edges.fromJson(Map<String, dynamic> json) => Edges(
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
questions: (json['questions'] as List<dynamic>?)
|
||||
?.map((e) => Question.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
skin: json['skin'] == null
|
||||
? null
|
||||
: Skin.fromJson(json['skin'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/video.dart';
|
||||
|
||||
class Preload {
|
||||
List<Video>? video;
|
||||
|
||||
Preload({this.video});
|
||||
|
||||
factory Preload.fromJson(Map<String, dynamic> json) => Preload(
|
||||
video: (json['video'] as List<dynamic>?)
|
||||
?.map((e) => Video.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
@@ -1,31 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/choice.dart';
|
||||
|
||||
class Question {
|
||||
int? id;
|
||||
int? type;
|
||||
int? startTimeR;
|
||||
int? duration;
|
||||
int? pauseVideo;
|
||||
String? title;
|
||||
List<Choice>? choices;
|
||||
|
||||
Question({
|
||||
this.id,
|
||||
this.type,
|
||||
this.startTimeR,
|
||||
this.duration,
|
||||
this.pauseVideo,
|
||||
this.title,
|
||||
this.choices,
|
||||
});
|
||||
|
||||
factory Question.fromJson(Map<String, dynamic> json) => Question(
|
||||
id: json['id'] as int?,
|
||||
type: json['type'] as int?,
|
||||
startTimeR: json['start_time_r'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
pauseVideo: json['pause_video'] as int?,
|
||||
title: json['title'] as String?,
|
||||
choices: (json['choices'] as List<dynamic>?)
|
||||
?.map((e) => Choice.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
class Skin {
|
||||
String? choiceImage;
|
||||
String? titleTextColor;
|
||||
String? titleShadowColor;
|
||||
int? titleShadowOffsetY;
|
||||
int? titleShadowRadius;
|
||||
String? progressbarColor;
|
||||
String? progressbarShadowColor;
|
||||
|
||||
Skin({
|
||||
this.choiceImage,
|
||||
this.titleTextColor,
|
||||
this.titleShadowColor,
|
||||
this.titleShadowOffsetY,
|
||||
this.titleShadowRadius,
|
||||
this.progressbarColor,
|
||||
this.progressbarShadowColor,
|
||||
});
|
||||
|
||||
factory Skin.fromJson(Map<String, dynamic> json) => Skin(
|
||||
choiceImage: json['choice_image'] as String?,
|
||||
titleTextColor: json['title_text_color'] as String?,
|
||||
titleShadowColor: json['title_shadow_color'] as String?,
|
||||
titleShadowOffsetY: json['title_shadow_offset_y'] as int?,
|
||||
titleShadowRadius: json['title_shadow_radius'] as int?,
|
||||
progressbarColor: json['progressbar_color'] as String?,
|
||||
progressbarShadowColor: json['progressbar_shadow_color'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
class StoryList {
|
||||
int? nodeId;
|
||||
int? edgeId;
|
||||
String? title;
|
||||
int? cid;
|
||||
int? startPos;
|
||||
String? cover;
|
||||
int? isCurrent;
|
||||
int? cursor;
|
||||
|
||||
StoryList({
|
||||
this.nodeId,
|
||||
this.edgeId,
|
||||
this.title,
|
||||
this.cid,
|
||||
this.startPos,
|
||||
this.cover,
|
||||
this.isCurrent,
|
||||
this.cursor,
|
||||
});
|
||||
|
||||
factory StoryList.fromJson(Map<String, dynamic> json) => StoryList(
|
||||
nodeId: json['node_id'] as int?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
startPos: json['start_pos'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
isCurrent: json['is_current'] as int?,
|
||||
cursor: json['cursor'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Video {
|
||||
int? aid;
|
||||
int? cid;
|
||||
|
||||
Video({this.aid, this.cid});
|
||||
|
||||
factory Video.fromJson(Map<String, dynamic> json) => Video(
|
||||
aid: json['aid'] as int?,
|
||||
cid: json['cid'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user