mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
show rank fold items
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -876,6 +876,23 @@ class VideoHttp {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool _canAddRank(Map i) {
|
||||||
|
if (!GlobalData().blackMids.contains(i['owner']['mid']) &&
|
||||||
|
!RecommendFilter.filterTitle(i['title']) &&
|
||||||
|
!RecommendFilter.filterLikeRatio(
|
||||||
|
i['stat']['like'],
|
||||||
|
i['stat']['view'],
|
||||||
|
)) {
|
||||||
|
if (enableFilter &&
|
||||||
|
i['tname'] != null &&
|
||||||
|
zoneRegExp.hasMatch(i['tname'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// 视频排行
|
// 视频排行
|
||||||
static Future<LoadingState<List<HotVideoItemModel>>> getRankVideoList(
|
static Future<LoadingState<List<HotVideoItemModel>>> getRankVideoList(
|
||||||
int rid,
|
int rid,
|
||||||
@@ -890,18 +907,16 @@ class VideoHttp {
|
|||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
List<HotVideoItemModel> list = <HotVideoItemModel>[];
|
List<HotVideoItemModel> list = <HotVideoItemModel>[];
|
||||||
for (var i in res.data['data']['list']) {
|
for (var i in res.data['data']['list']) {
|
||||||
if (!GlobalData().blackMids.contains(i['owner']['mid']) &&
|
if (_canAddRank(i)) {
|
||||||
!RecommendFilter.filterTitle(i['title']) &&
|
|
||||||
!RecommendFilter.filterLikeRatio(
|
|
||||||
i['stat']['like'],
|
|
||||||
i['stat']['view'],
|
|
||||||
)) {
|
|
||||||
if (enableFilter &&
|
|
||||||
i['tname'] != null &&
|
|
||||||
zoneRegExp.hasMatch(i['tname'])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
list.add(HotVideoItemModel.fromJson(i));
|
list.add(HotVideoItemModel.fromJson(i));
|
||||||
|
final List? others = i['others'];
|
||||||
|
if (others != null && others.isNotEmpty) {
|
||||||
|
for (var j in others) {
|
||||||
|
if (_canAddRank(j)) {
|
||||||
|
list.add(HotVideoItemModel.fromJson(j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Success(list);
|
return Success(list);
|
||||||
|
|||||||
Reference in New Issue
Block a user