mirror of https://gitlab.com/bashrc2/epicyon
Make youtube replacement domain configurable
parent
bf8bf6834c
commit
407c6509bd
10
daemon.py
10
daemon.py
|
@ -6307,6 +6307,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
setConfigParam(self.server.baseDir,
|
||||
'instanceTitle',
|
||||
fields['instanceTitle'])
|
||||
|
||||
if fields.get('ytdomain'):
|
||||
currYTDomain = self.server.YTReplacementDomain
|
||||
if fields['ytdomain'] != currYTDomain:
|
||||
setConfigParam(self.server.baseDir,
|
||||
'youtubedomain',
|
||||
fields['ytdomain'])
|
||||
self.server.YTReplacementDomain = \
|
||||
fields['ytdomain']
|
||||
|
||||
currInstanceDescriptionShort = \
|
||||
getConfigParam(self.server.baseDir,
|
||||
'instanceDescriptionShort')
|
||||
|
|
|
@ -1505,6 +1505,16 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
|
|||
' <textarea id="message" name="gitProjects" ' + \
|
||||
'style="height:100px">' + gitProjectsStr + '</textarea>'
|
||||
|
||||
editProfileForm += \
|
||||
' <br><b><label class="labels">' + \
|
||||
translate['YouTube Replacement Domain'] + '</label></b>'
|
||||
YTReplacementDomain = getConfigParam(baseDir, "youtubedomain")
|
||||
if not YTReplacementDomain:
|
||||
YTReplacementDomain = ''
|
||||
editProfileForm += \
|
||||
' <input type="text" name="ytdomain" value="' + \
|
||||
YTReplacementDomain + '">'
|
||||
|
||||
editProfileForm += ' </div>'
|
||||
editProfileForm += ' <div class="container">'
|
||||
editProfileForm += \
|
||||
|
|
Loading…
Reference in New Issue