Private GIT

Skip to content
Snippets Groups Projects
Commit c5e99967 authored by labrys's avatar labrys
Browse files

Merge pull request #252 from labrys/issue-15

Fix issue #15: Progress bar shows '?' when only unaired episodes.
parents e4c3a5c1 c1420e4f
Branches
Tags
No related merge requests found
...@@ -300,23 +300,21 @@ ...@@ -300,23 +300,21 @@
if not cur_total: if not cur_total:
cur_total = 0 cur_total = 0
if cur_total != 0:
download_stat = str(cur_downloaded) download_stat = str(cur_downloaded)
download_stat_tip = "Downloaded: " + str(cur_downloaded) download_stat_tip = "Downloaded: " + str(cur_downloaded)
if cur_snatched > 0: if cur_snatched:
download_stat = download_stat + "+" + str(cur_snatched) download_stat = download_stat + "+" + str(cur_snatched)
download_stat_tip = download_stat_tip + "
" + "Snatched: " + str(cur_snatched) download_stat_tip = download_stat_tip + "
" + "Snatched: " + str(cur_snatched)
download_stat = download_stat + " / " + str(cur_total) download_stat = download_stat + " / " + str(cur_total)
download_stat_tip = download_stat_tip + "
" + "Total: " + str(cur_total) download_stat_tip = download_stat_tip + "
" + "Total: " + str(cur_total)
else:
download_stat = '?'
download_stat_tip = "no data"
nom = cur_downloaded nom = cur_downloaded
if cur_total:
den = cur_total den = cur_total
if den == 0: else:
den = 1 den = 1
download_stat_tip = "Unaired"
progressbar_percent = nom * 100 / den progressbar_percent = nom * 100 / den
%> %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment