diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py index 26e375988..6eb30ef6e 100644 --- a/deluge/core/preferencesmanager.py +++ b/deluge/core/preferencesmanager.py @@ -140,7 +140,8 @@ DEFAULT_PREFS = { "rate_limit_ip_overhead": True, "geoip_db_location": "/usr/share/GeoIP/GeoIP.dat", "cache_size": 512, - "cache_expiry": 60 + "cache_expiry": 60, + "public": False } class PreferencesManager(component.Component): diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index ca2183dba..99576f6cc 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -67,6 +67,7 @@ class TorrentOptions(dict): "move_completed": "move_completed", "move_completed_path": "move_completed_path", "add_paused": "add_paused", + "public": "public" } for opt_k, conf_k in options_conf_map.iteritems(): self[opt_k] = config[conf_k] @@ -602,6 +603,7 @@ class Torrent(object): "paused": self.status.paused, "prioritize_first_last": self.options["prioritize_first_last_pieces"], "progress": progress, + "public": self.options["public"], "remove_at_ratio": self.options["remove_at_ratio"], "save_path": self.options["download_location"], "seeding_time": self.status.seeding_time, diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index f6edc2a94..fddea5dce 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -85,7 +85,8 @@ class TorrentState: move_completed_path=None, magnet=None, time_added=-1, - owner=None + owner=None, + public=False ): self.torrent_id = torrent_id self.filename = filename @@ -113,6 +114,7 @@ class TorrentState: self.remove_at_ratio = remove_at_ratio self.move_completed = move_completed self.move_completed_path = move_completed_path + self.public = public class TorrentManagerState: def __init__(self): @@ -358,6 +360,7 @@ class TorrentManager(component.Component): options["move_completed"] = state.move_completed options["move_completed_path"] = state.move_completed_path options["add_paused"] = state.paused + options["public"] = state.public ti = self.get_torrent_info_from_file( os.path.join(get_config_dir(),