diff --git a/common/modules/extensions/index.js b/common/modules/extensions/index.js index 5982b398..cfdfed72 100644 --- a/common/modules/extensions/index.js +++ b/common/modules/extensions/index.js @@ -14,12 +14,13 @@ import { extensionsWorker } from '@/views/Settings/TorrentSettings.svelte' * @returns {Promise<(Result & { parseObject: import('anitomyscript').AnitomyResult })[]>} * **/ export default async function getResultsFromExtensions ({ media, episode, batch, movie, resolution }) { + const worker = await /** @type {ReturnType} */(extensionsWorker) + if (!(await worker.metadata)?.length) throw new Error('No torrent sources configured. Add extensions in settings.') + const aniDBMeta = await ALToAniDB(media) const anidbAid = aniDBMeta?.mappings?.anidb_id const anidbEid = anidbAid && (await ALtoAniDBEpisode({ media, episode }, aniDBMeta))?.anidbEid - const worker = await /** @type {ReturnType} */(extensionsWorker) - /** @type {Options} */ const options = { anilistId: media.id, @@ -36,7 +37,7 @@ export default async function getResultsFromExtensions ({ media, episode, batch, const deduped = dedupe(results) - if (!deduped?.length) throw new Error('No results found') + if (!deduped?.length) throw new Error('No results found. Try specifying a torrent manually.') const parseObjects = await anitomyscript(deduped.map(({ title }) => title)) // @ts-ignore diff --git a/common/modules/util.js b/common/modules/util.js index 36b78dbf..4df496b4 100644 --- a/common/modules/util.js +++ b/common/modules/util.js @@ -147,7 +147,7 @@ export const defaults = { smoothScroll: true, cards: 'small', expandingSidebar: true, - torrentPath: undefined, + torrentPathNew: undefined, font: undefined, angle: 'default', toshoURL: SUPPORTS.extensions ? decodeURIComponent(atob('aHR0cHM6Ly9mZWVkLmFuaW1ldG9zaG8ub3JnLw==')) : '', diff --git a/common/views/Settings/InterfaceSettings.svelte b/common/views/Settings/InterfaceSettings.svelte index ffbe6475..e0ac54de 100644 --- a/common/views/Settings/InterfaceSettings.svelte +++ b/common/views/Settings/InterfaceSettings.svelte @@ -37,7 +37,12 @@