From 54d42dcc7b92c8a8ca13b700610dc5e463936322 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Tue, 19 Oct 2021 08:45:11 +0300 Subject: [PATCH] Bugfix 1910210844: Fixed import bug --- MultiMate_Player.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MultiMate_Player.py b/MultiMate_Player.py index 2f21a18..635428e 100644 --- a/MultiMate_Player.py +++ b/MultiMate_Player.py @@ -8,12 +8,19 @@ import urllib.parse import urllib.request import json import zipfile +import re try: import vlc except: subprocess.check_call([sys.executable, "-m", "pip", "install", 'python-vlc']) import vlc +try: + import youtube_dl +except: + subprocess.check_call([sys.executable, "-m", "pip", "install", 'youtube_dl']) + import youtube_dl + try: import pafy except: @@ -670,6 +677,9 @@ def addtopl(): print(str(len(list(playlist)))) willbesong = {} + # willbesong['name'] = bytes(results[whichres]["title"], 'Windows-1251', 'ignore').decode('Windows-1251', 'ignore') + # willbesong['author'] = bytes(results[whichres]["channel"], 'Windows-1251', 'ignore').decode('Windows-1251', 'ignore') + # willbesong['url'] = url willbesong['name'] = results[whichres]["title"] willbesong['author'] = results[whichres]["channel"] willbesong['url'] = url