diff --git a/files/helpers/assetcache.py b/files/helpers/assetcache.py index 4b3334d229..ad8818da8d 100644 --- a/files/helpers/assetcache.py +++ b/files/helpers/assetcache.py @@ -8,14 +8,19 @@ import gevent_inotifyx as inotify from files.helpers.config.const import * ASSET_DIR = 'files/assets' -ASSET_SUBDIRS = ['/css', '/js', '/js/vendor'] ASSET_URL = '/assets/' ASSET_CACHE = defaultdict(lambda: None) +ASSET_SUBDIRS = ['/css', '/js'] if IS_DKD(): ASSET_SUBDIRS.extend(['/events/DKD/js']) elif IS_FISTMAS(): - ASSET_SUBDIRS.extend(['/events/fistmas/css', '/events/fistmas/css/themes', '/events/fistmas/js', '/events/fistmas/js/vendor']) + ASSET_SUBDIRS.extend(['/events/fistmas/css', '/events/fistmas/js']) + +new_dirs = [] +for directory in ASSET_SUBDIRS: + new_dirs += [x[0].split(ASSET_DIR)[1] for x in os.walk(f'{ASSET_DIR}{directory}')] +ASSET_SUBDIRS = new_dirs def assetcache_build(asset_dir, subdirs): for subdir in subdirs: