diff --git a/components/Movie/components/Torrents/index.tsx b/components/Movie/components/Torrents/index.tsx index 2b71396..656faa0 100644 --- a/components/Movie/components/Torrents/index.tsx +++ b/components/Movie/components/Torrents/index.tsx @@ -51,17 +51,19 @@ const providers = [ const Torrents: FC = ({ title, year, type, id, onResolve }) => { const isMobile = matchMedia('(max-width: 600px)').matches; const prefix = usePrefix(); - const [sorting, setSorting] = useState(Sort.seeds); + const [sort, setSort] = useState(Sort.seeds); const [withYear, setWithYear] = useState(true); const [{ key, queryFn, sortable }, setProvider] = useState(providers[0]); + const query = key === 'yts' ? title : withYear ? `${title} ${year || ''}` : title; + const { data: torrents, isLoading, isFetched } = useTorrents({ - query: withYear ? `${title} ${year || ''}` : title, - sort: sorting, + query, + sort, id, type, key, @@ -104,20 +106,8 @@ const Torrents: FC = ({ title, year, type, id, onResolve }) => { {!isMobile && Title} - - + + showHostManagerModal()} />