feat: 按照黑名单对搜索结果进行屏蔽

This commit is contained in:
guozhigq
2023-09-27 23:24:55 +08:00
parent 6b3773a074
commit 9a0c9f4021
4 changed files with 67 additions and 2 deletions

View File

@ -6,6 +6,7 @@ class SearchVideoModel {
List<SearchVideoItemModel>? list;
SearchVideoModel.fromJson(Map<String, dynamic> json) {
list = json['result']
.where((e) => e['available'] == true)
.map<SearchVideoItemModel>((e) => SearchVideoItemModel.fromJson(e))
.toList();
}
@ -17,7 +18,7 @@ class SearchVideoItemModel {
this.id,
this.cid,
// this.author,
// this.mid,
this.mid,
// this.typeid,
// this.typename,
this.arcurl,
@ -47,7 +48,7 @@ class SearchVideoItemModel {
int? id;
int? cid;
// String? author;
// String? mid;
int? mid;
// String? typeid;
// String? typename;
String? arcurl;
@ -80,6 +81,7 @@ class SearchVideoItemModel {
arcurl = json['arcurl'];
aid = json['aid'];
bvid = json['bvid'];
mid = json['mid'];
// title = json['title'].replaceAll(RegExp(r'<.*?>'), '');
title = Em.regTitle(json['title']);
description = json['description'];