fix: allow OVA's for sequel tree marching

This commit is contained in:
ThaUnknown 2022-08-01 13:08:46 +02:00
parent 3542b09602
commit c145127332
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "2.11.1",
"version": "2.11.2",
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"main": "src/index.js",
"homepage": "https://github.com/ThaUnknown/miru#readme",

View file

@ -225,14 +225,14 @@ export async function resolveFileMedia (fileName) {
}
export function findEdge (media, type, formats = ['TV', 'TV_SHORT'], skip) {
const res = media.relations.edges.find(edge => {
let res = media.relations.edges.find(edge => {
if (edge.relationType === type) {
return formats.includes(edge.node.format)
}
return false
})
// this is hit-miss
// if (!res && !skip) res = findEdge(media, type, formats = ['TV', 'TV_SHORT', 'MOVIE'], true)
if (!res && !skip && type === 'SEQUEL') res = findEdge(media, type, formats = ['TV', 'TV_SHORT', 'OVA'], true)
return res
}