- Remove tokio async runtime dependency (~2MB reduction)
- Optimize fuzzy search to avoid string allocations
- Optimize incremental search to only rebuild tree when needed
- Extract duplicate scrolling logic to helper function
- Replace magic numbers with named constants
- Fix terminal cleanup to run even on error
- Fix context menu item count mismatch
- Remove unused metadata fields (duration, codec, hash)
When rapidly pressing play/pause, MPV briefly reports idle-active
as true during state transitions. Combined with our player_state
being set to Playing after unpause, this incorrectly triggered the
auto-play next track logic.
Fix: Add is_paused() check to auto-play condition to ensure we only
advance to next track when the current track actually ends, not
during pause state transitions.
Add Left/Right arrow keys as alternatives to h/l for collapsing
and expanding folders in the file panel. Provides more intuitive
navigation for users not familiar with vim keybindings.
- Left arrow: Collapse selected folder (same as 'h')
- Right arrow: Expand selected folder (same as 'l')
When MPV is paused and a new file is loaded via loadfile command,
MPV loads the file but remains in a paused state. This caused the
UI to show "Playing" while no audio was actually playing.
Fix: Explicitly call resume() after every play() call to ensure
MPV unpauses when loading new files. This applies to:
- Playing new folder/file selections
- Playing from playlist
- Auto-play next/previous track
- Removing currently playing track from playlist
Fixes bug where after pause, playing another folder would show
"Playing" status but remain silent at 00:00.
Extract duplicate logic into shared action functions to ensure
consistent behavior between keyboard and mouse interactions:
- action_remove_from_playlist: Unified playlist removal logic
- action_play_from_playlist: Unified playlist playback with optional
pause state preservation
- handle_context_menu_action: Unified context menu execution
Fixes:
- Remove from playlist now checks index before removal (was broken
in keyboard 'd' handler)
- Mouse double-click on playlist now preserves pause state
- Context menu handling no longer duplicated across 400+ lines
All keyboard and mouse actions now use identical code paths,
eliminating state bugs from inconsistent implementations.
Change position update logic to only trigger redraw when the
displayed value (rounded to seconds) changes, not when the raw
float value changes. This eliminates jumpy time display and
reduces unnecessary redraws.
Move cache duration update from update_properties (~10Hz) to
update_metadata (~0.5Hz) to match the refresh rate of codec,
bitrate, and sample rate. All bottom status bar metrics now
update at the same frequency.
- Remove buffer mode toggle (Normal/Large/Huge) as demuxer settings
do not significantly impact local file playback
- Move cache duration metric from title bar to bottom status bar
- Display cache alongside codec, bitrate, and sample rate info
- Remove 'b' key binding and Buffer context menu option
- Update version to 0.1.15
- Add nerd font file type icons:
- Folder icons: closed/open folders with visual state
- Music files: icon in green (mp3, flac, wav, ogg, etc.)
- Video files: icon in yellow (mp4, mkv, avi, mov, etc.)
- Add spacing after icons for better readability
- Add "Refresh" option to title bar right-click menu
- Make all context menus more compact (13 chars wide)
- Change panel titles to lowercase:
- "Media Files" → "files"
- "Playlist" → "playlist"
- Remove bold styling from focused panel titles
- All icons show as bold black on selection bar
- Folders show in blue, music in green, video in yellow
- Fix cascading track failures when files can't be loaded
- Add position check (>0.5s) to prevent auto-advance on failed tracks
- Fix playlist scroll jumping when browsing while tracks auto-advance
- Only auto-scroll playlist when not focused on playlist panel
- Fix selector bar getting hidden by "... X more below" indicator
- Add effective height calculation for all navigation functions
- Fix Ctrl-U/D page scrolling in both panels
- Add play mode system (Normal/Loop) with 'm' key toggle
- Add Shift+R to randomize playlist order
- Add right-click context menus:
- Playlist: Remove, Randomise
- Title bar: Stop, Loop, Refresh
- Make context menus more compact (13 chars wide)
- Show play mode indicator in title bar ([Loop])
- Add incremental search support in playlist panel
- Fix search scrolling to account for bottom indicator
- Show search query in status bar when navigating results
- Change search text to white color
- Improve double-click detection and single-click selection
- Add focus indicators (bold title for active panel)
- Hide selector bar in inactive panel
- Add bounds checking to prevent accessing invalid playlist indices
- Yellow/orange selection bar when in search mode
- Validate playlist index after navigation operations
- Handle empty playlists gracefully
Metadata features:
- Display artist, album, title in bottom status bar (left-aligned)
- Display bitrate, codec, sample rate in bottom status bar (right-aligned)
- Fetch metadata from MPV using metadata/by-key properties
- Support both lowercase and uppercase metadata tags
Performance optimizations:
- Split property updates: fast updates (position/duration) vs slow (metadata)
- Update metadata only every 2 seconds instead of every 100ms
- Skip MPV property updates entirely when stopped
- Conditional UI redraws - only when state actually changes
- Variable poll rate: 200ms when stopped, 100ms when playing
- Position update throttling (0.5s minimum change)
- Reduces CPU usage from constant 10 FPS to ~0.1 FPS when idle
Search mode improvements:
- Search results persist until explicitly cleared
- Bold black highlighted chars on selection bar
- Fix fuzzy match scoring to select first occurrence
- Search info moved to bottom status bar
Keybinding changes:
- J/K for next/prev track (was n/p)
- H/L for seeking (was arrow keys)
- Simplified status bar shortcuts
UI improvements:
- Dynamic title bar color (green=playing, blue=paused, gray=stopped)
- White bold text for current playlist item
- Removed mouse capture for terminal text selection
Bug fixes:
- Fix auto-advance triggering multiple times when restarting from stopped state
- Current track shown with bold text instead of selection highlight
- Green bold for playing, blue for paused, yellow for stopped
- Cleaner visual appearance
- Bump version to 0.1.8
- Add vim-style h key: closes folders and jumps to parent
- Implement stop() method in player for proper playback stopping
- Add space key to restart playback when stopped
- Add playlist color coding: green (playing), blue (paused), yellow (stopped)
- Fix n/p keys to preserve player state when switching tracks
- Implement vim-style visual mode with v key for multi-file selection
- Visual mode exits automatically on play/add actions
- Remove unused play_previous method
- Bump version to 0.1.7
- Remove libmpv dependency to avoid version mismatch issues
- Spawn mpv as subprocess with --input-ipc-server
- Communicate via Unix socket with JSON IPC protocol
- Add update_properties() to poll MPV state
- No linking required, only mpv binary needed at runtime
- More stable and portable across MPV versions
- Add Cargo project with TUI and async dependencies
- Implement cache-only architecture for low bandwidth operation
- Add file scanner with media type detection
- Create two-panel TUI layout (file tree and status)
- Add config file support for scan path management
- Implement XDG-compliant cache and config directories
- Add Gitea CI/CD workflow for automated releases