removed unnecessary try, except

This commit is contained in:
Martin Wagner 2020-07-13 23:04:09 +02:00
parent 2b861bb6d8
commit 495634c254

View File

@ -3124,7 +3124,6 @@ class SeekBar(Gtk.Box):
self.enable()
def refresh(self, emitter, elapsed, duration):
try:
if elapsed > duration: # fix display error
elapsed=duration
fraction=(elapsed/duration)*100
@ -3133,8 +3132,6 @@ class SeekBar(Gtk.Box):
self.elapsed.set_text(str(datetime.timedelta(seconds=int(elapsed))).lstrip("0").lstrip(":"))
self.rest.set_text("-"+str(datetime.timedelta(seconds=int(duration-elapsed))).lstrip("0").lstrip(":"))
self.scale.set_fill_level(fraction)
except:
self.disable()
class PlaybackOptions(Gtk.Box):
def __init__(self, client, settings):