2013-03-02 21:26:28 +01:00
|
|
|
# ex:ts=4:sw=4:sts=4:et
|
|
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
2013-03-01 23:39:42 +01:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2013-01-17 00:21:47 +01:00
|
|
|
class Service(object):
|
2013-02-28 21:27:00 +01:00
|
|
|
pass
|
2013-02-28 21:44:28 +01:00
|
|
|
|
2013-03-01 23:39:42 +01:00
|
|
|
from svtplay.service.aftonbladet import Aftonbladet
|
|
|
|
from svtplay.service.dr import Dr
|
|
|
|
from svtplay.service.expressen import Expressen
|
|
|
|
from svtplay.service.hbo import Hbo
|
|
|
|
from svtplay.service.justin import Justin
|
|
|
|
from svtplay.service.kanal5 import Kanal5
|
|
|
|
from svtplay.service.kanal9 import Kanal9
|
|
|
|
from svtplay.service.nrk import Nrk
|
|
|
|
from svtplay.service.qbrick import Qbrick
|
|
|
|
from svtplay.service.ruv import Ruv
|
|
|
|
from svtplay.service.sr import Sr
|
|
|
|
from svtplay.service.svtplay import Svtplay
|
|
|
|
from svtplay.service.tv4play import Tv4play
|
|
|
|
from svtplay.service.urplay import Urplay
|
|
|
|
from svtplay.service.viaplay import Viaplay
|
2013-02-28 21:44:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
def service_handler(url):
|
|
|
|
sites = [
|
|
|
|
Aftonbladet(),
|
|
|
|
Dr(),
|
|
|
|
Expressen(),
|
|
|
|
Hbo(),
|
|
|
|
Justin(),
|
|
|
|
Kanal5(),
|
|
|
|
Kanal9(),
|
|
|
|
Nrk(),
|
|
|
|
Qbrick(),
|
|
|
|
Ruv(),
|
|
|
|
Sr(),
|
|
|
|
Svtplay(),
|
|
|
|
Tv4play(),
|
|
|
|
Urplay(),
|
|
|
|
Viaplay()]
|
|
|
|
|
|
|
|
handler = None
|
|
|
|
|
|
|
|
for i in sites:
|
|
|
|
if i.handle(url):
|
|
|
|
handler = i
|
|
|
|
break
|
|
|
|
|
|
|
|
return handler
|