From 7b38ba179d8cf4795c8f1a04c80d07609443e7b0 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Tue, 15 Mar 2022 14:53:14 +0100 Subject: [PATCH] order moch catalog ascending --- addon/moch/alldebrid.js | 2 +- addon/moch/debridlink.js | 2 +- addon/moch/premiumize.js | 2 +- addon/moch/realdebrid.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addon/moch/alldebrid.js b/addon/moch/alldebrid.js index a1b1605..fe96172 100644 --- a/addon/moch/alldebrid.js +++ b/addon/moch/alldebrid.js @@ -66,7 +66,7 @@ async function getItemMeta(itemId, apiKey) { .map((file, index) => ({ id: `${KEY}:${torrent.id}:${index}`, title: file.filename, - released: new Date(torrent.uploadDate * 1000 - index).toISOString(), + released: new Date(torrent.uploadDate * 1000 + index).toISOString(), streams: [{ url: `${apiKey}/${torrent.hash.toLowerCase()}/${encodeURIComponent(file.filename)}/${index}` }] })) })) diff --git a/addon/moch/debridlink.js b/addon/moch/debridlink.js index 5e8c5cf..407ec5a 100644 --- a/addon/moch/debridlink.js +++ b/addon/moch/debridlink.js @@ -65,7 +65,7 @@ async function getItemMeta(itemId, apiKey, ip) { .map((file, index) => ({ id: `${KEY}:${torrent.id}:${index}`, title: file.name, - released: new Date(torrent.created * 1000 - index).toISOString(), + released: new Date(torrent.created * 1000 + index).toISOString(), streams: [{ url: file.downloadUrl }] })) })) diff --git a/addon/moch/premiumize.js b/addon/moch/premiumize.js index 0b6e2f5..9f5d0e8 100644 --- a/addon/moch/premiumize.js +++ b/addon/moch/premiumize.js @@ -70,7 +70,7 @@ async function getItemMeta(itemId, apiKey, ip) { .map((file, index) => ({ id: `${KEY}:${file.id}:${index}`, title: file.name, - released: new Date(file.created_at * 1000 - index).toISOString(), + released: new Date(file.created_at * 1000 + index).toISOString(), streams: [{ url: file.link || file.stream_link }] })) })) diff --git a/addon/moch/realdebrid.js b/addon/moch/realdebrid.js index d8b51c6..2696585 100644 --- a/addon/moch/realdebrid.js +++ b/addon/moch/realdebrid.js @@ -136,7 +136,7 @@ async function getItemMeta(itemId, apiKey, ip) { .map((file, index) => ({ id: `${KEY}:${torrent.id}:${file.id}`, title: file.path, - released: new Date(new Date(torrent.added).getTime() - index).toISOString(), + released: new Date(new Date(torrent.added).getTime() + index).toISOString(), streams: [{ url: `${apiKey}/${torrent.hash.toLowerCase()}/null/${file.id - 1}` }] })) }))