vikstrous / pirate-get

A command line interface for The Pirate Bay
GNU Affero General Public License v3.0
338 stars 53 forks source link

Support for transmission host if deamon is not local #127

Closed bignellrp closed 4 years ago

bignellrp commented 5 years ago

transmission-remote supports adding host but this does not seem to be an option on pirate-get

e.g.

transmission-remote 192.168.0.5 -p 9091 -n username:password -a file.torrent

Could it be an option in the .config/pirate-get

transmission = true ; set to the ip of the transmission host if not local transmission-host = 192.168.0.5 ; set to username:password if needed transmission-auth = username:password ; set to the port number if needed transmission-port = 9091

e.g.

config.set('Misc', 'transmission-host', '')

parser.add_argument('-H', '--host', dest='host', help='transmission-remote rpc host. default is localhost')

if args.port: args.transmission_command.append(args.host) elif config.get('Misc', 'transmission-host'): args.transmission_command.append(config.get('Misc', 'transmission-host'))

bignellrp commented 5 years ago

Update:

I just tried this on my local version by manually editing pirate.py with the config above but this only works with the port commented as i think it needs a colon between the host and the port. My python knowledge is limited so I'm not sure how to do this as an if.

e.g if host and port is specified then add host : port, else add host or port without the colon.

rnhmjoj commented 5 years ago

It shouldn't be too difficult to add. Actually I'd change the port argument to be address:port instead. I'm now working on other things but I could give it a try in a couple of days.