From 1084e2583e23001b05ce9b9fb1450d52e101a7df Mon Sep 17 00:00:00 2001 From: techmovie Date: Tue, 5 Nov 2024 22:10:43 +0800 Subject: [PATCH] fix: fix sonner toster and imdb error --- src/common.ts | 10 +++++++++- src/components/Container.tsx | 2 +- src/config/MTeam.yaml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/common.ts b/src/common.ts index 65e58d6a..8ecdd58f 100644 --- a/src/common.ts +++ b/src/common.ts @@ -273,7 +273,15 @@ const formatDoubanInfo = async (data:Douban.DoubanMobileData) => { } else { imdbId = getIMDBIdByUrl(imdbUrl); } - const imdbRate = await getIMDBRating(imdbId); + let imdbRate = { + id: '', + value: '0', + count: '0', + }; + if (imdbId) { + imdbRate = await getIMDBRating(imdbId); + } + let foreignTitle = ''; if (original_title && title !== original_title) { foreignTitle = original_title; diff --git a/src/components/Container.tsx b/src/components/Container.tsx index 493d80ec..716dc4f6 100644 --- a/src/components/Container.tsx +++ b/src/components/Container.tsx @@ -88,13 +88,13 @@ const Container = () => { const Title = () => { return

{$t('一键转种')} +

; }; const quickSearchClosed = getValue('easy-seed.quick-search-closed', false) || ''; return <> - { (CURRENT_SITE_NAME === 'HH') && <>
</div> <div class="font-bold leading-6"><UploadSiteList /></div> diff --git a/src/config/MTeam.yaml b/src/config/MTeam.yaml index 758074b2..c12e7ce7 100644 --- a/src/config/MTeam.yaml +++ b/src/config/MTeam.yaml @@ -7,7 +7,7 @@ asTarget: true uploadPath: /upload seedDomSelector: '.detail-view .ant-descriptions-view>table>tbody .ant-descriptions-row:nth-child(3)' search: - path: /browse/movie + path: /browse replaceKey: ['tt', 'https://www.imdb.com/title/tt'] params: keyword: '{imdb}'