Skip to content

Commit

Permalink
fix playing TB cloud files due to link cacheing, close #328
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBeastLT committed Dec 25, 2024
1 parent 0401828 commit e3f1855
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/moch/torbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function getItemMeta(itemId, apiKey) {
id: `${KEY}:${itemId}:${file.id}`,
title: file.name,
released: new Date(createDate.getTime() - index).toISOString(),
streams: [{ url: `${apiKey}/null/${itemId}-${file.id}/null` }]
streams: [{ url: `${apiKey}/${itemId}-${file.id}/null/null` }]
}))
}
}
Expand All @@ -88,8 +88,8 @@ export async function resolve({ ip, apiKey, infoHash, cachedEntryInfo, fileIndex
}

async function _resolve(apiKey, infoHash, cachedEntryInfo, fileIndex, ip) {
if (infoHash === 'null') {
const [type, rootId, fileId] = cachedEntryInfo.split('-');
if (infoHash?.includes('-')) {
const [type, rootId, fileId] = infoHash.split('-');
return getDownloadLink(apiKey, type, rootId, fileId, ip);
}
const torrent = await _createOrFindTorrent(apiKey, infoHash);
Expand Down

0 comments on commit e3f1855

Please sign in to comment.