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

Figure out how to determine duration when it's not given #2

Open
xeals opened this issue Feb 8, 2018 · 0 comments
Open

Figure out how to determine duration when it's not given #2

xeals opened this issue Feb 8, 2018 · 0 comments

Comments

@xeals
Copy link
Owner

xeals commented Feb 8, 2018

So it seems that some Subsonic doesn't parse ID3 tags properly for some media formats. Prime examples in my personal library are ogg files. Examples for an ogg file here and flac here. These are fully tagged in my beets library, and this is what Subsonic returns to me (for reference, the ogg is 132Kbps and 221 seconds).

The duration tag is parsed as a None, and thus the playback loop fails spectacularly because I have to guess how long the song is, and status crashes the server because it panics unwrapping the duration (or would error if I did it properly).

Simple math does work here, but luckily for me (/s) Subsonic also doesn't return bit rate with info on these media formats, so I can't guess at their duration by (file size / bit rate).

Forcing a fixed streaming bit rate works to a point, as you can't upsample a song; this works if the source is above whatever limit is set, but fails anyway if it's lower. I could make this a run-time variable and leave it to people to pick something lower than the lowest bit rate in their collection, but that sounds bad.

Looking for opinions on how to solve this (if it's even possible).

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

No branches or pull requests

1 participant