Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
issue #3: adding torrent seeder and progress info
Browse files Browse the repository at this point in the history
  • Loading branch information
azamaulanaaa committed Sep 29, 2020
1 parent ff6177c commit d6c28ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bot/handlers/leech_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ async def progress_dl(message : Message, aria2_api : aria2.aria2, gid : int, pre
text = LOCAL.ARIA2_DOWNLOAD_STATUS.format(
name = download.name,
block = block,
percentage = download.progress_string(),
total_size = download.total_length_string(),
download_speed = download.download_speed_string(),
upload_speed = download.upload_speed_string(),
seeder = download.num_seeders if download.is_torrent else 1,
eta = download.eta_string(),
gid = download.gid
)
Expand Down
2 changes: 1 addition & 1 deletion bot/locals/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'LEECH_LIST_MESSAGE_HEADER' : '<b>Leech Status</b>',
'LEECH_LIST_FORMAT' : 'Name: <code>{name}</code>\nStatus: {status}\nID: <code>{gid}</code>\n\n',
'ARIA2_CHECKING_LINK' : "checking...",
'ARIA2_DOWNLOAD_STATUS' : "Downloading : <code>{name}</code>\n{block}\nSize : {total_size}\nDN : {download_speed} / UP : {upload_speed}\nETA : {eta}\nID : <code>{gid}</code>",
'ARIA2_DOWNLOAD_STATUS' : "Downloading : <code>{name}</code>\n{block} {percentage}%\nSize : {total_size}\nDN : {download_speed} / UP : {upload_speed}\nSeeder : {seeder}\nETA : {eta}\nID : <code>{gid}</code>",
'ARIA2_DOWNLOAD_SUCCESS' : 'File downloaded : <code>{name}</code>',
'ARIA2_DOWNLOAD_CANCELED' : 'Download canceled : <code>{name}</code>',
'ARIA2_DEAD_LINK' : 'Download auto canceled : <code>{name}</code>\nYour Torrent/Link is Dead.',
Expand Down

0 comments on commit d6c28ad

Please sign in to comment.