mirror of
https://github.com/litruv/AudioSort.git
synced 2026-07-24 10:46:03 +10:00
feat: enhance waveform editor with playback controls and segment interaction
- Added onPlayFromCursor and playbackCursorMs props to WaveformEditorCanvas for playback control. - Implemented visual feedback for segment selection and hover states, including color adjustments and labels. - Introduced smooth cursor animation for better user experience during interaction. - Enhanced segment metadata handling in types and IPC for better integration with the library. - Added focusOnFile method in LibraryStore to manage file selection and refresh. - Updated styles for edit mode, including new classes for waveform and playback controls. - Introduced new IPC channel for splitting audio files and updated related interfaces. - Added parentFileId to AudioFileSummary for tracking source files. - Implemented tests for tagging service to ensure metadata integrity and tag preservation. - Created scrubWorklet and assets type definitions for future audio processing features.
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
AudioFileSummary,
|
||||
CategoryRecord,
|
||||
LibraryScanSummary,
|
||||
SplitSegmentRequest,
|
||||
TagUpdatePayload
|
||||
} from '../shared/models';
|
||||
|
||||
@@ -37,7 +38,10 @@ 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; author?: string; copyright?: string; rating?: number }): Promise<AudioFileSummary> {
|
||||
async organizeFile(
|
||||
fileId: number,
|
||||
metadata: { customName?: string | null; author?: string | null; copyright?: string | null; rating?: number }
|
||||
): Promise<AudioFileSummary> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.libraryOrganize, fileId, metadata);
|
||||
},
|
||||
async updateCustomName(fileId: number, customName: string | null): Promise<AudioFileSummary> {
|
||||
@@ -49,6 +53,9 @@ const api: RendererApi = {
|
||||
async deleteFiles(fileIds: number[]): Promise<void> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.libraryDelete, fileIds);
|
||||
},
|
||||
async splitFile(fileId: number, segments: SplitSegmentRequest[]): Promise<AudioFileSummary[]> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.librarySplit, fileId, segments);
|
||||
},
|
||||
async getAudioBuffer(fileId: number): Promise<AudioBufferPayload> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.libraryBuffer, fileId);
|
||||
},
|
||||
@@ -70,7 +77,10 @@ const api: RendererApi = {
|
||||
async listMetadataSuggestions(): Promise<{ authors: string[]; copyrights: string[] }> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.libraryMetadataSuggestions);
|
||||
},
|
||||
async updateFileMetadata(fileId: number, metadata: { author?: string; copyright?: string; rating?: number }): Promise<void> {
|
||||
async updateFileMetadata(
|
||||
fileId: number,
|
||||
metadata: { author?: string | null; copyright?: string | null; rating?: number }
|
||||
): Promise<void> {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.libraryUpdateMetadata, fileId, metadata);
|
||||
},
|
||||
onMenuAction(channel: string, callback: () => void): () => void {
|
||||
|
||||
Reference in New Issue
Block a user