Skip to content

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

Open
schmaller wants to merge 4 commits into
mopidy:mainfrom
schmaller:musepack-scanning
Open

support tracks without a valid duration, e.g. musepack#70
schmaller wants to merge 4 commits into
mopidy:mainfrom
schmaller:musepack-scanning

Conversation

@schmaller

Copy link
Copy Markdown
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.

@txomon txomon left a comment

Copy link
Copy Markdown

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?

Comment thread mopidy_local/commands.py
"No duration information found in file"
)
elif result.duration < MIN_DURATION_MS:
elif result.duration and result.duration < MIN_DURATION_MS:

Copy link
Copy Markdown

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