Commit 2bffe490 authored by Marcos Peña's avatar Marcos Peña
Browse files

Adds sanity check to catch imported tracks without tags

parent 31c0b91b
Pipeline #16625 canceled with stages
in 6 minutes and 52 seconds
......@@ -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:
......
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