mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
32
lib/models_new/space/space_archive/badge.dart
Normal file
32
lib/models_new/space/space_archive/badge.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Badge {
|
||||
String? text;
|
||||
String? textColor;
|
||||
String? textColorNight;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? borderColor;
|
||||
String? borderColorNight;
|
||||
int? bgStyle;
|
||||
|
||||
Badge({
|
||||
this.text,
|
||||
this.textColor,
|
||||
this.textColorNight,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.borderColor,
|
||||
this.borderColorNight,
|
||||
this.bgStyle,
|
||||
});
|
||||
|
||||
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
|
||||
text: json['text'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
textColorNight: json['text_color_night'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
borderColorNight: json['border_color_night'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space_archive/cursor_attr.dart
Normal file
11
lib/models_new/space/space_archive/cursor_attr.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class CursorAttr {
|
||||
bool? isLastWatchedArc;
|
||||
int? rank;
|
||||
|
||||
CursorAttr({this.isLastWatchedArc, this.rank});
|
||||
|
||||
factory CursorAttr.fromJson(Map<String, dynamic> json) => CursorAttr(
|
||||
isLastWatchedArc: json['is_last_watched_arc'] as bool?,
|
||||
rank: json['rank'] as int?,
|
||||
);
|
||||
}
|
||||
48
lib/models_new/space/space_archive/data.dart
Normal file
48
lib/models_new/space/space_archive/data.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
import 'package:PiliPlus/models_new/space/space_archive/episodic_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/last_watched_locator.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/order.dart';
|
||||
|
||||
class SpaceArchiveData {
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
LastWatchedLocator? lastWatchedLocator;
|
||||
bool? hasNext;
|
||||
bool? hasPrev;
|
||||
int? next;
|
||||
|
||||
SpaceArchiveData({
|
||||
this.episodicButton,
|
||||
this.order,
|
||||
this.count,
|
||||
this.item,
|
||||
this.lastWatchedLocator,
|
||||
this.hasNext,
|
||||
this.hasPrev,
|
||||
this.next,
|
||||
});
|
||||
|
||||
factory SpaceArchiveData.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArchiveData(
|
||||
episodicButton: json['episodic_button'] == null
|
||||
? null
|
||||
: EpisodicButton.fromJson(
|
||||
json['episodic_button'] as Map<String, dynamic>),
|
||||
order: (json['order'] as List<dynamic>?)
|
||||
?.map((e) => Order.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastWatchedLocator: json['last_watched_locator'] == null
|
||||
? null
|
||||
: LastWatchedLocator.fromJson(
|
||||
json['last_watched_locator'] as Map<String, dynamic>),
|
||||
hasNext: json['has_next'] as bool?,
|
||||
hasPrev: json['has_prev'] as bool?,
|
||||
next: json['next'],
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space_archive/episodic_button.dart
Normal file
13
lib/models_new/space/space_archive/episodic_button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class EpisodicButton {
|
||||
String? text;
|
||||
String? uri;
|
||||
|
||||
EpisodicButton({this.text, this.uri});
|
||||
|
||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||
return EpisodicButton(
|
||||
text: json['text'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
11
lib/models_new/space/space_archive/history.dart
Normal file
11
lib/models_new/space/space_archive/history.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class History {
|
||||
int? progress;
|
||||
int? duration;
|
||||
|
||||
History({this.progress, this.duration});
|
||||
|
||||
factory History.fromJson(Map<String, dynamic> json) => History(
|
||||
progress: json['progress'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
79
lib/models_new/space/space_archive/item.dart
Normal file
79
lib/models_new/space/space_archive/item.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/badge.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/cursor_attr.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/history.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/season.dart';
|
||||
|
||||
class SpaceArchiveItem extends BaseSimpleVideoItemModel {
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
String? coverIcon;
|
||||
String? uri;
|
||||
String? param;
|
||||
String? goto;
|
||||
String? length;
|
||||
bool? isPopular;
|
||||
bool? isSteins;
|
||||
bool? isUgcpay;
|
||||
bool? isCooperation;
|
||||
bool? isPgc;
|
||||
bool? isLivePlayback;
|
||||
bool? isPugv;
|
||||
bool? isFold;
|
||||
bool? isOneself;
|
||||
int? ctime;
|
||||
int? ugcPay;
|
||||
bool? state;
|
||||
int? videos;
|
||||
CursorAttr? cursorAttr;
|
||||
int? iconType;
|
||||
String? publishTimeText;
|
||||
List<Badge>? badges;
|
||||
SpaceArchiveSeason? season;
|
||||
History? history;
|
||||
|
||||
SpaceArchiveItem.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
subtitle = json['subtitle'];
|
||||
tname = json['tname'];
|
||||
cover = json['cover'];
|
||||
coverIcon = json['cover_icon'];
|
||||
uri = json['uri'];
|
||||
param = json['param'];
|
||||
goto = json['goto'];
|
||||
length = json['length'];
|
||||
duration = json['duration'] ?? -1;
|
||||
isPopular = json['is_popular'];
|
||||
isSteins = json['is_steins'];
|
||||
isUgcpay = json['is_ugcpay'];
|
||||
isCooperation = json['is_cooperation'];
|
||||
isPgc = json['is_pgc'];
|
||||
isLivePlayback = json['is_live_playback'];
|
||||
isPugv = json['is_pugv'];
|
||||
isFold = json['is_fold'];
|
||||
isOneself = json['is_oneself'];
|
||||
ctime = json['ctime'];
|
||||
ugcPay = json['ugc_pay'];
|
||||
state = json['state'];
|
||||
bvid = json['bvid'];
|
||||
videos = json['videos'];
|
||||
cid = json['first_cid'];
|
||||
cursorAttr = json['cursor_attr'] == null
|
||||
? null
|
||||
: CursorAttr.fromJson(json['cursor_attr'] as Map<String, dynamic>);
|
||||
iconType = json['icon_type'];
|
||||
publishTimeText = json['publish_time_text'];
|
||||
badges = (json['badges'] as List<dynamic>?)
|
||||
?.map((e) => Badge.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
history = json['history'] == null
|
||||
? null
|
||||
: History.fromJson(json['history'] as Map<String, dynamic>);
|
||||
season = json['season'] == null
|
||||
? null
|
||||
: SpaceArchiveSeason.fromJson(json['season'] as Map<String, dynamic>);
|
||||
stat = PlayStat.fromJson(json);
|
||||
owner = Owner(mid: 0, name: json['author']);
|
||||
}
|
||||
}
|
||||
19
lib/models_new/space/space_archive/last_watched_locator.dart
Normal file
19
lib/models_new/space/space_archive/last_watched_locator.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
class LastWatchedLocator {
|
||||
int? displayThreshold;
|
||||
int? insertRanking;
|
||||
String? text;
|
||||
|
||||
LastWatchedLocator({
|
||||
this.displayThreshold,
|
||||
this.insertRanking,
|
||||
this.text,
|
||||
});
|
||||
|
||||
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
|
||||
return LastWatchedLocator(
|
||||
displayThreshold: json['display_threshold'] as int?,
|
||||
insertRanking: json['insert_ranking'] as int?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
11
lib/models_new/space/space_archive/order.dart
Normal file
11
lib/models_new/space/space_archive/order.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class Order {
|
||||
String? title;
|
||||
String? value;
|
||||
|
||||
Order({this.title, this.value});
|
||||
|
||||
factory Order.fromJson(Map<String, dynamic> json) => Order(
|
||||
title: json['title'] as String?,
|
||||
value: json['value'] as String?,
|
||||
);
|
||||
}
|
||||
12
lib/models_new/space/space_archive/season.dart
Normal file
12
lib/models_new/space/space_archive/season.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
class SpaceArchiveSeason {
|
||||
dynamic mtime;
|
||||
|
||||
SpaceArchiveSeason({
|
||||
this.mtime,
|
||||
});
|
||||
|
||||
factory SpaceArchiveSeason.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArchiveSeason(
|
||||
mtime: json['mtime'],
|
||||
);
|
||||
}
|
||||
15
lib/models_new/space/space_archive/stats.dart
Normal file
15
lib/models_new/space/space_archive/stats.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
class SpaceArchiveStat {
|
||||
String? viewStr;
|
||||
String? danmuStr;
|
||||
|
||||
SpaceArchiveStat({
|
||||
this.viewStr,
|
||||
this.danmuStr,
|
||||
});
|
||||
|
||||
factory SpaceArchiveStat.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArchiveStat(
|
||||
viewStr: json['view_str'],
|
||||
danmuStr: json['danmu_str'],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user