Only allow MusicBrainz tagged file on a pod (#2083)
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2607>
This commit is contained in:
parent
169cd69a46
commit
2e3205a19d
3 changed files with 37 additions and 0 deletions
|
|
@ -247,6 +247,15 @@ def process_upload(upload, update_denormalization=True):
|
|||
return fail_import(
|
||||
upload, "invalid_metadata", detail=detail, file_metadata=metadata_dump
|
||||
)
|
||||
if (
|
||||
settings.ONLY_ALLOW_MUSICBRAINZ_TAGGED_FILES is True
|
||||
and not serializer.validated_data.get("mbid")
|
||||
):
|
||||
return fail_import(
|
||||
upload,
|
||||
"Uploading files without a MusicBrainz ID is not permitted in this pod",
|
||||
detail="You can tag you files with MusicBrainz Picard",
|
||||
)
|
||||
|
||||
final_metadata = collections.ChainMap(
|
||||
additional_data, serializer.validated_data, internal_config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue