- Shell 53.2%
- JavaScript 46.8%
| 99-ekaii-clearfilters.sh | ||
| ekaii-clearfilters.js | ||
| LICENSE | ||
| README.md | ||
jellyfin-clearfilters
Adds a Clear all filters button and active-filter counters to the Jellyfin
library filter panel (cine.ekaii.fr). Pure client-side: no plugin, no fork,
no server changes.
What it does
- A "Clear all filters" button at the top of the filter panel with a live count of currently-active filters. One click unchecks every filter across all sections (Filters, Features, Genres, Parental Ratings, Tags, Years, Status) and the library re-queries through Jellyfin's own change handlers.
- A count badge on each collapsible section header (e.g.
Tags 3), shown even while the section is collapsed, so active filters are visible at a glance. - Reload-safe: the script watches the panel's asynchronous population and Jellyfin re-checking saved filters after a reload, so the counts and button stay correct — not just on live toggles.
Targets the classic filterdialog UI (.filterDialog, [is="emby-collapse"],
.collapseContent).
Files
ekaii-clearfilters.js— the feature, loaded by a<script>tag injected into Jellyfin'sindex.html. Standalone copy for review/editing.99-ekaii-clearfilters.sh— self-contained injector with the JS embedded. Writes the JS into the web root and (re)injects a versioned<script>tag. Idempotent and version-aware: strips any prior tag, injects the currentVER. Doubles as the LinuxServercustom-cont-init.dhook.
Deployment (cine.ekaii.fr — LinuxServer image, Coolify service id 5)
The web UI lives at /usr/share/jellyfin/web inside the image, so edits are
wiped on container recreate. Persistence uses the LinuxServer
custom-cont-init.d hook, which re-runs the injector on every container start.
-
Injector on the NAS host (mode 755):
/mnt/services/jellyfin-nas/webmods/99-ekaii-clearfilters.sh -
Bind mount added to the Coolify
docker_compose_raw(DB) for thejellyfinservice — regenerated to disk on every redeploy:volumes: - '/mnt/services/jellyfin-nas/webmods/99-ekaii-clearfilters.sh:/custom-cont-init.d/99-ekaii-clearfilters.sh:ro'
On start the hook logs [ekaii-clearfilters] done. A plain restart keeps the
already-injected files; a recreate/redeploy re-applies them via the hook.
Manual apply (no recreate)
docker exec -i jellyfin-<id> bash -s < 99-ekaii-clearfilters.sh
(then hard-reload the browser once — service-worker cache)
Updating
Edit ekaii-clearfilters.js, re-embed it into 99-ekaii-clearfilters.sh, bump
VER in the injector (cache-bust), copy to the NAS path, then redeploy or run
the manual-apply command above.
Rollback
Remove the bind-mount line from docker_compose_raw and recreate, or for an
immediate revert strip the tag:
docker exec jellyfin-<id> sed -i "s#<script defer src='ekaii-clearfilters.js[^']*'></script>##" /usr/share/jellyfin/web/index.html
Notes
- No server, DB, or Meilisearch changes — only the static web shell.
- The injector's embedded JS is the deployed source of truth; the standalone
ekaii-clearfilters.jsis the same code kept separate for review.