feat: implement audio file splitting functionality

- Added `splitFile` method to `LibraryStore` for splitting audio files into segments.
- Introduced `SplitSegmentRequest` and `SegmentMetadataInput` interfaces in models for segment metadata handling.
- Created `EditModePanel` component for editing segments, including waveform visualization and metadata assignment.
- Developed `WaveformEditorCanvas` for interactive waveform editing, supporting segment creation and resizing.
- Enhanced metadata handling in IPC with new fields for author and copyright.
- Updated styles for new components and improved UI interactions.
This commit is contained in:
2025-11-11 02:45:34 +11:00
parent bb7d31e748
commit 781187c427
14 changed files with 1286 additions and 118 deletions

View File

@@ -37,7 +37,7 @@ const api: RendererApi = {
async moveFile(fileId: number, targetRelativeDirectory: string): Promise<AudioFileSummary> {
return ipcRenderer.invoke(IPC_CHANNELS.libraryMove, fileId, targetRelativeDirectory);
},
async organizeFile(fileId: number, metadata: { customName?: string | null; author?: string | null; copyright?: string | null; rating?: number }): Promise<AudioFileSummary> {
async organizeFile(fileId: number, metadata: { customName?: string; author?: string; copyright?: string; rating?: number }): Promise<AudioFileSummary> {
return ipcRenderer.invoke(IPC_CHANNELS.libraryOrganize, fileId, metadata);
},
async updateCustomName(fileId: number, customName: string | null): Promise<AudioFileSummary> {
@@ -70,7 +70,7 @@ const api: RendererApi = {
async listMetadataSuggestions(): Promise<{ authors: string[]; copyrights: string[] }> {
return ipcRenderer.invoke(IPC_CHANNELS.libraryMetadataSuggestions);
},
async updateFileMetadata(fileId: number, metadata: { author?: string | null; copyright?: string | null; rating?: number }): Promise<void> {
async updateFileMetadata(fileId: number, metadata: { author?: string; copyright?: string; rating?: number }): Promise<void> {
return ipcRenderer.invoke(IPC_CHANNELS.libraryUpdateMetadata, fileId, metadata);
},
onMenuAction(channel: string, callback: () => void): () => void {