Skip to content

Commit

Permalink
fix: fix sonner toster and imdb error
Browse files Browse the repository at this point in the history
  • Loading branch information
techmovie committed Nov 5, 2024
1 parent b7fab36 commit 1084e25
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ const Container = () => {
const Title = () => {
return <h4>
{$t('一键转种')}
<Toaster position="top-right" richColors />
<span id="easy-seed-setting" className="easy-seed-setting-btn" />
<ConfigSvg onClick={openSettingPanel} className='setting-svg' />
</h4>;
};
const quickSearchClosed = getValue('easy-seed.quick-search-closed', false) || '';
return <>
<Toaster position="top-right" richColors />
{ (CURRENT_SITE_NAME === 'HH') && <>
<div class="font-bold leading-6"><Title /></div>
<div class="font-bold leading-6"><UploadSiteList /></div>
Expand Down
2 changes: 1 addition & 1 deletion src/config/MTeam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down

0 comments on commit 1084e25

Please # to comment.