deleted youtube_utils, and fixed various imports from the source code #273

This commit is contained in:
paul 2019-02-26 21:44:15 +01:00
parent fe72fe97b5
commit 6eb27b655a
3 changed files with 1 additions and 13 deletions

BIN
src/snapshot.zip Normal file

Binary file not shown.

View File

@ -11,7 +11,7 @@ import audio_services
import paths
import sound_lib
import output
import youtube_utils
from audio_services import youtube_utils
import application
system = platform.system()
if system=="Windows" and not hasattr(sys, 'frozen'): # We are running from source on Windows

View File

@ -1,12 +0,0 @@
# -*- coding: utf-8 -*-
import youtube_dl
def get_video_url(url):
ydl = youtube_dl.YoutubeDL({'quiet': True, 'format': 'bestaudio/best', 'outtmpl': u'%(id)s%(ext)s'})
with ydl:
result = ydl.extract_info(url, download=False)
if 'entries' in result:
video = result['entries'][0]
else:
video = result
return video["url"]