From 54224094a9e89174c254d63bd2206087c75b6677 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 May 2020 14:01:13 +0100 Subject: [PATCH] Set theme after removing custom font --- daemon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 05d56c504..2a7e0bd1b 100644 --- a/daemon.py +++ b/daemon.py @@ -170,6 +170,7 @@ from cache import getPersonFromCache from httpsig import verifyPostHeaders from theme import setTheme from theme import getTheme +from theme import setCustomFont from schedule import runPostSchedule from schedule import runPostScheduleWatchdog from schedule import removeScheduledPosts @@ -5473,8 +5474,7 @@ class PubServer(BaseHTTPRequestHandler): postImageFilename = filename.replace('.temp', '') if mType == 'customFont': os.rename(filename, postImageFilename) - setTheme(self.server.baseDir, - getTheme(self.server.baseDir)) + setCustomFont(self.server.baseDir) print('profile POST ' + mType + ' image or font filename ' + postImageFilename) else: @@ -5801,14 +5801,14 @@ class PubServer(BaseHTTPRequestHandler): '/fonts/custom.' + ext): os.remove(self.server.baseDir + '/fonts/custom.' + ext) - setTheme(self.server.baseDir, - getTheme(self.server.baseDir)) if os.path.isfile(self.server.baseDir + '/fonts/custom.' + ext + '.etag'): os.remove(self.server.baseDir + '/fonts/custom.' + ext + '.etag') + setTheme(self.server.baseDir, + getTheme(self.server.baseDir)) if fields.get('mediaInstance'): self.server.mediaInstance = False