From 379b6d3802e707a9b069eee3e437fa1aee53900b Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 6 Oct 2024 11:19:57 +0800 Subject: [PATCH] fix: view bangumi from history --- lib/http/search.dart | 6 ++++-- lib/pages/history/widgets/item.dart | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/http/search.dart b/lib/http/search.dart index 3d469a95..df907710 100644 --- a/lib/http/search.dart +++ b/lib/http/search.dart @@ -168,8 +168,10 @@ class SearchHttp { } } - static Future> bangumiInfo( - {int? seasonId, int? epId}) async { + static Future> bangumiInfo({ + dynamic seasonId, + dynamic epId, + }) async { final Map data = {}; if (seasonId != null) { data['season_id'] = seasonId; diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index 74af94ec..310fe868 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -86,14 +86,15 @@ class HistoryItem extends StatelessWidget { String heroTag = Utils.makeHeroTag(cid); var epid = result['data'].epId; if (epid != null) { - Get.toNamed( - '/video?bvid=$bvid&cid=$cid&seasonId=${result['data'].seasonId}&epId=${result['data'].epId}', - arguments: { - 'pic': pic, - 'heroTag': heroTag, - 'videoType': SearchType.media_bangumi, - }, - ); + Utils.viewBangumi(epId: epid); + // Get.toNamed( + // '/video?bvid=$bvid&cid=$cid&seasonId=${result['data'].seasonId}&epId=${result['data'].epId}', + // arguments: { + // 'pic': pic, + // 'heroTag': heroTag, + // 'videoType': SearchType.media_bangumi, + // }, + // ); } else { int cid = videoItem.history.cid ?? // videoItem.history.oid ??