mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 01:39:18 +02:00
Fix #808: Advertise the list of supported upload extensions in the Nodeinfo endpoint
This commit is contained in:
parent
2b7dac2175
commit
119df01335
4 changed files with 10 additions and 0 deletions
|
@ -39,6 +39,10 @@ AUDIO_EXTENSIONS_AND_MIMETYPE = [
|
|||
EXTENSION_TO_MIMETYPE = {ext: mt for ext, mt in AUDIO_EXTENSIONS_AND_MIMETYPE}
|
||||
MIMETYPE_TO_EXTENSION = {mt: ext for ext, mt in AUDIO_EXTENSIONS_AND_MIMETYPE}
|
||||
|
||||
SUPPORTED_EXTENSIONS = list(
|
||||
sorted(set([ext for ext, _ in AUDIO_EXTENSIONS_AND_MIMETYPE]))
|
||||
)
|
||||
|
||||
|
||||
def get_ext_from_type(mimetype):
|
||||
return MIMETYPE_TO_EXTENSION.get(mimetype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue