forked from indymedia/epicyon
Remove formatting from youtube replacement domain
parent
041f6b8a63
commit
3d3bcda6db
11
daemon.py
11
daemon.py
|
@ -6311,11 +6311,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if fields.get('ytdomain'):
|
if fields.get('ytdomain'):
|
||||||
currYTDomain = self.server.YTReplacementDomain
|
currYTDomain = self.server.YTReplacementDomain
|
||||||
if fields['ytdomain'] != currYTDomain:
|
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,
|
setConfigParam(self.server.baseDir,
|
||||||
'youtubedomain',
|
'youtubedomain', newYTDomain)
|
||||||
fields['ytdomain'])
|
self.server.YTReplacementDomain = newYTDomain
|
||||||
self.server.YTReplacementDomain = \
|
|
||||||
fields['ytdomain']
|
|
||||||
|
|
||||||
currInstanceDescriptionShort = \
|
currInstanceDescriptionShort = \
|
||||||
getConfigParam(self.server.baseDir,
|
getConfigParam(self.server.baseDir,
|
||||||
|
|
|
@ -1796,6 +1796,10 @@ if not registration:
|
||||||
|
|
||||||
YTDomain = getConfigParam(baseDir, 'youtubedomain')
|
YTDomain = getConfigParam(baseDir, 'youtubedomain')
|
||||||
if YTDomain:
|
if YTDomain:
|
||||||
|
if '://' in YTDomain:
|
||||||
|
YTDomain = YTDomain.split('://')[1]
|
||||||
|
if '/' in YTDomain:
|
||||||
|
YTDomain = YTDomain.split('/')[0]
|
||||||
args.YTReplacementDomain = YTDomain
|
args.YTReplacementDomain = YTDomain
|
||||||
|
|
||||||
if setTheme(baseDir, themeName):
|
if setTheme(baseDir, themeName):
|
||||||
|
|
Loading…
Reference in New Issue