Allow the creation of .torrent files with no trackers
This commit is contained in:
parent
dbcf1e622a
commit
5af5749065
|
@ -76,7 +76,9 @@ def make_meta_file(path, url, piece_length, progress=dummy,
|
|||
title=None, comment=None, safe=None, content_type=None,
|
||||
target=None, url_list=None, name=None, private=False,
|
||||
created_by=None, httpseeds=None):
|
||||
data = {'announce': url.strip(), 'creation date': int(gmtime())}
|
||||
data = {'creation date': int(gmtime())}
|
||||
if url:
|
||||
data['announce'] = url.strip()
|
||||
a, b = os.path.split(path)
|
||||
if not target:
|
||||
if b == '':
|
||||
|
|
|
@ -256,8 +256,9 @@ class CreateTorrentDialog:
|
|||
# Get a list of trackers
|
||||
trackers = [t[1] for t in self.trackers_liststore]
|
||||
if len(trackers) == 0:
|
||||
self.dialog.destroy()
|
||||
return
|
||||
tracker = None
|
||||
else:
|
||||
tracker = trackers[0]
|
||||
# Get a list of webseeds
|
||||
webseeds = []
|
||||
b = self.glade.get_widget("textview_webseeds").get_buffer()
|
||||
|
@ -279,7 +280,7 @@ class CreateTorrentDialog:
|
|||
if is_remote:
|
||||
client.create_torrent(
|
||||
path,
|
||||
trackers[0],
|
||||
tracker,
|
||||
piece_length,
|
||||
comment,
|
||||
result,
|
||||
|
@ -298,7 +299,7 @@ class CreateTorrentDialog:
|
|||
threading.Thread(target=self.create_torrent,
|
||||
args=(
|
||||
path,
|
||||
trackers[0],
|
||||
tracker,
|
||||
piece_length,
|
||||
self._on_create_torrent_progress,
|
||||
comment,
|
||||
|
|
Loading…
Reference in New Issue