JurgenR / aioslsk

SoulSeek client library using Python asyncio
GNU General Public License v3.0
17 stars 0 forks source link

Transfer: reset local_path for transfers where the file is no longer shared #207

Open JurgenR opened 5 months ago

JurgenR commented 5 months ago

When an item is no longer shared but was previously requested the local_path of a transfer might still be set. This might cause the file still to be uploaded despite no longer wanting to share it.

If the shared item is removed from the shares:

JurgenR commented 5 months ago

I feel like the logic for state transitions could still be simplified, it seems like such odd situations keep occurring

JurgenR commented 5 months ago

As part of this issue, also check what happens if the file has become locked for that user

JurgenR commented 5 months ago

What might resolve issues is to simply check if the file is accessible when a PeerTransferQueue or PeerTransferRequest comes in and only set the local_path when the download or upload starts.