dhonus / jellyfin-tui

🪼 Jellyfin music streaming client for the terminal.
GNU General Public License v3.0
14 stars 2 forks source link

Filter `Artist` / `Track` etc panes if you start typing #3

Closed j6k4m8 closed 1 week ago

j6k4m8 commented 1 month ago

With a lot of artists, it would be nice to be able to type a few characters to filter the pane. Ditto the track list in an album; if I get to an album and want to listen to track 16, rather than scrolling down or hitting , I could type fonia and filter to only show 16 - Sinfonia

PS: This project rocks — gonna become my main media player :) I could take a crack at some features if you'd like extra hands!

dhonus commented 1 month ago

Hey man thanks for the kind words! Yes I will implement a local search, probably with "/" in each list - so Artists and Tracks. I might do this soon.

I'm always open to PRs if there's something that's not quite right ;) I'm mostly trying to get version 1.0 together, which is basically making it more stable, better MPRIS and probably the local search.

dhonus commented 1 month ago

Will leave this open until implemented.

dhonus commented 1 month ago

Implemented in 36deccb7995946d0353374d29b2c27c2bd9d3217

If there's any issues please continue this thread :)

dhonus commented 1 month ago

Right now it uses a substring to find the matching items. I would however like 2 more things:

  1. change the search to use a subsequence instead of substrings. So "beales" would match "The Beatles" beacuse the order of characters is correct
  2. Show the matching part in each string - meaning "bea" and "les" would be blue in the search results to show which chars are valid. Though I'm not sure if 2. wouldn't make the results hard to read, so maybe just an idea for now.

I will add this in the future, or maybe a kind soul could help with this (or point 1 at least) :)

dhonus commented 1 week ago

Finished, closing. May implement the last comment I sent in the future.