Git Product home page Git Product logo

Comments (6)

idlesign avatar idlesign commented on July 22, 2024

Please advise on how I can modify the files in the torrent and create a new torrent file with the modified files.

From a perspective of a torrent what you're trying to do is not a modification by nature, but the creation of a new file. That's so because files is the most essential part of a torrent file, and modification of this entry requires data reprocessing. For example, if you do not have all files of the torrent downloaded, you cannot comprise torrent file "equal" to the initial. Those would be two different files with different hashes and will be announced by a tracker as such.

The right and more obvious way to do what you want, is to create a new file from the directory, copying some metadata from the initial file properties.

from torrentool.

jarkahome avatar jarkahome commented on July 22, 2024

Thank you for your response. However, what I want to do is modify a downloaded torrent file, specifically unchecking some of the files like in a BitTorrent client. I understand that modifying the files in a torrent file may not be feasible, but is there a way to achieve this using the torrentool library without creating a new file based on a directory

from torrentool.

idlesign avatar idlesign commented on July 22, 2024

However, what I want to do is modify a downloaded torrent file, specifically unchecking some of the files like in a BitTorrent client.

In a client you do not modify a torrent, instead you just instruct it not to download some file stated in the torrent.
I should emphasize that there's no notion of editing the file, since what you're really doing is creating a new file.

from torrentool.

idlesign avatar idlesign commented on July 22, 2024

Considered closed.
Feel free to reopen if required.

from torrentool.

chen88358323 avatar chen88358323 commented on July 22, 2024

I have a question, if a.torrent has 2 files in my_torrent.files (afile,bfile),I downloaded afile, bfile I need download again.
so i need edit my_torrent.files and to_file a new torrent ,how can I do? In fact , a.torrent has 2000file, I had downloaded a part like 100,I want 2 edit torrent , just redownload the rest of all

from torrentool.

idlesign avatar idlesign commented on July 22, 2024

@chen88358323

so i need edit my_torrent.files and to_file a new torrent ,how can I do? In fact , a.torrent has 2000file, I had downloaded a part like 100,I want 2 edit torrent , just redownload the rest of all

I'm afraid there is some misundertanding on how you treat the torrent file.

To download files you do not need torrentool, but you do need a torrent client. Also you do not need to edit the torrent to download the rest of files (in fact making a new torrent file will prevent you to download those files, since nobody except you has such an exact torrent).

Instead you need to instruct your torrent client to download the rest of files.

from torrentool.

Related Issues (20)

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.