rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
554 stars 24 forks source link

Adding torrent files en masse? #230

Closed The-Sound closed 1 year ago

The-Sound commented 1 year ago

Hi there, I was trying to add a whole folder of torrents and it keeps saying either add: Is a directory: /absolute/path/to/directory/ or add: Torrent file is corrupt or doesn't exist: '/absolute/path/to/directory/*' I've tried playing around with wildcards just in case but the output was the same as you can see.

The command I'm using is: :add /absolute/path/to/directory from the TUI. Autocomplete finds every folder until the ending folder. The path and the folders are all local, no remote storage. I could go one by one but I would really really like to not do that. I've tested and the few I've added went perfectly.

I don't know if I'm skipping over something, if I did, please, let me now.

PS: Sorry for opening another issue, I didn't know a better way to reach you.

rndusr commented 1 year ago

I don't think the TUI version of the "add" command has globbing support, so you simply can't do that in the TUI.

But you can use your shell's globbing with the CLI version:

$ stig add path/to/torrents/*.torrent

PS: Sorry for opening another issue, I didn't know a better way to reach you.

That's ok. There is no other way to reach me.

The-Sound commented 1 year ago

I see, thanks.

My only issue is that then I would have to pass user and password through terminal among other options afaik, and that is another whole bag because of how terminal behaves with special characters. Not that it would be a stig issue, of course, but one of the many TUI benefits for me is precisely the option to not do that.

Is there any other solution if I want to use shell globbing?

rndusr commented 1 year ago

I don't understand. The CLI uses the same login credentials as the TUI. You pass them exactly like you pass them when you start the TUI. Or you just store them in the config file and forget about them altogether.

Besides, you can escape all special characters unless you use a really weird and exotic shell.

The-Sound commented 1 year ago

Oh my god I'm so sorry, I never thought about using -c (I set up an alias) and use the commands. You're completely right, I apologize, thank you for your prompt answer

rndusr commented 1 year ago

No biggie.

You learned something, I got to help out, everybody wins! :)