From 400fd461aba78df54a549fdaa87f08769d99020a Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 3 Sep 2013 21:12:22 +0200 Subject: [PATCH] Always add timestamp to registered statics --- couchpotato/core/_base/clientscript/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/_base/clientscript/main.py b/couchpotato/core/_base/clientscript/main.py index 7476f393..efbaa643 100644 --- a/couchpotato/core/_base/clientscript/main.py +++ b/couchpotato/core/_base/clientscript/main.py @@ -80,7 +80,7 @@ class ClientScript(Plugin): for static_type in self.core_static: for rel_path in self.core_static.get(static_type): file_path = os.path.join(Env.get('app_dir'), 'couchpotato', 'static', rel_path) - core_url = 'api/%s/static/%s?%s' % (Env.setting('api_key'), rel_path, tryInt(os.path.getmtime(file_path))) + core_url = 'api/%s/static/%s' % (Env.setting('api_key'), rel_path) if static_type == 'script': self.registerScript(core_url, file_path, position = 'front') @@ -165,6 +165,8 @@ class ClientScript(Plugin): def register(self, api_path, file_path, type, location): + api_path = '%s?%s' % (api_path, tryInt(os.path.getmtime(file_path))) + if not self.urls[type].get(location): self.urls[type][location] = [] self.urls[type][location].append(api_path)