Skip to content

Conversation

@schmaller
Copy link
Contributor

For .mpc files the Scanner..scan() from mopidy.audio doesn't return a valid duration
which prevents these files from getting into the library.
However, those files can be played by gstreamer without any problems.
My change handles this "violation" less strictly and accepts files without a duration to be put into the library.

Copy link
Member

@txomon txomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! Do you think we could add a sample file or maybe a test of the happy paths?

"No duration information found in file"
)
elif result.duration < MIN_DURATION_MS:
elif result.duration and result.duration < MIN_DURATION_MS:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case, this change will now let duration 0 pass and skip through all checks because it's not None and it's falsey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants