add bingeGroup for debrid meta streams

This commit is contained in:
TheBeastLT
2023-12-16 14:59:17 +02:00
parent cf3eb270a3
commit 2c4da0679f

View File

@@ -143,10 +143,12 @@ export async function getMochItemMeta(mochKey, itemId, config) {
return moch.instance.getItemMeta(itemId, config[moch.key], config.ip) return moch.instance.getItemMeta(itemId, config[moch.key], config.ip)
.then(meta => enrichMeta(meta)) .then(meta => enrichMeta(meta))
.then(meta => { .then(meta => {
meta.videos meta.videos.forEach(video => video.streams.forEach(stream => {
.map(video => video.streams if (!stream.url.startsWith('http')) {
.filter(stream => !stream.url.startsWith('http')) stream.url = `${config.host}/${moch.key}/${stream.url}/${streamFilename(video)}`
.forEach(stream => stream.url = `${config.host}/${moch.key}/${stream.url}/${streamFilename(video)}`)) }
stream.behaviorHints = { bingeGroup: itemId }
}))
return meta; return meta;
}); });
} }