libtorrent icon indicating copy to clipboard operation
libtorrent copied to clipboard

Location of *.parts files

Open SpL1Ne opened this issue 3 years ago • 49 comments

https://github.com/qbittorrent/qBittorrent/issues/13205 As I can see in this comment there is no way to define folder for parts file. Also I searched and didn't find issue about this question. So, is there in plans to provide possibility to change location of *.parts file (instead near downloaded torrent files)?

libtorrent version (or branch): qBittorrent 4.4.5

platform/architecture: Windows 10x64 21H1

SpL1Ne avatar Nov 29 '22 01:11 SpL1Ne

What is it for? A cosmetic effect? Or functional?

master255 avatar Dec 03 '22 23:12 master255

Well, users literally has some hidden files inside download folder. I'm usually move it whole and capture batch of 100-1000mb file that don't need to. And regular user doesn't even know about them.

So yeah definitely functional. Keep regular files at one location and qbittorrent files at other and don't mix them like don't mix temp files and user's files in any other program.

SpL1Ne avatar Dec 04 '22 01:12 SpL1Ne

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 18 '23 19:03 stale[bot]

@SpL1Ne

Well, users literally has some hidden files inside download folder. I'm usually move it whole and capture batch of 100-1000mb file that don't need to. And regular user doesn't even know about them.

I don't understand what you're writing about. Can you explain it in more detail?

master255 avatar Mar 18 '23 20:03 master255

@master255

  1. Let's say you have like 5 torrents with same theme\subject. For example, pictures, because they have more parts to complete pieces, if you don't download whole torrent.
  2. Since all of them have same theme, you create folder to store them together. In my case fore example Pictures folder inside Download folder.
  3. You load torrent file into qbittorrent. Select let's say 1/5 of total files. Because you don't need whole torrent.
  4. Do that with other 4 torrents.
  5. Set for all of them location as Pictures folder inside Download
  6. Wait torrents to complete.
  7. Now, you have your Pictures folder with torrents what you want.
  8. You don't store your media inside Download folder, so you select Pictures folder ctrl-x and ctrl-v inside D:\Media.
  9. Seems like everything good, right?
  10. Wrong. 2023-03-19_00-50-45
  11. You downloaded 1 Gb from 5Gb torrent and also you have *.part files INSIDE Pictures folder that you will move after all torrents complete. If you don't know about them, you just move 5*1 Gb folders and PLUS ~100-200 Mb overhead for each folder. So inside your Media folder now 1Gb of useless files that you don't know about.

Note: qBittorrent v4.4.5, don't know if it's latest version or if devs do something with that situation.

SpL1Ne avatar Mar 18 '23 23:03 SpL1Ne

@SpL1Ne So what's the problem?

master255 avatar Mar 18 '23 23:03 master255

OMG, really? You don't see any problem, do you?

That I, as user, have useless overhead that take space and if I didnt know about it I'd have a lot of useless garbage files with files that I needed. I can copy files to USB flash drive to move them and I also would move garbage together and wouldn't know about it. Yeah, agree, no problems here. /sarcasm

SpL1Ne avatar Mar 18 '23 23:03 SpL1Ne

@SpL1Ne Ok. When I download torrents I don't have any extra files left on my disk, after the full download. Why do you have them left? If you don't need these files, why not delete them?

master255 avatar Mar 19 '23 10:03 master255

after the full download

Are you stupid or what? Quote from my message above:

Select let's say 1/5 of total files. Because you don't need whole torrent.

/facepalm

If you don't need these files, why not delete them?

BECAUSE THESE FILES ARE HIDDEN, holy. If you don't know about them, then you CAN'T delete them. This is ME, I know about them. And 99% percent of other users don't.

I won't answer to your messages any more since you definitely don't understand words and don't read what I write here.

SpL1Ne avatar Mar 19 '23 11:03 SpL1Ne

I also don't get the problem. When you delete a task from the client, corresponding .parts file is also deleted along with it automatically.

HanabishiRecca avatar Apr 13 '23 10:04 HanabishiRecca

I also don't get the problem. When you delete a task from the client, corresponding .parts file is also deleted along with it automatically.

Not always, sometimes they are not deleted.

soredake avatar Apr 13 '23 11:04 soredake

Not always, sometimes they are not deleted.

They should, I just tested that. If you can reproduce a case when they don't, then fill a bug report.

HanabishiRecca avatar Apr 13 '23 11:04 HanabishiRecca

@SpL1Ne, your problem is that you are manually transferring files instead of using the move feature in qbt. Then delete the task without deleting the files, the .parts file will be deleted automatically. You can also first delete the task in the client, only then transfer the files manually.

stalkerok avatar Apr 14 '23 11:04 stalkerok

@stalkerok

your problem is that you are manually transferring files instead of using the move feature in qbt.

My problem? LMAO. Didn't see any warnings that app will not tolerate external manipulation with files. I know, right? Where do you ever see a user manually moving downloaded files? Nonsense. This is app problem, that it conflicts with external manipulation, not mine.

SpL1Ne avatar Apr 15 '23 10:04 SpL1Ne

Didn't see any warnings that app will not tolerate external manipulation with files.

That's common sense. Same as nothing actually stops you from copying files while download is still in progress and get corrupted data. Client can't stop you from doing that.

