mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
parent
494c9e3eb7
commit
0ae0b6ae54
@ -17,7 +17,7 @@ country = {"sv": ".se", "da": ".dk", "no": ".no"}
|
||||
REALMS = {"discoveryplus.se": "dplayse", "discoveryplus.no": "dplayno", "discoveryplus.dk": "dplaydk"}
|
||||
|
||||
|
||||
class Dplay(Service):
|
||||
class Discoveryplus(Service):
|
||||
supported_domains = ["discoveryplus.se", "discoveryplus.no", "discoveryplus.dk"]
|
||||
packages = []
|
||||
|
||||
|
@ -4,7 +4,7 @@ from svtplay_dl.service.barnkanalen import Barnkanalen
|
||||
from svtplay_dl.service.bigbrother import Bigbrother
|
||||
from svtplay_dl.service.cmore import Cmore
|
||||
from svtplay_dl.service.disney import Disney
|
||||
from svtplay_dl.service.dplay import Dplay
|
||||
from svtplay_dl.service.dplay import Discoveryplus
|
||||
from svtplay_dl.service.dr import Dr
|
||||
from svtplay_dl.service.efn import Efn
|
||||
from svtplay_dl.service.eurosport import Eurosport
|
||||
@ -35,7 +35,7 @@ from svtplay_dl.service.tv4play import Tv4play
|
||||
from svtplay_dl.service.twitch import Twitch
|
||||
from svtplay_dl.service.urplay import Urplay
|
||||
from svtplay_dl.service.vg import Vg
|
||||
from svtplay_dl.service.viaplay import Viaplay
|
||||
from svtplay_dl.service.viaplay import Viafree
|
||||
from svtplay_dl.service.viasatsport import Viasatsport
|
||||
from svtplay_dl.service.vimeo import Vimeo
|
||||
from svtplay_dl.service.youplay import Youplay
|
||||
@ -47,7 +47,7 @@ sites = [
|
||||
Bigbrother,
|
||||
Cmore,
|
||||
Disney,
|
||||
Dplay,
|
||||
Discoveryplus,
|
||||
Dr,
|
||||
Efn,
|
||||
Eurosport,
|
||||
@ -75,7 +75,7 @@ sites = [
|
||||
Tv4,
|
||||
Tv4play,
|
||||
Urplay,
|
||||
Viaplay,
|
||||
Viafree,
|
||||
Viasatsport,
|
||||
Vimeo,
|
||||
Vg,
|
||||
|
@ -20,7 +20,7 @@ from svtplay_dl.subtitle import subtitle
|
||||
country = {".se": "sv", ".dk": "da", ".no": "no"}
|
||||
|
||||
|
||||
class Viaplay(Service, OpenGraphThumbMixin):
|
||||
class Viafree(Service, OpenGraphThumbMixin):
|
||||
supported_domains = [
|
||||
"tv3play.ee",
|
||||
"tv3play.lv",
|
||||
|
@ -419,6 +419,20 @@ def readconfig(config, configfile, service=None, preset=None):
|
||||
if configdata is None:
|
||||
return config
|
||||
|
||||
# migrate old service name to new
|
||||
old_name_in_config = False
|
||||
if "service" in configdata and "dplay" in configdata["service"]:
|
||||
old_name_in_config = True
|
||||
logging.warning("'dplay' have been renamed to 'discoveryplus'")
|
||||
configdata["service"]["discoveryplus"] = configdata["service"].pop("dplay")
|
||||
|
||||
if "service" in configdata and "viaplay" in configdata["service"]:
|
||||
old_name_in_config = True
|
||||
logging.warning("'viaplay' have been renamed to 'viafree'")
|
||||
configdata["service"]["viafree"] = configdata["service"].pop("viaplay")
|
||||
if old_name_in_config:
|
||||
logging.warning("Old service names still work at the moment. To avoid the warnings you need to rename the service(s) to the new name(s)")
|
||||
|
||||
if "default" in configdata:
|
||||
config = merge(config.get_variable(), configdata["default"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user