Skip to content

Commit

Permalink
[commands] check if result.duration is None
Browse files Browse the repository at this point in the history
Fixes mopidy#36
  • Loading branch information
arthurlutz authored Jan 30, 2020
1 parent 0720824 commit 1585e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mopidy_local/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _scan_metadata(
logger.warning(
f"Failed scanning {file_uri}: No audio found in file"
)
elif result.duration < MIN_DURATION_MS:
elif result.duration is None or result.duration < MIN_DURATION_MS:
logger.warning(
f"Failed scanning {file_uri}: "
f"Track shorter than {MIN_DURATION_MS}ms"
Expand Down

0 comments on commit 1585e12

Please sign in to comment.