[addon] use single stream property for debrid catalogs

This commit is contained in:
TheBeastLT
2021-02-06 10:07:41 +01:00
parent cbfac1d96b
commit f49786d9c2
4 changed files with 8 additions and 13 deletions

View File

@@ -62,10 +62,8 @@ async function getItemMeta(itemId, apiKey) {
.map((file, index) => ({
id: `${KEY}:${torrent.id}:${index}`,
title: file.filename,
released: new Date(torrent.uploadDate * 1000 + index).toISOString(),
streams: [
{ url: `${apiKey}/${torrent.hash.toLowerCase()}/${encodeURIComponent(file.filename)}/${index}` }
]
released: new Date(torrent.uploadDate * 1000 - index).toISOString(),
stream: { url: `${apiKey}/${torrent.hash.toLowerCase()}/${encodeURIComponent(file.filename)}/${index}` }
}))
}))
}