Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make two files into one bittorrent seed #28

Open
wnark opened this issue Dec 13, 2021 · 6 comments
Open

How to make two files into one bittorrent seed #28

wnark opened this issue Dec 13, 2021 · 6 comments

Comments

@wnark
Copy link

wnark commented Dec 13, 2021

For example like this

root@ubuntu:/home/ubuntu# torrenttools create "/var/filebrowser/srv/VMware-workstation-full-16.2.1-18811642.exe /var/filebrowser/srv/VMware-workstation-full-16.2.1-18811642.exe.md5" -a "https://tracker.tamersunion.org/announce" "udp://opentor.org:2710/announce" -d "router.utorrent.com:6881" "router.bittorrent.com:6881" "dht.transmissionbt.com:6881" "router.bitcomet.com:6881" "dht.aelitis.com:6881" -o "VMware-workstation-full-16.2.1-18811642.exe.torrent"
Error: Path does not exist: /var/filebrowser/srv/VMware-workstation-full-16.2.1-18811642.exe /var/filebrowser/srv/VMware-workstation-full-16.2.1-18811642.exe.md5

I want to package and distribute the file with its md5 file, but it looks like it cannot be created at this stage

@wnark
Copy link
Author

wnark commented Dec 13, 2021

Because I store files in a directory structure similar to a mirror station, it is not convenient to package them into folders.

@wnark
Copy link
Author

wnark commented Dec 14, 2021

image
Does the --include parameter here provide this function, but your demo here seems to be wrong

@wnark
Copy link
Author

wnark commented Dec 14, 2021

torrenttools create /var/filebrowser/srv --include "/var/filebrowser/srv/corona_3.09A.zst.md5" -a "https://tracker.tamersunion.org/announce" "udp://opentor.org:2710/announce" -w http://192.168.149.133:7000/ -d "router.utorrent.com:6881" "router.bittorrent.com:6881" "dht.transmissionbt.com:6881" "router.bitcomet.com:6881" "dht.aelitis.com:6881" -o "/var/filebrowser/srv/corona_3.09A.zst.torrent"

Understood, "--include" matches the path, not the file name, so you need to use the complete directory structure under the "create" directory

@wnark
Copy link
Author

wnark commented Dec 14, 2021

torrenttools create /var/filebrowser/srv --include "/var/filebrowser/srv/corona_3.09A.zst$" "/var/filebrowser/srv/corona_3.09A.zst.md5$" -a "https://tracker.tamersunion.org/announce" "udp://opentor.org:2710/announce" -w http://192.168.149.133:7000/ -d "router.utorrent.com:6881" "router.bittorrent.com:6881" "dht.transmissionbt.com:6881" "router.bitcomet.com:6881" "dht.aelitis.com:6881" -o "/var/filebrowser/srv/corona_3.09A.zst.torrent"

If you need to match a file exactly, you need to use an absolute path+$ to match

@wnark
Copy link
Author

wnark commented Dec 14, 2021

Your matching here is to traverse the directory, record the paths of all files, and then perform regular matching?

@fbdtemme
Copy link
Owner

Your matching here is to traverse the directory, record the paths of all files, and then perform regular matching?

Correct. Current matching is agains the absolute path of the file which is somewhat unintuitive.

This should be changed to match the path of the files relative to the main root directory passed to torrenttools create.
So then you could simply pass:

torrenttools create /var/filebrowser/srv --include "corona_3.09A.zst$" "corona_3.09A.zst.md5$"

Thanks for reporting, I will fix this in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants