From 36d6cb28b3b696398f29e072fe6c8c064b59cd09 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 26 Aug 2017 14:46:56 -0300 Subject: [PATCH] Small fixes --- disco/bot/parser.py | 2 +- disco/voice/playable.py | 2 +- disco/voice/player.py | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/disco/bot/parser.py b/disco/bot/parser.py index 8283fc8..fe2d90c 100644 --- a/disco/bot/parser.py +++ b/disco/bot/parser.py @@ -11,7 +11,7 @@ BOOL_OPTS = {'yes': True, 'no': False, 'true': True, 'False': False, '1': True, TYPE_MAP = { 'str': lambda ctx, data: str(data) if six.PY3 else unicode(data), 'int': lambda ctx, data: int(data), - 'float': lambda ctx, data: int(data), + 'float': lambda ctx, data: float(data), 'snowflake': lambda ctx, data: int(data), } diff --git a/disco/voice/playable.py b/disco/voice/playable.py index ff3ba04..12ed9ef 100644 --- a/disco/voice/playable.py +++ b/disco/voice/playable.py @@ -163,7 +163,7 @@ class YoutubeDLInput(FFmpegInput): if self._url: obj = ydl.extract_info(self._url, download=False, process=False) if 'entries' in obj: - self._ie_info = obj['entries'][0] + self._ie_info = list(obj['entries'])[0] else: self._ie_info = obj diff --git a/disco/voice/player.py b/disco/voice/player.py index 56c023c..e09e28a 100644 --- a/disco/voice/player.py +++ b/disco/voice/player.py @@ -60,9 +60,10 @@ class Player(object): self.events.emit(self.Events.PAUSE_PLAY) def resume(self): - self.paused.set() - self.paused = None - self.events.emit(self.Events.RESUME_PLAY) + if self.paused: + self.paused.set() + self.paused = None + self.events.emit(self.Events.RESUME_PLAY) def play(self, item): # Grab the first frame before we start anything else, sometimes playables