Fix adding torrents with a unicode save_path.
This commit is contained in:
parent
94fd3c0f37
commit
8f6029219d
|
@ -113,7 +113,7 @@ class Config:
|
|||
"""Set the 'key' with 'value'."""
|
||||
# Sets the "key" with "value" in the config dict
|
||||
if self.config[key] != value:
|
||||
log.debug("Setting '%s' to %s", key, value)
|
||||
log.debug("Setting '%s' to %s of type %s", key, type(value), value)
|
||||
self.config[key] = value
|
||||
# Run the set_function for this key if any
|
||||
try:
|
||||
|
@ -128,7 +128,7 @@ class Config:
|
|||
# invalid
|
||||
try:
|
||||
value = self.config[key]
|
||||
log.debug("Getting '%s' as %s", key, value)
|
||||
log.debug("Getting '%s' as %s of type %s", key, value, type(value))
|
||||
return value
|
||||
except KeyError:
|
||||
log.warning("Key does not exist, returning None")
|
||||
|
|
|
@ -173,7 +173,7 @@ class TorrentManager:
|
|||
try:
|
||||
handle = self.session.add_torrent(
|
||||
lt.torrent_info(torrent_filedump),
|
||||
save_path,
|
||||
str(save_path),
|
||||
resume_data=fastresume,
|
||||
compact_mode=compact,
|
||||
paused=paused)
|
||||
|
|
|
@ -32,13 +32,22 @@
|
|||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import deluge.pluginmanagerbase
|
||||
import deluge.ui.functions as functions
|
||||
from deluge.configmanager import ConfigManager
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class PluginManager(deluge.pluginmanagerbase.PluginManagerBase):
|
||||
def __init__(self, gtkui):
|
||||
|
||||
self.config = ConfigManager("gtkui.conf")
|
||||
self._gtkui = gtkui
|
||||
|
||||
# Update the enabled_plugins from the core
|
||||
enabled_plugins = functions.get_enabled_plugins()
|
||||
enabled_plugins += self.config["enabled_plugins"]
|
||||
enabled_plugins = list(set(enabled_plugins))
|
||||
self.config["enabled_plugins"] = enabled_plugins
|
||||
|
||||
deluge.pluginmanagerbase.PluginManagerBase.__init__(
|
||||
self, "gtkui.conf", "deluge.plugin.ui.gtk")
|
||||
|
||||
|
|
Loading…
Reference in New Issue