I don't say extra features are bad though, more flexibility is better. But also there is a contradiction here:

99% percent of other users don't

Obviously, to use "change location of *.parts file" option you need to be aware about .parts files in the first place. But as you say 99% users don't, they simply will ignore the option anyway, because they don't know what it does. So in general situation will remain the same.

HanabishiRecca avatar Apr 15 '23 11:04 HanabishiRecca

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '23 18:08 stale[bot]

Not stale....

soredake avatar Aug 12 '23 18:08 soredake

can this become a thing? it's pretty annoying. I can't find anything at all in my download directory:

qbittorrent parts files

cheater avatar Feb 20 '24 13:02 cheater

I can't find anything at all in my download directory:

As a workaround, you can temporary disable Explorer "show hidden files" option.

Parts were made hidden with user not seeing them in mind. But many advanced users have hidden files enabled, so yeah.

HanabishiRecca avatar Feb 20 '24 13:02 HanabishiRecca

while this is a workaround, personally i don't really like it and honestly, guys, it's not so deep, this should be a thing...

cheater avatar Feb 20 '24 13:02 cheater

Wouldn't it make sense to store .parts files in TEMP folder?

glassez avatar Feb 22 '24 12:02 glassez

it will most likely be a different file system, and especially someone's OS file system: added wear means failure of OS SSD = people get angry; plus filling up the OS SSD when on many computers it's tiny (sometimes 128 or 256 GB) is bad.

cheater avatar Feb 22 '24 12:02 cheater

Wouldn't it make sense to store .parts files in TEMP folder?

And also because parts files are not temp files. You need them if you want to seed torrent, but you don't want to download all files from that torrent. That's because how bittorrent protocol works.

SpL1Ne avatar Feb 22 '24 12:02 SpL1Ne

Wouldn't it make sense to store .parts files in TEMP folder?

No, it tend to be cleaned up by users, Windows Disk Cleanup and other utilities. It is called temporary for a reason. Also will be lost on system switch/reinstall etc. Besides, putting the actual data on the system drive could be really undesirable behavior, as already mentioned above.

Pretty much the same applies for other operating systems.


Btw, placing part files inside the torrent subfolder is actually achievable, in a somewhat hacky way though. If you set content layout to Don't create subfolder and make it as the target download location manually.

HanabishiRecca avatar Feb 22 '24 13:02 HanabishiRecca

You need them if you want to seed torrent, but you don't want to download all files from that torrent. That's because how bittorrent protocol works.

I know how it works.

because parts files are not temp files.

Why not? I could think of them as needed temporarily while you want to seed the torrent. But something else is more important. It would be much easier and faster to implement such a method that uses some kind of predefined folder. Adding a configuration option may be associated with breaking API/ABI compatibility, so at best it will be added to the next major update (at that time, as the corresponding patch will be provided).

glassez avatar Feb 22 '24 13:02 glassez

It would be much easier and faster to implement such a method that uses some kind of predefined folder.

Yeah, it is currently hardcoded.

https://github.com/arvidn/libtorrent/blob/4ef221187f1690a126da533994afa7a5898bec57/src/mmap_storage.cpp#L114

I could only suggest to use a subdir of the same download dir. Something like

		, m_part_file_name(combine_path(".parts", "." + aux::to_hex(params.info_hash) + ".parts"))

So instead of <download_dir>/.<info_hash>.parts it will be <download_dir>/.parts/.<info_hash>.parts. Naming is arguable of course.

Why not? I could think of them as needed temporarily while you want to seed the torrent.

I personally seed indefinitely while having the files. And many others do that too. Because if you have the files, why not to seed them? So parts file is effectively a real part of the torrent data.

HanabishiRecca avatar Feb 22 '24 13:02 HanabishiRecca

So instead of <download_dir>/.<info_hash>.parts it will be <download_dir>/.parts/.<info_hash>.parts. Naming is arguable of course.

IMO, it's a good compromise.

glassez avatar Feb 22 '24 13:02 glassez

So instead of <download_dir>/.<info_hash>.parts it will be <download_dir>/.parts/.<info_hash>.parts. Naming is arguable of course.

yes, that is perfect, and an easy change, please don't wait and put it in :) no deliberation is needed.

one thing is necessary though: moving parts files for existing torrents to new location. idk how torrent clients handle that. having to delete and re-dl all the data in parts files is not an option, there must be a way to retain the data. it should all probably happen automatically the first time you start a torrent client with new libtorrent that supports a .parts subdir.

cheater avatar Feb 22 '24 13:02 cheater

IMO, it's a good compromise.

I would like to set one folder for all parts files and keep download folder clean and apart from "working" files so to say.

SpL1Ne avatar Feb 22 '24 14:02 SpL1Ne

it should all probably happen automatically the first time you start a torrent client with new libtorrent that supports a .parts subdir.

Pretty much impossble at this point. The location of files is handled by libtorrent. Changing the harcoded path simply changes where it places and looks for them. There is no code to handle such migration. That's why this is not so "easy change" as you say. Simply change the path - easy. Properly migrate all users - definitely not easy.

HanabishiRecca avatar Feb 22 '24 15:02 HanabishiRecca