Skip to content

Media-aware browsing labels and filters for videos, audio, images, and books - #366

Open
GarbaJohnAshifa wants to merge 8 commits into
iiab:masterfrom
langdoc-minawao:feature/adaptive-media-ui
Open

Media-aware browsing labels and filters for videos, audio, images, and books#366
GarbaJohnAshifa wants to merge 8 commits into
iiab:masterfrom
langdoc-minawao:feature/adaptive-media-ui

Conversation

@GarbaJohnAshifa

Copy link
Copy Markdown

This PR makes the browsing UI less book-only and adds direct media-type browsing.

What changed:

-Added media context helpers to detect dominant library media type and build format-based filters.
-Added media-type routes and sidebar entries for: videos, audios, images, books
-Updated list and section titles to be media-aware (for example Hot/Top Rated/Read/Unread/Archived).
-Updated wording: Discover (Random Books) -> Discover, Book Details -> Content Details
-Updated detail page media action blocks so audio/video/image actions can all appear when available.
Files touched:
cps/constants.py
cps/media_context.py (new)
cps/render_template.py
cps/web.py
cps/templates/detail.html
cps/templates/index.html
cps/templates/layout.html

@holta
holta requested review from chapmanjacobd and deldesir March 9, 2026 19:41
@GarbaJohnAshifa

Copy link
Copy Markdown
Author

@tim-moody Could you please review this?

@chapmanjacobd

chapmanjacobd commented Mar 9, 2026

Copy link
Copy Markdown
Member

This PR looks good

How timely! I'm actually working on something that is a bit similar to this. I don't know if it can completely replace Calibre-Web but maybe someday. It has Media Type filters too:

https://github.com/chapmanjacobd/discotheque

Screenshot 2026-03-09 at 14-51-39 𝑑𝑖𝑠𝑐𝑜𝑡ℎ𝑒̀𝑞𝑢𝑒

@holta
holta requested a review from tim-moody March 19, 2026 16:11
@holta

holta commented Mar 19, 2026

Copy link
Copy Markdown
Member

@deldesir @tim-moody would you have the time to review this @GarbaJohnAshifa's PR here?

@tim-moody

Copy link
Copy Markdown

On a Debian 13 VM
I set the following in local vars and ran iiab-install:

calibreweb_install: True
calibreweb_enabled: True
calibreweb_repo_url: https://github.com/langdoc-minawao/calibre-web
calibreweb_version: feature/adaptive-media-ui

Ansible completed without complaints (except for the known problem of dnsmasq not installing until after a reboot)

As Admin I downloaded a youtube video and was able to like or not and make comment (looks like you have to exit the comment field or the Post button doesn't do anything)

I uploaded an image (note that url is /books for all content) and only filled in Author and rating.

Both content was visible to a Guest

As a Guest I made a comment on the image and got the following:

image

The mouse over text for the sort buttons all say book, regardless of content.

Guest viewed both the image and the video, but neither shows up in Viewed Videos or Images, and the caption says Read, not Viewed.

@deldesir

Copy link
Copy Markdown
Member

Thanks @GarbaJohnAshifa.
Looking into this right now. Will report once done...

@deldesir deldesir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like we have a book displayed as a video...
image


Sidebar displays media types as advertised.

image

The discover section on top is media-type agnostic

image

@holta

holta commented Apr 25, 2026

Copy link
Copy Markdown
Member

Looks like we have a book displayed as a video...

Any idea why? (:

cc: @chapmanjacobd

@GarbaJohnAshifa

GarbaJohnAshifa commented May 3, 2026

Copy link
Copy Markdown
Author

Looks like we have a book displayed as a video...

Any idea why? (:

cc: @chapmanjacobd

Thanks for flagging this.

The UI adapt to the dominant content type, and video appears to be dominant in this library, the root/library page is currently also labeled “Videos”. But this branch also adds a separate /videos route, so the sidebar can end up showing two different “Videos” buttons:

  • one for the general library view
  • one for the actual video-filtered view

That makes the UI ambiguous, and I should have kept that distinction clearer.

Would you prefer the root page to keep a neutral label like Library or All Content, and keep Videos only for the strict /videos route?

@holta

@holta

holta commented May 3, 2026

Copy link
Copy Markdown
Member

Would you prefer the root page to keep a neutral label like Library or All Content, and keep Videos only for the strict /videos route?

@deldesir @chapmanjacobd can you express your opinion ?

@chapmanjacobd

Copy link
Copy Markdown
Member

Makes sense to me!

"All Media"?

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.

5 participants