feat: v0.0.1 - Core audio player with library, playlists and theming#1
feat: v0.0.1 - Core audio player with library, playlists and theming#1devohmycode merged 4 commits intomainfrom
Conversation
… .gitignore - Add playlist track reordering with Up/Down buttons (MoveTrackInPlaylist in LibraryManager) - Add Queue tab with reorder support and Play Next / Add to Queue actions - Replace MenuFlyout context menus with Raycast-style ActionPanel flyouts - Add drag-and-drop audio files from Explorer into the player - Add Reset Library option in Settings - Add .gitignore and remove bin/obj from tracking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 198 files, which is 48 over the limit of 150. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (102)
📒 Files selected for processing (198)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review Summary by QodoAdd playlists, queue management, theme selection, and Raycast-style menus
WalkthroughsDescription• Add playlist management with create, rename, delete, and track reordering • Implement queue view with reorder controls and drag-drop from Explorer • Add theme selection (System/Light/Dark) with persistent storage • Replace context menus with Raycast-style ActionPanel flyouts • Add navigation tabs for Library, Playlists, and Queue views • Implement ThemeHelper for theme-aware brush resolution in code-behind Diagramflowchart LR
A["User Actions"] -->|Create/Rename/Delete| B["Playlist Management"]
A -->|Add/Reorder| C["Queue Management"]
A -->|Select Theme| D["Theme System"]
A -->|Right-click| E["ActionPanel Menus"]
A -->|Drag Files| F["Drop Handler"]
B --> G["LibraryManager"]
C --> H["QueueManager"]
D --> I["ThemeHelper"]
E --> J["Context Menus"]
F --> K["Track Metadata"]
G --> L["SQLite DB"]
H --> M["queue.json"]
I --> N["ElementTheme"]
File Changes1. Audiomatic/MainWindow.xaml.cs
|
Code Review by Qodo
1. Duplicate drag-drop track IDs
|
| private static TrackInfo? ReadTrackMetadata(string filePath) | ||
| { | ||
| try | ||
| { | ||
| using var tagFile = TagLib.File.Create(filePath); | ||
| return new TrackInfo | ||
| { | ||
| Id = -1, | ||
| Path = filePath, | ||
| Title = string.IsNullOrWhiteSpace(tagFile.Tag.Title) | ||
| ? Path.GetFileNameWithoutExtension(filePath) | ||
| : tagFile.Tag.Title.Trim(), | ||
| Artist = tagFile.Tag.FirstPerformer?.Trim() ?? "", | ||
| Album = tagFile.Tag.Album?.Trim() ?? "", | ||
| DurationMs = (int)tagFile.Properties.Duration.TotalMilliseconds, | ||
| TrackNumber = (int)tagFile.Tag.Track, | ||
| Year = (int)tagFile.Tag.Year, | ||
| Genre = tagFile.Tag.FirstGenre ?? "" | ||
| }; |
There was a problem hiding this comment.
1. Duplicate drag-drop track ids 🐞 Bug ✓ Correctness
MainWindow.ReadTrackMetadata assigns Id = -1 to every dragged-in TrackInfo, but QueueManager uses TrackInfo.Id to locate the current track during shuffle and when recalculating the current index after reorders. With multiple dragged files, Id-based matching will hit the wrong item (first -1), causing the wrong track to be treated as current after shuffle/reorder.
Agent Prompt
## Issue description
Dragged-in tracks are created with `Id = -1` for all items. Queue operations (shuffle/reorder/restore) rely on `Id` equality to relocate the current track, so multiple `-1` tracks make current-track matching ambiguous.
## Issue Context
Library tracks have stable positive IDs from SQLite; drag-drop tracks are not in the DB so their IDs need a different identity strategy.
## Fix Focus Areas
- Audiomatic/MainWindow.xaml.cs[1328-1346]
- Audiomatic/Services/QueueManager.cs[124-135]
- Audiomatic/Services/QueueManager.cs[207-242]
## Suggested fix
- Option A (recommended): Update QueueManager to match tracks by `Path` (case-insensitive) instead of `Id`, or to fall back to `Path` when `Id <= 0`.
- Option B: Assign unique temporary IDs for dragged-in tracks (e.g., a monotonically-decreasing negative counter or a hash of normalized path) and ensure all queue identity comparisons use that stable value.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
Test plan
🤖 Generated with Claude Code