Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lver into anarchintosh-master
  • Loading branch information
t0mm0 committed Oct 30, 2011
2 parents f7c0700 + 59069f9 commit 196648e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions script.module.urlresolver/lib/urlresolver/countdown.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Countdown XBMC 0.3
Countdown XBMC 0.4
Copyleft Anarchintosh
Set a countdown dialog with a progress bar for XBMC.
Expand All @@ -24,20 +24,19 @@ def countdown( time_to_wait, title='', text='' ):
cancelled = False
while secs <= time_to_wait:

percent = increment * secs
if (pDialog.iscanceled()):
cancelled = True
break

secs_left = str((time_to_wait - secs))

if secs != 0: xbmc.sleep(1000)

if secs_left == '0': percent = 100
else: percent = increment * secs

remaining_display = ' Wait '+secs_left+' seconds for the video stream to activate...'
pDialog.update(percent,' '+text,remaining_display)

if (pDialog.iscanceled()):
cancelled = True
break
pDialog.update( percent,' '+text, remaining_display )

secs += 1

Expand Down

0 comments on commit 196648e

Please sign in to comment.