diff --git a/daemon.py b/daemon.py index 47426a90..5d57c95a 100644 --- a/daemon.py +++ b/daemon.py @@ -6311,11 +6311,14 @@ class PubServer(BaseHTTPRequestHandler): if fields.get('ytdomain'): currYTDomain = self.server.YTReplacementDomain if fields['ytdomain'] != currYTDomain: + newYTDomain = fields['ytdomain'] + if '://' in newYTDomain: + newYTDomain = newYTDomain.split('://')[1] + if '/' in newYTDomain: + newYTDomain = newYTDomain.split('/')[0] setConfigParam(self.server.baseDir, - 'youtubedomain', - fields['ytdomain']) - self.server.YTReplacementDomain = \ - fields['ytdomain'] + 'youtubedomain', newYTDomain) + self.server.YTReplacementDomain = newYTDomain currInstanceDescriptionShort = \ getConfigParam(self.server.baseDir, diff --git a/epicyon.py b/epicyon.py index dfe0135d..bd5ecf52 100644 --- a/epicyon.py +++ b/epicyon.py @@ -1796,6 +1796,10 @@ if not registration: YTDomain = getConfigParam(baseDir, 'youtubedomain') if YTDomain: + if '://' in YTDomain: + YTDomain = YTDomain.split('://')[1] + if '/' in YTDomain: + YTDomain = YTDomain.split('/')[0] args.YTReplacementDomain = YTDomain if setTheme(baseDir, themeName):