mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
11
lib/models/common/member/archive_order_type_app.dart
Normal file
11
lib/models/common/member/archive_order_type_app.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
|
||||
enum ArchiveOrderTypeApp with EnumWithLabel {
|
||||
pubdate('最新发布'),
|
||||
click('最多播放'),
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
const ArchiveOrderTypeApp(this.label);
|
||||
}
|
||||
12
lib/models/common/member/archive_order_type_web.dart
Normal file
12
lib/models/common/member/archive_order_type_web.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
|
||||
enum ArchiveOrderTypeWeb with EnumWithLabel {
|
||||
pubdate('最新发布'),
|
||||
click('最多播放'),
|
||||
stow('最多收藏'),
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
const ArchiveOrderTypeWeb(this.label);
|
||||
}
|
||||
11
lib/models/common/member/archive_sort_type_app.dart
Normal file
11
lib/models/common/member/archive_sort_type_app.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
|
||||
enum ArchiveSortTypeApp with EnumWithLabel {
|
||||
desc('默认'),
|
||||
asc('倒序'),
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
const ArchiveSortTypeApp(this.label);
|
||||
}
|
||||
10
lib/models/common/member/web_ss_type.dart
Normal file
10
lib/models/common/member/web_ss_type.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
|
||||
enum WebSsType {
|
||||
season(Api.seasonArchives),
|
||||
series(Api.seriesArchives),
|
||||
;
|
||||
|
||||
final String api;
|
||||
const WebSsType(this.api);
|
||||
}
|
||||
@@ -3,14 +3,14 @@ import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/utils/id_utils.dart';
|
||||
import 'package:PiliPlus/utils/num_utils.dart';
|
||||
|
||||
class RecVideoItemAppModel extends BaseRecVideoItemModel {
|
||||
class RcmdVideoItemAppModel extends BaseRcmdVideoItemModel {
|
||||
int? get id => aid;
|
||||
String? talkBack;
|
||||
|
||||
String? cardType;
|
||||
ThreePoint? threePoint;
|
||||
|
||||
RecVideoItemAppModel.fromJson(Map<String, dynamic> json) {
|
||||
RcmdVideoItemAppModel.fromJson(Map<String, dynamic> json) {
|
||||
aid = json['player_args']?['aid'] ?? int.tryParse(json['param'] ?? '0');
|
||||
bvid = json['bvid'] ?? IdUtils.av2bv(aid!);
|
||||
cid = json['player_args']?['cid'];
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
|
||||
// 稍后再看, 排行榜等网页返回也使用该类
|
||||
class HotVideoItemModel extends BaseRecVideoItemModel with MultiSelectData {
|
||||
class HotVideoItemModel extends BaseRcmdVideoItemModel with MultiSelectData {
|
||||
int? videos;
|
||||
int? tid;
|
||||
String? tname;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
|
||||
abstract class BaseRecVideoItemModel extends BaseVideoItemModel {
|
||||
abstract class BaseRcmdVideoItemModel extends BaseVideoItemModel {
|
||||
String? goto;
|
||||
String? uri;
|
||||
String? rcmdReason;
|
||||
@@ -11,8 +11,8 @@ abstract class BaseRecVideoItemModel extends BaseVideoItemModel {
|
||||
String? pgcBadge;
|
||||
}
|
||||
|
||||
class RecVideoItemModel extends BaseRecVideoItemModel {
|
||||
RecVideoItemModel.fromJson(Map<String, dynamic> json) {
|
||||
class RcmdVideoItemModel extends BaseRcmdVideoItemModel {
|
||||
RcmdVideoItemModel.fromJson(Map<String, dynamic> json) {
|
||||
aid = json["id"];
|
||||
bvid = json["bvid"];
|
||||
cid = json["cid"];
|
||||
|
||||
Reference in New Issue
Block a user