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

Hide collection duration if 0 #2291

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

brianjaustin
Copy link
Contributor

This fixes #2278 by hiding the duration of a book in a collection if it is 0 (or less). I suppose some audiobooks could also have a duration of 0, but this seems rare (and perhaps hiding the duration in those cases also makes sense?). I opted not to go with progress as that would result in the value having different meanings depending on the media type, which sounds like a potentially confusing user experience.

While this fixes the reported bug, I wonder if it makes sense to have page count as the "duration". Although that would require more effort to implement I think.

@nichwall
Copy link
Contributor

nichwall commented Nov 6, 2023

The only problem I see with using "pages" as duration is that only works for PDF or comics (epub page count is relative based on zoom and screen size).

I can't think of any reason to not hide duration when it's zero. That indicates there are either no audio items, or all of the audio items are zero duration (so there is nothing to listen to anyway). When people make placeholder books, they tend to use empty files, so there still wouldn't be a duration.

@advplyr
Copy link
Owner

advplyr commented Nov 6, 2023

Yeah as @nichwall said, we can't get number of pages for epub. I was thinking of showing the ebook format in-place of the duration

@advplyr
Copy link
Owner

advplyr commented Nov 6, 2023

Thanks!

@advplyr advplyr merged commit 70c213a into advplyr:master Nov 6, 2023
1 check passed
@brianjaustin brianjaustin deleted the fix/collection-duration branch November 7, 2023 00:25
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.

[Bug]: Collection view shows ebook duration in seconds
3 participants