Skip to content

Commit

Permalink
Merge pull request #35 from tomka/fix-scan-of-no-duration-files
Browse files Browse the repository at this point in the history
Handle scan results without duration information more gracefully
  • Loading branch information
jodal authored Jan 31, 2020
2 parents 0720824 + 29c9553 commit af5765d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mopidy_local/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ 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:
logger.warning(
f"Failed scanning {file_uri}: "
Expand Down

0 comments on commit af5765d

Please sign in to comment.