Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support tracks without a valid duration, e.g. musepack #70

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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.

None yet

2 participants