-
-
Notifications
You must be signed in to change notification settings - Fork 21
Description
So firstly, I'm not sure what is wrong with the fastresume file, but apparently, this is happening frequently (Seedbox company with thousands of instances).
What happens is that the tool runs fine most times, but for certain qbittorrent installs, it hiccups on a particular fastresume file, and then stops processing all other files and just stops the export claiming we're incorrectly using the tool 😃
I'll paste here a sample output:
root@server:/# qbt --config "${USERHOME}/.config/qbt/.qbt.toml" torrent export --source "${USERHOME}/.local/share/qBittorrent/BT_backup/" --export-dir /tmp/test/
Preparing to export torrents using source-dir: "XXXXXXXXXXXX/.local/share/qBittorrent/BT_backup/" export-dir: "/tmp/test/"
Found (38) matching torrents
[1/38] exported: 12aded4dfd652a75e3edXXXXXXXXXXXfastresume XXXXX
[1/38] exported: 12aded4dfd652a75e3edXXXXXXXXXXX.torrent XXXXX
[2/38] exported: 139212739b23189642a27f0XXXXXX.fastresume XXXXX
[2/38] exported: 139212739b23189642a27f0XXXXXX.torrent XXXXXX
error reading files: "could not open file: XXXXXXX/.local/share/qBittorrent/BT_backup/1539a1c5f1e089aa8XXXXX.fastresume: Cannot store string into []string"
Error: could not process torrents: could not open file: XXXXXXXXX/.local/share/qBittorrent/BT_backup/1539a1c5f1e089aa8XXXXXX.fastresume: Cannot store string into []string
Usage:
qbt torrent export [flags]
Examples:
qbt torrent export --source ~/.local/share/data/qBittorrent/BT_backup --export-dir ~/qbt-backup --include-category=movies,tv
Flags:
-a, --archive archive export dir to .tar.gz
--dry-run dry run
--exclude-category strings Exclude categories. Comma separated
--exclude-tag strings Exclude tags. Comma separated
--export-dir string Dir to export files to (required)
-h, --help help for export
--include-category strings Export torrents from these categories. Comma separated
--include-tag strings Include tags. Comma separated
--skip-manifest Do not export all used tags and categories into manifest
--source string Dir with torrent and fast-resume files (required)
-v, --verbose verbose output
Global Flags:
--config string config file (default is $HOME/.config/qbt/.qbt.toml)
-q, --quiet suppress output
As you can see in the redacted sample above. It found 38 torrents, it successfully processed 2 of them, then failed on the third.
Ideally, it should gracefully handle this error, perhaps throw an error about the file, then proceed to process the remaining 35 torrents.
Also, what the error means or if this fastresume is really problematic, I have no idea. Might it be a fileformat descrepancy with qbittorrent? I use 5.0.4.