feat(media): add play-media fzf picker for audio/video files #114

Merged
rootiest merged 1 commits from feat/play-media-fzf-picker into main 2026-08-21 06:52:24 +00:00
Owner

Summary

  • New play-media command: fzf multi-picker over audio/video files under the current directory (extension-filtered via fd), plays the selection(s) through the best available player.
  • Player resolution order: -p/--player flag → $play_media_player var → xdg-mime default handler → built-in fallback list (mpv, vlc). Launches backgrounded, mirroring open-url.
  • New _fzf_preview_media preview helper: reuses thumbnails already generated by desktop file managers (Dolphin/Nautilus/GNOME Videos) from the freedesktop thumbnail cache, falls back to ffprobe metadata, then file --brief.
  • Adds mpv/vlc as opt-tier entries in the fish-deps catalog.
  • Adds completions for -p/--player and -h/--help.

Test plan

  • fish -n syntax check on all new/changed files
  • fish-deps catalog arrays verified aligned (32 entries each)
  • fd extension filtering verified against a mixed test directory (media files only, recursive, non-media excluded)
  • _fzf_preview_media verified: missing-file path, and fallback-to-file path when no thumbnail cache entry exists
  • play-media --help output
  • Player resolution verified for all branches: invalid --player error, valid --player, $play_media_player override, xdg-mime fallthrough to built-in list, and the no-player-found error path
  • Manual interactive run in a real terminal
## Summary - New `play-media` command: fzf multi-picker over audio/video files under the current directory (extension-filtered via `fd`), plays the selection(s) through the best available player. - Player resolution order: `-p/--player` flag → `$play_media_player` var → `xdg-mime` default handler → built-in fallback list (`mpv`, `vlc`). Launches backgrounded, mirroring `open-url`. - New `_fzf_preview_media` preview helper: reuses thumbnails already generated by desktop file managers (Dolphin/Nautilus/GNOME Videos) from the freedesktop thumbnail cache, falls back to `ffprobe` metadata, then `file --brief`. - Adds `mpv`/`vlc` as `opt`-tier entries in the fish-deps catalog. - Adds completions for `-p/--player` and `-h/--help`. ## Test plan - [x] `fish -n` syntax check on all new/changed files - [x] fish-deps catalog arrays verified aligned (32 entries each) - [x] `fd` extension filtering verified against a mixed test directory (media files only, recursive, non-media excluded) - [x] `_fzf_preview_media` verified: missing-file path, and fallback-to-`file` path when no thumbnail cache entry exists - [x] `play-media --help` output - [x] Player resolution verified for all branches: invalid `--player` error, valid `--player`, `$play_media_player` override, `xdg-mime` fallthrough to built-in list, and the no-player-found error path - [x] Manual interactive run in a real terminal
rootiest added 1 commit 2026-08-21 06:48:04 +00:00
Fuzzy-filters audio/video files under the current directory via fd,
previews them with thumbnails pulled from the freedesktop thumbnail
cache (or ffprobe metadata as a fallback), and plays the selection
through the best available player: --player flag, $play_media_player,
xdg-mime default, then a short mpv/vlc fallback list. Adds mpv/vlc as
optional fish-deps entries.
rootiest merged commit 8b9d0ac1f4 into main 2026-08-21 06:52:24 +00:00
rootiest deleted branch feat/play-media-fzf-picker 2026-08-21 06:52:25 +00:00
Sign in to join this conversation.