diff --git a/mopidy_local/commands.py b/mopidy_local/commands.py index a5a8667..0f1b763 100644 --- a/mopidy_local/commands.py +++ b/mopidy_local/commands.py @@ -240,17 +240,17 @@ def _scan_metadata( logger.warning( f"Failed scanning {file_uri}: No audio found in file" ) - elif result.duration is None: - logger.warning( - f"Failed scanning {file_uri}: " - "No duration information found in file" - ) - elif result.duration < MIN_DURATION_MS: + elif result.duration and result.duration < MIN_DURATION_MS: logger.warning( f"Failed scanning {file_uri}: " f"Track shorter than {MIN_DURATION_MS}ms" ) else: + if result.duration is None: + logger.warning( + f"Failed scanning {file_uri}: " + "proceeding without duration information" + ) local_uri = translator.path_to_local_track_uri( absolute_path, media_dir )