mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-03 07:03:39 +00:00
fix torrentfiles
This commit is contained in:
parent
f46ce64914
commit
e7e4651482
@ -45,7 +45,6 @@ import deluge.common
|
||||
import deluge.core
|
||||
import deluge._dbus as dbus
|
||||
import deluge.interface
|
||||
import deluge.pref
|
||||
|
||||
parser = OptionParser(usage="%prog [options] [torrents to add]",
|
||||
version=deluge.common.PROGRAM_VERSION)
|
||||
|
@ -193,14 +193,16 @@ class persistent_state:
|
||||
class Manager:
|
||||
# blank_slate mode ignores the two pickle files and DHT state file, i.e. you start
|
||||
# completely fresh. When quitting, the old files will be overwritten
|
||||
def __init__(self, client_ID, version, user_agent, base_dir, blank_slate=False):
|
||||
def __init__(self, client_ID, version, user_agent, base_dir, blank_slate=False, base_change=False):
|
||||
self.base_dir = base_dir
|
||||
# Keeps track of DHT running state
|
||||
self.dht_running = False
|
||||
|
||||
# Load the preferences
|
||||
self.config = pref.Preferences(os.path.join(self.base_dir, PREFS_FILENAME))
|
||||
|
||||
if base_change:
|
||||
self.config.set("default_torrent_path", os.path.join(self.base_dir, "torrentfiles"))
|
||||
self.config.save()
|
||||
TORRENTS_SUBDIR = self.config.get("default_torrent_path")
|
||||
|
||||
# Ensure directories exist
|
||||
|
@ -49,11 +49,13 @@ class DelugeGTK:
|
||||
def __init__(self, config_dir=None):
|
||||
if config_dir:
|
||||
common.CONFIG_DIR = config_dir
|
||||
base_change = True
|
||||
self.ipc_manager = ipc_manager.Manager(self)
|
||||
#Start the Deluge Manager:
|
||||
self.manager = core.Manager(common.CLIENT_CODE, common.CLIENT_VERSION,
|
||||
'%s %s' % (common.PROGRAM_NAME, common.PROGRAM_VERSION),
|
||||
common.CONFIG_DIR)
|
||||
common.CONFIG_DIR, base_change=base_change)
|
||||
|
||||
self.plugins = plugins.PluginManager(self.manager, self)
|
||||
self.plugins.add_plugin_dir(common.PLUGIN_DIR)
|
||||
if os.path.isdir(os.path.join(common.CONFIG_DIR , 'plugins')):
|
||||
|
Loading…
x
Reference in New Issue
Block a user