mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-05 07:49:43 +00:00
fix: pull correct extensions
This commit is contained in:
parent
b8683300b4
commit
8b372a3d3e
1 changed files with 4 additions and 5 deletions
|
|
@ -4,6 +4,7 @@ import anitomyscript, { type AnitomyResult } from 'anitomyscript'
|
|||
import { dedupeAiring, episodeByAirDate, episodes, isMovie, type Media, type MediaEdge } from '../anilist'
|
||||
import { settings, type videoResolutions } from '../settings'
|
||||
import native from '../native'
|
||||
import { episodes as _episodes } from '../anizip'
|
||||
|
||||
import { storage } from './storage'
|
||||
|
||||
|
|
@ -155,15 +156,13 @@ export const extensions = new class Extensions {
|
|||
}
|
||||
|
||||
async ALToAniDB (media: Media) {
|
||||
const mappingsResponse = await fetch('https://api.ani.zip/v1/episodes?anilist_id=' + media.id)
|
||||
const json = await mappingsResponse.json() as EpisodesResponse
|
||||
if (json.mappings?.anidb_id) return json
|
||||
const json = await _episodes(media.id)
|
||||
if (json?.mappings?.anidb_id) return json
|
||||
|
||||
const parentID = this.getParentForSpecial(media)
|
||||
if (!parentID) return
|
||||
|
||||
const parentResponse = await fetch('https://api.ani.zip/v1/episodes?anilist_id=' + parentID)
|
||||
return await parentResponse.json() as EpisodesResponse
|
||||
return await _episodes(parentID)
|
||||
}
|
||||
|
||||
getParentForSpecial (media: Media) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue