35 Commits

Author SHA1 Message Date
ed6765039c Add nerd font icons and UI polish
All checks were successful
Build and Release / build-and-release (push) Successful in 1m18s
- 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
v0.1.14
2025-12-08 23:07:28 +01:00
f60ff02b2a Improve playlist handling and add UI enhancements
All checks were successful
Build and Release / build-and-release (push) Successful in 1m19s
- 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
v0.1.13
2025-12-08 19:53:32 +01:00
59f9f548c1 Add playlist bounds validation and search mode visual indicator
All checks were successful
Build and Release / build-and-release (push) Successful in 1m1s
- 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
v0.1.12
2025-12-07 16:02:44 +01:00
248c5701fb Refactor mouse and keyboard handlers with shared actions
All checks were successful
Build and Release / build-and-release (push) Successful in 1m24s
- Extract common action functions to eliminate code duplication
- Mouse left-click toggles folder open/close
- Mouse right-click plays selection (identical to Enter key)
- Add confirmation popup for library refresh operation
- Improve popup visibility with Clear widget
v0.1.11
2025-12-07 13:56:52 +01:00
0cef231cd3 Add metadata display and optimize CPU usage
All checks were successful
Build and Release / build-and-release (push) Successful in 58s
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
v0.1.10
2025-12-06 23:07:33 +01:00
ae80e9a5db Improve search mode UX and fix playback bugs
All checks were successful
Build and Release / build-and-release (push) Successful in 51s
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
v0.1.9
2025-12-06 22:14:57 +01:00
1b07026b68 Replace playlist selection with bold colored text
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
- 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
v0.1.8
2025-12-06 17:40:06 +01:00
f9534bacf3 Implement vim-style navigation and visual mode
All checks were successful
Build and Release / build-and-release (push) Successful in 51s
- 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
v0.1.7
2025-12-06 17:35:11 +01:00
006aeb0c90 Add comprehensive technical README
- Document architecture and core components
- Include all keybindings and features
- Explain fuzzy search algorithm and MPV IPC integration
- Detail automated release process and CI/CD workflow
- Add troubleshooting section
- Include installation and configuration instructions
2025-12-06 16:56:15 +01:00
586c0b88eb Change stop key to 's' for better compatibility
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
- Replace Shift+Space with 's' key for stop functionality
- Update status bar shortcuts to reflect the change
- Bump version to 0.1.5
v0.1.5
2025-12-06 16:42:44 +01:00
8e2989731e Add Shift+Space to stop playback
- Shift+Space now stops playback and resets position
- Updated status bar to show stop shortcut
- Shortened status bar text to fit stop command
2025-12-06 16:30:28 +01:00
bda76ba5a0 Bump version to 0.1.4
All checks were successful
Build and Release / build-and-release (push) Successful in 50s
v0.1.4
2025-12-06 16:23:16 +01:00
c4adb30d7b Fix NixOS hash update to use local tarball
Use local tarball hash instead of downloading to avoid race condition where download happens before upload completes
2025-12-06 16:22:13 +01:00
3ab70950e0 Bump version to 0.1.3
All checks were successful
Build and Release / build-and-release (push) Successful in 50s
v0.1.3
2025-12-06 16:08:45 +01:00
f2f79cc0d2 Add video support and improve mpv process management
- Enable video playback by removing --no-video flag
- Add --profile=fast for better performance
- Add --audio-display=no to prevent cover art windows
- Implement mpv process respawn when closed
- Add process death detection and cleanup
- Show refresh status immediately in title bar
- Fix playlist playback after clearing
2025-12-06 16:07:50 +01:00
4b2757b17f Bump version to 0.1.2
All checks were successful
Build and Release / build-and-release (push) Successful in 57s
v0.1.2
2025-12-06 15:57:19 +01:00
bee25505c0 Bump version to 0.1.1
All checks were successful
Build and Release / build-and-release (push) Successful in 50s
v0.1.1
2025-12-06 15:24:48 +01:00
b4084b9dcf Fix NixOS config path in release workflow 2025-12-06 15:23:43 +01:00
7b20b121d9 Remove unused code and fix compiler warnings
Some checks failed
Build and Release / build-and-release (push) Failing after 1m22s
v0.1.0
2025-12-06 14:43:29 +01:00
b535d0e9cb Improve search and playlist management
- Add folder priority boost in fuzzy search scoring
- Show search results in top status bar after Enter
- Change keybindings: v for mark, a for add to playlist, c for clear
- Add playlist management: add_to_playlist() and clear_playlist()
- Fix playlist index reset when clearing playlist
- Display incremental search status in bottom bar while typing
2025-12-06 14:40:53 +01:00
e44c9e5bba Update CLAUDE.md with completed features
- Replace implementation plan with feature documentation
- Document all keybindings
- Add technical details about MPV IPC
- List UI layout structure
- Mark all phases as complete
2025-12-06 13:15:02 +01:00
81908beb75 Add seek and volume controls
- Left/Right arrows: seek backward/forward 10 seconds
- +/- keys: adjust volume by 5% increments
- Volume clamped between 0-100%
- Only allow seeking when track is playing
- Update status bar help text with new controls
2025-12-06 13:13:49 +01:00
cc86f8eb55 Implement cm-dashboard style layout
- Add title bar at top: 'cm-player • Playing/Stopped' (cyan bg)
- Three-section vertical layout: title, content, status bar
- Content area: left (files) | right (player + playlist)
- Bottom status bar centered with • separators
- Player state moved to title bar
- Progress and volume in Player panel
- Matches cm-dashboard layout structure
2025-12-06 13:11:19 +01:00
7f5aa7602d Reorganize UI layout with playlist panel and status bar
- Merge Status, Progress, Volume into one compact top panel
- Add Playlist panel showing queue with highlighted current track
- Move help to bottom status bar (cm-dashboard style)
- Bottom bar shows all keybindings in one line
- Right panel now: Status (top) + Playlist (bottom)
- Current playing track highlighted in cyan in playlist
2025-12-06 13:08:04 +01:00
71b43d644c Show refreshing status during library scan
- Add is_refreshing flag to AppState
- Display 'Refreshing library...' in status panel during scan
- Note: scan is currently blocking, message may be brief
- Infrastructure ready for future async scanning
2025-12-06 13:04:00 +01:00
afc58a7920 Redirect logging to file to avoid TUI interference
- Logs now written to /tmp/cm-player.log
- Clean TUI display without INFO messages
- Logs still available for debugging
2025-12-06 13:00:33 +01:00
43951a200d Remove automatic cache scan on startup
- Cache is now only refreshed when user presses 'r'
- Empty cache on first launch - user must manually scan
- More explicit control over library updates
2025-12-06 12:57:51 +01:00
c0fd204b97 Replace libmpv with MPV IPC subprocess approach
- 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
2025-12-06 12:54:56 +01:00
e840aa9b26 Implement MPV integration for audio/video playback
- Initialize libmpv with audio-only configuration
- Implement play, pause, resume, stop, seek controls
- Add position and duration tracking from MPV
- Auto-advance to next track when current ends
- Update keybindings to use actual player
- Add shell.nix for development environment with libmpv
- Real playback now working with Enter/Space/n/p keys
2025-12-06 12:49:46 +01:00
0093db98c2 Add playlist support with marking and folder playback
- Mark files with 't' key (shown with * prefix in yellow)
- Clear marks with 'c' key
- Enter plays: marked files > whole folder > single file
- Navigate playlist with 'n' (next) and 'p' (previous)
- Show playlist position in status (e.g., "song.mp3 [3/10]")
- Collect all files recursively when playing folder
- Remove emoji icons from status panel
- Update help text with new keybindings
2025-12-06 12:46:15 +01:00
e906fbf294 Remove expand/collapse markers from UI
- Clean display with only directory names and / suffix
- No [+] or [-] markers shown
- Directories still expand/collapse with h/l
- Minimal vifm-style appearance
2025-12-06 12:41:54 +01:00
d7c1710482 Start with all directories collapsed
- Directories now start collapsed by default (vifm-style)
- User must press 'l' to expand directories
- Preserves expanded state during rescan
- Remove unused collect_all_dirs function
2025-12-06 12:40:53 +01:00
8104f54887 Add vim bindings and directory expand/collapse
- Replace arrow keys with j/k for navigation
- Add h/l for collapse/expand directories
- Remove emoji icons, use clean text markers
- Show directories with [-]/[+] expand markers
- Track expanded state per directory path
- Add directory suffix (/) for clarity
- Update help text with vim bindings
2025-12-06 12:39:11 +01:00
7ce264fd96 Implement Phase 1: Foundation and cache system
- 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
2025-12-06 12:32:17 +01:00
a1fd8eb6e5 Initial commit 2025-12-06 12:00:46 +01:00