Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds TorBox Support #946

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Adds TorBox Support #946

wants to merge 8 commits into from

Conversation

Wamy-Dev
Copy link

Allows downloading using TorBox.

  • Accepts and saves TorBox API key as authorization.
  • Adds magnets to TorBox account.
  • Lists TorBox files.
  • Downloads files directly from TorBox (as a zip). This is something that might need a little work. The zips that comes from TorBox are streamed, meaning there is no known completed size. This results in an always 0% progress.

Lemme know if any work needs done. If you want to test, you can sign up with a free account on TorBox.app, or contact me @WAMY on Discord for Pro keys (developers on this pull only).

#935

Copy link
Author

@Wamy-Dev Wamy-Dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a general change. Virtual environments should be ignored.

Copy link
Author

@Wamy-Dev Wamy-Dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review these comments

@@ -8,6 +8,11 @@ module.exports = {
"@electron-toolkit/eslint-config-ts/recommended",
"plugin:prettier/recommended",
],
settings: {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting build errors if this wasn't done. If it works without it, don't hesitate to remove it.

@@ -21,7 +21,7 @@
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"dev": "electron-vite dev --noSandbox",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devtools doesn't work with electron-vite on some systems (including mine) without being on the host (rather than a sandbox).

@@ -107,7 +107,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"typescript": "^5.6.2",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto update, feel free to roll back.

import { HttpDownload } from "./http-download";
import { GenericHttpDownloader } from "./generic-http-downloader";
import { gameRepository } from "@main/repository";
// import { calculateETA } from "./helpers";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for calculating ETA. Left it here in case in the future TorBox gives a definite file size for zips.

numPeers: 0,
numSeeds: 0,
downloadSpeed: status.downloadSpeed,
timeRemaining: -1,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time remaining is -1 always. No way to know for sure.

const status = download.getStatus();

if (status) {
let progress =
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress is 0 since we can't know the completed file size.

@zamitto
Copy link
Collaborator

zamitto commented Sep 12, 2024

Can't promise we will be able to review and test your PR properly until the next release (this saturday) as we are rushing with it

@Wamy-Dev
Copy link
Author

any update @zamitto ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants