mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
override debrid meta type if series
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
const repository = require('../lib/repository')
|
const repository = require('../lib/repository')
|
||||||
|
const { Type } = require("../lib/types");
|
||||||
|
|
||||||
const METAHUB_URL = 'https://images.metahub.space'
|
const METAHUB_URL = 'https://images.metahub.space'
|
||||||
const BadTokenError = { code: 'BAD_TOKEN' }
|
const BadTokenError = { code: 'BAD_TOKEN' }
|
||||||
@@ -25,6 +26,7 @@ async function enrichMeta(itemMeta) {
|
|||||||
if (commonImdbId) {
|
if (commonImdbId) {
|
||||||
return {
|
return {
|
||||||
...itemMeta,
|
...itemMeta,
|
||||||
|
type: torrent.type === Type.SERIES ? torrent.type : itemMeta.type,
|
||||||
logo: `${METAHUB_URL}/logo/medium/${commonImdbId}/img`,
|
logo: `${METAHUB_URL}/logo/medium/${commonImdbId}/img`,
|
||||||
poster: `${METAHUB_URL}/poster/medium/${commonImdbId}/img`,
|
poster: `${METAHUB_URL}/poster/medium/${commonImdbId}/img`,
|
||||||
background: `${METAHUB_URL}/background/medium/${commonImdbId}/img`,
|
background: `${METAHUB_URL}/background/medium/${commonImdbId}/img`,
|
||||||
|
|||||||
Reference in New Issue
Block a user