🐛
This commit is contained in:
@@ -212,7 +212,7 @@ class BedreNetflix():
|
|||||||
|
|
||||||
torrentInfo = torrentName+" "+progressBar+" (Eta: "+eta+")"
|
torrentInfo = torrentName+" "+progressBar+" (Eta: "+eta+")"
|
||||||
|
|
||||||
if not (downloadedRatio == 1 and torrent["added_on"] < time.time()-86400):
|
if not (downloadedRatio == 1 and torrent["last_activity"] < time.time()-7200):
|
||||||
message.append(torrentInfo)
|
message.append(torrentInfo)
|
||||||
|
|
||||||
if downloadedRatio < 1: allDownloaded = False
|
if downloadedRatio < 1: allDownloaded = False
|
||||||
@@ -224,26 +224,28 @@ class BedreNetflix():
|
|||||||
|
|
||||||
async def downloading(self,ctx):
|
async def downloading(self,ctx):
|
||||||
messageText, allDownloaded = await self.genDownloadList()
|
messageText, allDownloaded = await self.genDownloadList()
|
||||||
updatesLeft = 20
|
if messageText.startswith("```"):
|
||||||
messageText = messageText[:-3]+"\nThis message will update once a minute for "+str(updatesLeft)+" more minutes\n```"
|
updatesLeft = 20
|
||||||
|
|
||||||
oldMessage = await ctx.send(messageText)
|
|
||||||
|
|
||||||
while ((not allDownloaded) and updatesLeft > 0):
|
|
||||||
await asyncio.sleep(60)
|
|
||||||
updatesLeft -= 1
|
|
||||||
messageText, allDownloaded = await self.genDownloadList()
|
|
||||||
messageText = messageText[:-3]+"\nThis message will update once a minute for "+str(updatesLeft)+" more minutes\n```"
|
messageText = messageText[:-3]+"\nThis message will update once a minute for "+str(updatesLeft)+" more minutes\n```"
|
||||||
|
|
||||||
|
oldMessage = await ctx.send(messageText)
|
||||||
|
|
||||||
|
while ((not allDownloaded) and updatesLeft > 0):
|
||||||
|
await asyncio.sleep(60)
|
||||||
|
updatesLeft -= 1
|
||||||
|
messageText, allDownloaded = await self.genDownloadList()
|
||||||
|
messageText = messageText[:-3]+"\nThis message will update once a minute for "+str(updatesLeft)+" more minutes\n```"
|
||||||
|
await oldMessage.edit(content = messageText)
|
||||||
|
|
||||||
|
messageText, allDownloaded = await self.genDownloadList()
|
||||||
|
|
||||||
|
if allDownloaded:
|
||||||
|
messageText = messageText[:-3]+"\nThis message will not update because all torrents are downloaded.\n```"
|
||||||
|
logThis("All torrents are downloaded")
|
||||||
|
else:
|
||||||
|
messageText = messageText[:-3]+"\nThis message will not update anymore\n```"
|
||||||
|
logThis("The message updated 20 times")
|
||||||
|
|
||||||
await oldMessage.edit(content = messageText)
|
await oldMessage.edit(content = messageText)
|
||||||
|
|
||||||
messageText, allDownloaded = await self.genDownloadList()
|
|
||||||
|
|
||||||
if allDownloaded:
|
|
||||||
messageText = messageText[:-3]+"\nThis message will not update because all torrents are downloaded.\n```"
|
|
||||||
logThis("All torrents are downloaded")
|
|
||||||
else:
|
else:
|
||||||
messageText = messageText[:-3]+"\nThis message will not update anymore\n```"
|
await ctx.send(messageText)
|
||||||
logThis("The message updated 20 times")
|
|
||||||
|
|
||||||
await oldMessage.edit(content = messageText)
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user