Commit b942ed7a authored by Marcos Peña's avatar Marcos Peña Committed by JuniorJPDJ
Browse files

Adds sanity check to prevent uncontrolled exception from untagged imported tracks (!1382)

parent ae56890f
......@@ -357,6 +357,8 @@ class Metadata(Mapping):
self._file = kind(filething)
if self._file is None:
raise ValueError("Cannot parse metadata from {}".format(filething))
if len(self._file) == 0:
raise ValueError("No tags found in {}".format(filething))
self.fallback = self.load_fallback(filething, self._file)
ft = self.get_file_type(self._file)
Prevents an uncontrolled exception when uploading a file without tags, and prints user friendly message (1275)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment