override debrid meta type if series

This commit is contained in:
TheBeastLT
2023-04-25 17:15:40 +02:00
parent 6889975485
commit ba57412728

View File

@@ -1,4 +1,5 @@
const repository = require('../lib/repository')
const { Type } = require("../lib/types");
const METAHUB_URL = 'https://images.metahub.space'
const BadTokenError = { code: 'BAD_TOKEN' }
@@ -25,6 +26,7 @@ async function enrichMeta(itemMeta) {
if (commonImdbId) {
return {
...itemMeta,
type: torrent.type === Type.SERIES ? torrent.type : itemMeta.type,
logo: `${METAHUB_URL}/logo/medium/${commonImdbId}/img`,
poster: `${METAHUB_URL}/poster/medium/${commonImdbId}/img`,
background: `${METAHUB_URL}/background/medium/${commonImdbId}/img`,