mirror of https://gitlab.com/bashrc2/epicyon
Change sequence
parent
beb451baf7
commit
d0c4bc1cfa
|
@ -795,11 +795,11 @@ def addEmojiToDisplayName(baseDir: str, httpPrefix: str,
|
||||||
def _isImageMimeType(mimeType: str) -> bool:
|
def _isImageMimeType(mimeType: str) -> bool:
|
||||||
"""Is the given mime type an image?
|
"""Is the given mime type an image?
|
||||||
"""
|
"""
|
||||||
extensions = getImageExtensions()
|
|
||||||
if mimeType == 'image/svg+xml':
|
if mimeType == 'image/svg+xml':
|
||||||
return True
|
return True
|
||||||
if not mimeType.startswith('image/'):
|
if not mimeType.startswith('image/'):
|
||||||
return False
|
return False
|
||||||
|
extensions = getImageExtensions()
|
||||||
ext = mimeType.split('/')[1]
|
ext = mimeType.split('/')[1]
|
||||||
if ext in extensions:
|
if ext in extensions:
|
||||||
return True
|
return True
|
||||||
|
@ -809,9 +809,9 @@ def _isImageMimeType(mimeType: str) -> bool:
|
||||||
def _isVideoMimeType(mimeType: str) -> bool:
|
def _isVideoMimeType(mimeType: str) -> bool:
|
||||||
"""Is the given mime type a video?
|
"""Is the given mime type a video?
|
||||||
"""
|
"""
|
||||||
extensions = getVideoExtensions()
|
|
||||||
if not mimeType.startswith('video/'):
|
if not mimeType.startswith('video/'):
|
||||||
return False
|
return False
|
||||||
|
extensions = getVideoExtensions()
|
||||||
ext = mimeType.split('/')[1]
|
ext = mimeType.split('/')[1]
|
||||||
if ext in extensions:
|
if ext in extensions:
|
||||||
return True
|
return True
|
||||||
|
@ -821,11 +821,11 @@ def _isVideoMimeType(mimeType: str) -> bool:
|
||||||
def _isAudioMimeType(mimeType: str) -> bool:
|
def _isAudioMimeType(mimeType: str) -> bool:
|
||||||
"""Is the given mime type an audio file?
|
"""Is the given mime type an audio file?
|
||||||
"""
|
"""
|
||||||
extensions = getAudioExtensions()
|
|
||||||
if mimeType == 'audio/mpeg':
|
if mimeType == 'audio/mpeg':
|
||||||
return True
|
return True
|
||||||
if not mimeType.startswith('audio/'):
|
if not mimeType.startswith('audio/'):
|
||||||
return False
|
return False
|
||||||
|
extensions = getAudioExtensions()
|
||||||
ext = mimeType.split('/')[1]
|
ext = mimeType.split('/')[1]
|
||||||
if ext in extensions:
|
if ext in extensions:
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue