Skip to content

Commit

Permalink
Fix publish swarm if its joined any community already
Browse files Browse the repository at this point in the history
  • Loading branch information
ardhipoetra committed Dec 23, 2016
1 parent 3acb336 commit 014ce2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions experiments/tribler/channel_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ def publish(self, filename, size):
elif self.joined_community:
self.joined_community._disp_create_torrent_from_torrentdef(tdef, int(time.time()))

self.setup_seeder(filename, size)
self.setup_seeder(filename, size)
else:
self._logger.debug("Can't publish yet, no channel or community joined")
reactor.callLater(10.0, self.publish, filename, size)

def _create_test_torrent(self, filename='', size=0):
filepath = path.join(self.upload_dir_path, "%s.data" % filename)
Expand Down Expand Up @@ -330,7 +333,7 @@ def start_download(self, name):
'ChannelTorrents.dispersy_id', 'ChannelTorrents.name', 'Torrent.name',
'ChannelTorrents.description', 'ChannelTorrents.time_stamp', 'ChannelTorrents.inserted']
infohash_bin = None
torrent_values = self.joined_community._channelcast_db.getTorrentsFromChannelId(self.joined_community.get_channel_id(), True, CHANTOR_DB, 5)
torrent_values = self.joined_community._channelcast_db.getTorrentsFromChannelId(self.joined_community.get_channel_id(), True, CHANTOR_DB)
if torrent_values:
log = "Channel id %s : " % self.joined_community.get_channel_id()
for t in torrent_values:
Expand Down

0 comments on commit 014ce2f

Please sign in to comment.