From 10cebf49d9a2bf45128c0acbed93876c5c535a15 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 27 May 2021 23:19:52 +0100 Subject: [PATCH] Better exclusion of default emoji --- metadata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metadata.py b/metadata.py index 73c38cb8e..e073692c3 100644 --- a/metadata.py +++ b/metadata.py @@ -140,7 +140,9 @@ def metadataCustomEmoji(baseDir: str, emojisUrl = httpPrefix + '://' + domainFull + '/emoji' for subdir, dirs, files in os.walk(baseDir + '/emoji'): for f in files: - if f.startswith('1F') or f.startswith('00') or f.startswith('E0'): + if len(f) < 3: + continue + if f[0].isdigit() or f[1].isdigit(): continue if not f.endswith('.png'): continue