mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-18 07:02:27 +00:00
feat: give sneedex results when no mappings
fix: find in current movie
This commit is contained in:
parent
a67a204cd1
commit
5600485f4d
2 changed files with 6 additions and 2 deletions
|
|
@ -9,7 +9,11 @@ import getSeedexBests from './seadex.js'
|
|||
|
||||
export default async function ({ media, episode }) {
|
||||
const json = await getAniDBFromAL(media)
|
||||
if (typeof json !== 'object') throw new Error(json || 'No mapping found.')
|
||||
if (typeof json !== 'object') {
|
||||
const bests = await getSeedexBests(media)
|
||||
if (!bests.length) throw new Error(json || 'No mapping found.')
|
||||
return bests
|
||||
}
|
||||
|
||||
const movie = isMovie(media) // don't query movies with qualities, to allow 4k
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
const fileList = files.value
|
||||
|
||||
const targetFile = fileList.find(file => file.media?.media?.id === obj.media.id && file.media?.episode === obj.episode)
|
||||
const targetFile = fileList.find(file => file.media?.media?.id === obj.media.id && (obj.media.episodes === 1 || !obj.media.episodes || file.media?.episode === obj.episode))
|
||||
if (!targetFile) return false
|
||||
if (oldNowPlaying.media?.id !== obj.media.id) {
|
||||
// mediachange, filelist change
|
||||
|
|
|
|||
Loading…
Reference in a new issue