mod: 番剧搜索

This commit is contained in:
guozhigq
2023-06-23 17:56:24 +08:00
parent 4b1ddae3d7
commit f0b4bde42e
7 changed files with 211 additions and 72 deletions

View File

@ -3,7 +3,7 @@ enum SearchType {
// 视频video
video,
// 番剧media_bangumi,
// media_bangumi,
media_bangumi,
// 影视media_ft
// media_ft,
// 直播间及主播live
@ -23,6 +23,7 @@ enum SearchType {
}
extension SearchTypeExtension on SearchType {
String get type => ['video', 'live_room', 'bili_user'][index];
String get label => ['视频', '直播间', '用户'][index];
String get type =>
['video', 'media_bangumi', 'live_room', 'bili_user'][index];
String get label => ['视频', '番剧', '直播间', '用户'][index];
}

View File

@ -282,3 +282,98 @@ class SearchLiveItemModel {
cateName = Em.regCate(json['cate_name']) ?? '';
}
}
class SearchMBangumiModel {
SearchMBangumiModel({this.list});
List<SearchMBangumiItemModel>? list;
SearchMBangumiModel.fromJson(Map<String, dynamic> json) {
list = json['result']
.map<SearchMBangumiItemModel>(
(e) => SearchMBangumiItemModel.fromJson(e))
.toList();
}
}
class SearchMBangumiItemModel {
SearchMBangumiItemModel({
this.type,
this.mediaId,
this.title,
this.orgTitle,
this.mediaType,
this.cv,
this.staff,
this.seasonId,
this.isAvid,
this.hitEpids,
this.seasonType,
this.seasonTypeName,
this.url,
this.buttonText,
this.isFollow,
this.isSelection,
this.cover,
this.areas,
this.styles,
this.gotoUrl,
this.desc,
this.pubtime,
this.mediaMode,
this.mediaScore,
this.indexShow,
});
String? type;
int? mediaId;
List? title;
String? orgTitle;
int? mediaType;
String? cv;
String? staff;
int? seasonId;
bool? isAvid;
String? hitEpids;
int? seasonType;
String? seasonTypeName;
String? url;
String? buttonText;
int? isFollow;
int? isSelection;
String? cover;
String? areas;
String? styles;
String? gotoUrl;
String? desc;
int? pubtime;
int? mediaMode;
Map? mediaScore;
String? indexShow;
SearchMBangumiItemModel.fromJson(Map<String, dynamic> json) {
type = json['type'];
mediaId = json['media_id'];
title = Em.regTitle(json['title']);
orgTitle = json['org_title'];
mediaType = json['media_type'];
cv = json['cv'];
staff = json['staff'];
seasonId = json['season_id'];
isAvid = json['is_avid'];
hitEpids = json['hit_epids'];
seasonType = json['season_type'];
seasonTypeName = json['season_type_name'];
url = json['url'];
buttonText = json['button_text'];
isFollow = json['is_follow'];
isSelection = json['is_selection'];
cover = json['cover'];
areas = json['areas'];
styles = json['styles'];
gotoUrl = json['goto_url'];
desc = json['desc'];
pubtime = json['pubtime'];
mediaMode = json['media_mode'];
mediaScore = json['media_score'];
indexShow = json['index_show'];
}
}