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
This commit is contained in:
parent
81908beb75
commit
e44c9e5bba
60
CLAUDE.md
60
CLAUDE.md
@ -38,40 +38,40 @@ paths = [
|
||||
4. Playback uses cached file paths
|
||||
5. Rescan command/keybinding to refresh cache
|
||||
|
||||
### Implementation Plan
|
||||
## Features
|
||||
|
||||
**Phase 1: Foundation + Cache System (CRITICAL)**
|
||||
- Create Cargo.toml with dependencies (ratatui, crossterm, libmpv-rs, tokio, serde)
|
||||
- Set up cache directory structure (XDG_CACHE_HOME/cm-player/)
|
||||
- Implement cache serialization/deserialization
|
||||
- File metadata cache schema (path, size, duration, codec, hash)
|
||||
- Config file parsing (scan paths)
|
||||
- Basic TUI two-panel layout
|
||||
- State management with cache integration
|
||||
### Core Functionality
|
||||
- **Cache-Only Operation** - Browse media from cached file structure, no direct filesystem access
|
||||
- **MPV Integration** - Playback via MPV IPC (subprocess), no library linking required
|
||||
- **Playlist Management** - Play single files, entire directories, or marked files
|
||||
- **File Marking** - Mark multiple files to create custom playlists
|
||||
- **Tree Navigation** - Vim-style keybindings for browsing collapsible directory structure
|
||||
- **Manual Library Refresh** - User-controlled scanning with 'r' key
|
||||
|
||||
**Phase 2: File Scanner with Caching**
|
||||
- Directory traversal with media filtering (.mp3, .mp4, .mkv, .flac, etc.)
|
||||
- Write all metadata to cache immediately
|
||||
- Load from cache on startup (instant)
|
||||
- Background refresh/validation
|
||||
- Display cached structure in left panel with tree navigation
|
||||
### UI Layout (cm-dashboard style)
|
||||
- **Title Bar** - Shows player state (Playing/Paused/Stopped/Refreshing)
|
||||
- **Left Panel** - Cached media file tree with vim navigation
|
||||
- **Right Panel** - Player info (progress, volume) + Playlist view
|
||||
- **Status Bar** - Centered help text with all keybindings
|
||||
|
||||
**Phase 3: MPV Integration**
|
||||
- Initialize libmpv
|
||||
- Playback from cached file paths
|
||||
- Status display in right panel
|
||||
- Event handling (position, duration, state)
|
||||
### Keybindings
|
||||
- `j/k` or `↑↓` - Navigate files
|
||||
- `h/l` - Collapse/expand directories
|
||||
- `t` - Mark/unmark file
|
||||
- `c` - Clear all marks
|
||||
- `Enter` - Play (priority: marked files > directory > single file)
|
||||
- `Space` - Pause/resume
|
||||
- `← →` - Seek backward/forward 10 seconds
|
||||
- `+ -` - Volume up/down by 5%
|
||||
- `n/p` - Next/previous track in playlist
|
||||
- `r` - Rescan library (manual refresh)
|
||||
- `q` - Quit
|
||||
|
||||
**Phase 4: Player Controls**
|
||||
- Keyboard shortcuts (space: pause, q: quit, arrows: navigate/seek, r: rescan)
|
||||
- Volume control
|
||||
- Progress bar
|
||||
- Playlist/queue (cached)
|
||||
|
||||
**Phase 5: Polish**
|
||||
- Error handling
|
||||
- Bandwidth optimization validation
|
||||
- CI integration with release workflow
|
||||
### Technical Details
|
||||
- **MPV IPC** - Communicates with mpv via Unix socket and JSON protocol
|
||||
- **No Version Lock** - Uses mpv binary, not libmpv library (avoids version mismatch)
|
||||
- **Logging** - Redirected to `/tmp/cm-player.log` to avoid TUI interference
|
||||
- **Auto-advance** - Automatically plays next track when current ends
|
||||
|
||||
## Automated Binary Release System
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user