1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

get_media: change order on Generic and service_handler

Generic is now a fallback if we can't find any site that handles the url.
bonus with this is one less fetch of data at the beginning if we have
a site that handles that url.
This commit is contained in:
Johan Andersson 2014-02-23 11:52:11 +01:00
parent 3fb15e06b9
commit ebbbef85c5

View File

@ -56,11 +56,9 @@ class Options:
def get_media(url, options):
url, stream = Generic().get(url)
if stream:
url = url.replace("&", "&")
stream = service_handler(url)
if not stream:
stream = service_handler(url)
url, stream = Generic().get(url)
if not stream:
log.error("That site is not supported. Make a ticket or send a message")
sys.exit(2)