fix: 合集顺序播放

This commit is contained in:
guozhigq
2023-11-12 14:07:50 +08:00
parent c11c5695a2
commit 2ece96df21
7 changed files with 188 additions and 57 deletions

View File

@ -3,36 +3,29 @@ enum SearchType {
// 视频video
video,
// 番剧media_bangumi,
// media_bangumi,
media_bangumi,
// 影视media_ft
// media_ft,
// 直播间及主播live
// live,
// 直播间live_room
// live_room,
live_room,
// 主播live_user
// live_user,
// 专栏article
// article,
// 话题topic
// topic,
// 用户bili_user
bili_user,
// 专栏article
article,
// 相簿photo
// photo
}
extension SearchTypeExtension on SearchType {
String get type => [
'video',
// 'media_bangumi', 'live_room',
'bili_user'
][index];
String get label => [
'视频',
// '番剧', '直播间',
'用户'
][index];
String get type =>
['video', 'media_bangumi', 'live_room', 'bili_user', 'article'][index];
String get label => ['视频', '番剧', '直播间', '用户', '专栏'][index];
}
// 搜索类型为视频、专栏及相簿时
@ -40,17 +33,14 @@ enum ArchiveFilterType {
totalrank,
click,
pubdate,
// dm,
// stow,
// scores,
dm,
stow,
scores,
// 专栏
// attention,
}
extension ArchiveFilterTypeExtension on ArchiveFilterType {
String get description => [
'默认排序', '播放多', '新发布',
// '弹幕多', '收藏多', '评论多',
'最多喜欢'
][index];
String get description =>
['默认排序', '播放多', '新发布', '弹幕多', '收藏多', '评论多', '最多喜欢'][index];
}

View File

@ -378,3 +378,75 @@ class SearchMBangumiItemModel {
indexShow = json['index_show'];
}
}
class SearchArticleModel {
SearchArticleModel({this.list});
List<SearchArticleItemModel>? list;
SearchArticleModel.fromJson(Map<String, dynamic> json) {
list = json['result'] != null
? json['result']
.map<SearchArticleItemModel>(
(e) => SearchArticleItemModel.fromJson(e))
.toList()
: [];
}
}
class SearchArticleItemModel {
SearchArticleItemModel({
this.pubTime,
this.like,
this.title,
this.subTitle,
this.rankOffset,
this.mid,
this.imageUrls,
this.id,
this.categoryId,
this.view,
this.reply,
this.desc,
this.rankScore,
this.type,
this.templateId,
this.categoryName,
});
int? pubTime;
int? like;
List? title;
String? subTitle;
int? rankOffset;
int? mid;
List? imageUrls;
int? id;
int? categoryId;
int? view;
int? reply;
String? desc;
int? rankScore;
String? type;
int? templateId;
String? categoryName;
SearchArticleItemModel.fromJson(Map<String, dynamic> json) {
pubTime = json['pub_time'];
like = json['like'];
title = Em.regTitle(json['title']);
subTitle = json['title'].replaceAll(RegExp(r'<[^>]*>'), '');
rankOffset = json['rank_offset'];
mid = json['mid'];
imageUrls = json['image_urls'];
id = json['id'];
categoryId = json['category_id'];
view = json['view'];
reply = json['reply'];
desc = json['desc'];
rankScore = json['rank_score'];
type = json['type'];
templateId = json['templateId'];
categoryName = json['category_name'];
}
}