rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
554 stars 24 forks source link

Remove individual files #149

Closed lenormf closed 4 years ago

lenormf commented 4 years ago

Hi,

I'd be nice to be able to remove files within torrents, with something like f d. Sometimes files are partially downloaded even when set to off, it would avoid having to run a shell to execute rm manually.

HTH.

rndusr commented 4 years ago

Have you tried deleting partially downloaded files?

I would have expected Transmission to either stop the torrent because the data in storage does not match what was previously downloaded, or to simply redownload the missing data and recreating the partial file.

If you delete partial files after you downloaded all the files you want, you have less pieces than you want. You have to mark the files that share pieces with the partial files as "off" so Transmission knows you don't want to seed all their pieces.

lenormf commented 4 years ago

I have. Sometimes the torrent is stopped, sometimes not. The partial file is not always re-downloaded, I think if the other file it depends on reaches 100%, then it doesn't matter.

As you said in #146, this could be left at the user's discretion if an exec type command is to be made available.

But since it's possible to remove all the files associated with a torrent (tD), I thought it was a consistent thing to have built-in, despite the caveat of Transmission potentially stopping the torrent.

rndusr commented 4 years ago

I agree that this would be nice to have in conjunction with the ability to delete all files.

But deleting single files puts the torrent in an undefined state. Users who know that torrents contain a data stream and not a file system will expect that, but non-experts will be surprised and (rightfully) report weird behaviour as a bug.

I don't even know what the exact intention of the command would be. Do I want to stop seeding adjacent files that share pieces with the deleted file? Should Transmission re-download the deleted file unless I marked it as "off"? Should the torrent be stopped or removed because I intentionally broke it's state?

I'm sorry, but I think this is a bad idea.

lenormf commented 4 years ago

My usecase is to be able to download a torrent one-file at a time, when I don't have enough disk-space to download it entirely.

At the moment I have to spawn a shell to remove (fully downloaded) files, before selectively allowing more to be downloaded.

I'm aware that some .part files will be downloaded any way, but that's a detail and Transmission seems to handle their wild removal anyway.

I'm fine with closing this, if there's going to be an exec command in the future, I'll just declare a mapping in my configuration.

rndusr commented 4 years ago

OK, I'll close this then.

Regardless, thanks for the proposal.

097115 commented 2 years ago

@rndusr

There weren't any changes regarding selective downloads, still not possible?

rndusr commented 2 years ago

I'm not sure I understand your question.

Disabling the download of individual files is possible.

Deleting individual files is not supported and I don't think it's a good idea.

097115 commented 2 years ago

Sorry for not being clear and probably missing something very obvious :)

How can I selectively download? I probably enter tab filelist and then? How can I un-mark some files from a torrent?

rndusr commented 2 years ago

You can disable the download of a file with f 0 in the file list. If you want to disable multiple files, you can mark them first with space.

You can get a list of all keybindings with F1 k or run stig help keybindings.

F1 is listed in the top bar and stig help keybindings is documented in stig -h. I don't know how to make it more obvious, but you're not the first one to ask about keybindings and documented other stuff, so there's probably room for improvement somewhere.

097115 commented 2 years ago

I actually read a few times F1 k -- and still somehow missed how to change the priority :( Though it is indeed there, at the very top... Thanks a lot! :)