Comments (11)
@johang thanks, this patch seems to work - note that once a file is accessed it attempts to download the whole thing. Is it possible to set it so it only downloads what is accessed, rather than the whole file?
diff --git a/src/btfs.cc b/src/btfs.cc
index 1f4a72d..4da1ebe 100644
--- a/src/btfs.cc
+++ b/src/btfs.cc
@@ -205,6 +205,7 @@ setup() {
handle.pause();
for (int i = 0; i < ti->num_files(); ++i) {
+ handle.file_priority(i, 0);
std::string parent("");
#if LIBTORRENT_VERSION_NUM < 10100
from btfs.
This is by design. Parts that are read by applications are prioritized, but if there is bandwidth available it will download the rest of the torrent.
Same problem. There is no point in this utility without the "download files as needed" feature. It's not about the available bandwidth. You can download the torrent using qbittorrent. The point is the available disk space. You need to be able to view a specific file. But qbittorrent can do that too. Therefore, it is very important to download "only some parts" of the file. For example, when previewing video or audio (when searching). It would be nice to use some amount of cache (configurable), which would not save data to disk. For example, provided that the file is viewed by no more than 10 percent. Or work without saving to disk at all.
btfs 2.24-1 / archlinux 5.15.3-arch1-1 / spectrwm
from btfs.
If anyone interested, I've patched btfs to handle the "no fetch" case, where pieces are downloaded only when really needed, no auto-downloading of anything except what's asked to be read through fuse, in a branch here https://github.com/rienafairefr/btfs/tree/no-fetch
from btfs.
Check out https://github.com/distribyted/distribyted too — solved my problem.
from btfs.
This is by design. Parts that are read by applications are prioritized, but if there is bandwidth available it will download the rest of the torrent.
from btfs.
is there any way to change this?
from btfs.
You can patch the function setup()
in btfs.cc
to set all files to priority 0.
from btfs.
here?
https://github.com/johang/btfs/blob/master/src/btfs.cc#L103
from btfs.
No, here: https://github.com/johang/btfs/blob/master/src/btfs.cc#L206
from btfs.
@johang how would you set all the files to priority 0? I'd like to patch this as well to prevent it downloading as soon as it's mounted.
from btfs.
Look in libtorrents docs (torrent_handle::file_priority(...)).
from btfs.
Related Issues (20)
- Encryption? HOT 3
- Add RAM-only mode HOT 2
- Streaming freezes when disk is full
- Apt does to refer to latest version HOT 1
- Link to -latomic everywhere or just on platforms that need it? HOT 3
- Division by 0
- Add documentation regarding disk space usage and caching
- Hangs system and gives error message HOT 2
- Build fails with libtorrent 2.0
- RAM consumption HOT 3
- Mount multiple torrents with a single btfs instance HOT 3
- ERROR Log HOT 1
- Always download same torrrent to same subdirectory HOT 1
- Extending it to be a NAS downloader HOT 2
- [Question] How does btplay actually work? HOT 4
- Trying to create a Dolphin Extension
- Minor setback
- btfs script HOT 2
- btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btfs.