diff --git a/config.py b/config.py index 84cdb4534..b0b5ed1bb 100644 --- a/config.py +++ b/config.py @@ -276,3 +276,6 @@ class DefaultConfig(object): # Torrent management flags TORRENT_PIECE_SIZE = 512 * 1024 + TORRENT_ANNOUNCE_URL = 'https://localhost:6881/announce' + TORRENT_NAMING_SALT = '3ae93fef-c30a-427e-9ba0-eea0fd710419' + diff --git a/util/registry/torrent.py b/util/registry/torrent.py index 2f9e2f79a..e1146a84e 100644 --- a/util/registry/torrent.py +++ b/util/registry/torrent.py @@ -7,8 +7,8 @@ import resumablehashlib from app import app -TRACKER_ANNOUNCE_URL = app.config.get('BT_TRACKER_ANNOUNCE_URL') -NAMING_SALT = app.config.get('BT_NAMING_SALT') +ANNOUNCE_URL = app.config.get('TORRENT_ANNOUNCE_URL') +NAMING_SALT = app.config.get('TORRENT_NAMING_SALT') def public_torrent_filename(blob_uuid): return hashlib.sha256(blob_uuid).hexdigest() @@ -19,7 +19,7 @@ def per_user_torrent_filename(user_uuid, blob_uuid): def make_torrent(name, webseed, length, piece_length, pieces): return bencode.bencode({ - 'announce': TRACKER_ANNOUNCE_URL, + 'announce': ANNOUNCE_URL, 'url-list': webseed, 'encoding': 'UTF-8', 'created by': 'Quay Container Registry',