majestrate / XD

meme bittorrent client
https://xd-torrent.github.io/
MIT License
238 stars 25 forks source link

XD is redownloading files that were previously seeding (maybe just a misconfiguration?) #98

Open Elcoid opened 2 years ago

Elcoid commented 2 years ago

info

git revision / version: v0.4.2-10-g9c5fe43

OS: OpenBSD 6.9

Architecture: amd64

problem

Hello,

I compiled XD in my home directory and successfully downloaded a few GBs of Linux ISOs over the last few months. Today I decided to install it in /usr/local/bin and copy the config file in /etc/xd, while leaving the storage folder in my home. However, when I start XD, the web interface shows that the torrents are at ~0% and are downloading, instead of being at 100% and seeding.

Before, my config was at /home/user/XD/torrents.ini and contained this:

[storage]
rootdir=storage
metadata=storage/metadata
downloads=storage/downloads
completed=storage/seeding

[bittorrent]
tracker-config=trackers.ini

I moved the storage folder directly in my home and renamed it torrents, yielding the following structure:

~
  + torrents
    + metadata
      + ...
    + downloads
    + seeding
      + ...

I moved the config files torrents.ini and trackers.ini in /etc/xd/ and changed the relevant sections in torrents.ini to this:

[storage]
rootdir=/home/user/torrents
metadata=/home/user/torrents/metadata
downloads=/home/user/torrents/downloads
completed=/home/user/torrents/seeding

[bittorrent]
tracker-config=/etc/xd/trackers.ini

Then I call XD like so:

XD /etc/xd/torrents.ini

The first time I ran XD after the switch, I saw a lot of messages with "pieces mismatch". I'm assuming it means it detected that the downloaded files didn't match their hash anymore, or something similar? But they're still the same files as before. Is there something I did wrong? Thank you

majestrate commented 2 years ago

may be related to the change to an absolute path

Elcoid commented 2 years ago

I did a test to make sure the files were not corrupted. I stopped XD, copied a big file from a backup I had (which represents about 99% of the size of one of the torrents), and restarted XD. The progression didn't change and the torrent continues downloading as if nothing had happened. Should XD have detected that the file changed and adjusted the progression?

majestrate commented 2 years ago

On Fri, 20 May 2022 20:37:53 -0700 Elcoid @.***> wrote:

I did a test to make sure the files were not corrupted. I stopped XD, copied a big file from a backup I had (which represents about 99% of the size of one of the torrents), and restarted XD. The progression didn't change and the torrent continues downloading as if nothing had happened. Should XD have detected that the file changed and adjusted the progression?

yea it should have but did seems to have not.

majestrate commented 2 years ago

On Sat, 21 May 2022 06:33:19 -0700 majestrate @.***> wrote:

On Fri, 20 May 2022 20:37:53 -0700 Elcoid @.***> wrote:

I did a test to make sure the files were not corrupted. I stopped XD, copied a big file from a backup I had (which represents about 99% of the size of one of the torrents), and restarted XD. The progression didn't change and the torrent continues downloading as if nothing had happened. Should XD have detected that the file changed and adjusted the progression?

yea it should have but did seems to have not.

and yes, i have seen this behavior in the past.