Giter Club home page Giter Club logo

deluge's Issues

Add function to update trackers of a torrent by reannouncing

There should be a function that does the equivalent of Update Tracker. It force-reannounces to it's trackers that checks if new seeder/leechers are there or not.
This should be easy, and I can add the fix myself. Will send a PR, please accept.
image

TypeError: Cannot read property '0' of undefined at Deluge.addTorrent

(node:4347) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at Deluge.addTorrent (/home/yakubo/nyaa-dl/node_modules/@ctrl/deluge/src/index.ts:272:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:4347) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not ha)
(node:4347) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I get this error when trying to add a new torrent. I see the fault lies in this line:

    const res = await this.request<AddTorrentResponse>('web.add_torrents', [[{ path, options }]]);

    if (res.body.result[0][0] === false) {
      throw new Error('Failed to add torrent');
    }

It cannot find [0] of res.body.result[0] cuz it is already undefined. So, I checked the output of this response manually and I found res.body.result returns to be a boolean value for this request. The following is a response I found when manually making the request.

{"id": 3841, "result": null, "error": null}

So, I am fixing this in my PR for the issue #69 by replacing the above code with the following:

    const res = await this.request<AddTorrentResponse>('web.add_torrents', [[{ path, options }]]);

    if (res.body.result === false) {
      throw new Error('Failed to add torrent');
    }

Torrent progress is not Normalized

It seems that Deluge torrents give me their progress out of 100, but the other clients give their percentage it out of 1. Is that a bug ?
It's weird because when I hover on the NormalizedTorrent.progress in VsCode it shows me progress percent out of 100

I've been using this

 delugeTorrents.forEach((delugeTorrent) =>
    torrents.push({ ...delugeTorrent, progress: delugeTorrent.progress / 100 })
  );

In my code to "fix" that difference.

Could you tell me why I seem to have these differences ? (I'm integrating qbit/deluge/transmission integrations in my app)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Exception thrown when calling getTorrentStatus on a non-existent hash

const status = await deluge.getTorrentStatus(HASH_THAT_DOES_NOT_EXIST);

The above will hang for timeout ms and then throw:

Timeout awaiting 'request' for 1000ms

Is there anyway we can get this to return null instantly or throw instantly? Surely the deluge web API doesn't just hang when requesting a non-existent torrent? Lol I hope not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.