Skip to content

Commit

Permalink
Use proper SafeDialogProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
steeve committed Nov 1, 2013
1 parent 2927c1b commit ded58f3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions resources/site-packages/xbmctorrent/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@
}


# Somehow if we close the dialog too fast, it makes XBMC go bonkers
class SafeDialogProgress(xbmcgui.DialogProgress):
def close(self):
xbmc.sleep(1000)
super(SafeDialogProgress, self).close()


class OverlayText(object):
def __init__(self, w, h, *args, **kwargs):
self.window = xbmcgui.Window(WINDOW_FULLSCREEN_VIDEO)
Expand Down Expand Up @@ -171,6 +164,8 @@ def _wait_t2h_startup(self, t2h):
return False

def loop(self):
from xbmctorrent.utils import SafeDialogProgress

has_resolved = False

plugin.log.info("Starting torrent2http...")
Expand All @@ -183,7 +178,7 @@ def loop(self):
return

plugin.log.info("Opening download dialog...")
with closing(SafeDialogProgress()) as dialog:
with closing(SafeDialogProgress(delay_create=0)) as dialog:
dialog.create(plugin.name)

plugin.log.info("Waiting for file resolution...")
Expand Down

0 comments on commit ded58f3

Please sign in to comment.