refactor: Consolidate preview file extensions into constants for improved maintainability

This commit is contained in:
Will Miao
2025-04-11 06:19:15 +08:00
parent 86810d9f03
commit 7393e92b21
4 changed files with 30 additions and 39 deletions

View File

@@ -5,4 +5,18 @@ NSFW_LEVELS = {
"X": 8,
"XXX": 16,
"Blocked": 32, # Probably not actually visible through the API without being logged in on model owner account?
}
}
# 预览文件扩展名
PREVIEW_EXTENSIONS = [
'.preview.png',
'.preview.jpeg',
'.preview.jpg',
'.preview.webp',
'.preview.mp4',
'.png',
'.jpeg',
'.jpg',
'.webp',
'.mp4'
]