jslay88 / qbt_migrate

Migrate qBittorrent downloads
MIT License
162 stars 10 forks source link

Work even when fastresume doesn't have all the contents you expect #12

Closed wambiditu closed 2 years ago

wambiditu commented 3 years ago

Some of my fastresume files are missing at least one path. I think the best action is to change what I know to change, if it exists, and leave everything else alone. This works OK if both paths are present, or both are missing. But in the case where only one is present, currently the other one isn't getting corrected.

I think I fixed this on my copy by commenting out the if and raise at lines 109-110 of classes.py

        #if 'save_path' not in self._data or 'qBt-savePath' not in self._data:
        #    raise ValueError('Missing required keys for a qBittorrent .fastresume file')

and by adding an if statement at line 139:

        if not path:
            return
jslay88 commented 3 years ago

Please fork and open a PR. Thanks.

jslay88 commented 2 years ago

18 resolves