Adds sanity check to prevent uncontrolled exception from untagged imported tracks (!1382)
This commit is contained in:
parent
ae56890fa3
commit
b942ed7a62
|
@ -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)
|
||||
try:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Prevents an uncontrolled exception when uploading a file without tags, and prints user friendly message (1275)
|
Loading…
Reference in New Issue