mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-22 18:33:56 +00:00
feat: adjustments
This commit is contained in:
@@ -330,7 +330,6 @@ export class DownloadManager {
|
||||
}
|
||||
case Downloader.TorBox: {
|
||||
const { name, url } = await TorBoxClient.getDownloadInfo(download.uri);
|
||||
console.log(url, name);
|
||||
|
||||
if (!url) return;
|
||||
return {
|
||||
|
||||
@@ -93,8 +93,11 @@ export class TorBoxClient {
|
||||
}
|
||||
|
||||
static async getDownloadInfo(uri: string) {
|
||||
const { id, name } = await this.getTorrentIdAndName(uri);
|
||||
const url = await this.requestLink(id);
|
||||
return { url, name: `${name}.zip` };
|
||||
const torrentData = await this.getTorrentIdAndName(uri);
|
||||
const url = await this.requestLink(torrentData.id);
|
||||
|
||||
const name = torrentData.name ? `${torrentData.name}.zip` : undefined;
|
||||
|
||||
return { url, name };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user