1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-10 10:04:21 +01:00

Set default save directory in load_config

This commit is contained in:
Rnhmjoj 2015-03-27 22:02:37 +01:00
parent 0066574994
commit 73f1221f36

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
#
# Copyright 2015, Viktor Stanchev and contributors
@ -285,7 +287,7 @@ def load_config():
config.add_section('Save')
config.set('Save', 'magnets', 'false')
config.set('Save', 'torrents', 'false')
config.set('Save', 'directory', expanduser('~/downloads/pirate-get'))
config.set('Save', 'directory', os.getcwd())
config.add_section('LocalDB')
config.set('LocalDB', 'enabled', 'false')
@ -502,8 +504,6 @@ def main():
if args.save_directory:
config.set('Save', 'directory', args.save_directory)
if not (args.save_directory or config.get('Save', 'directory')):
config.set('Save', 'directory', os.getcwd)
if args.transmission or config.getboolean('Misc', 'transmission'):
ret = subprocess.call(['transmission-remote', '-l'],