taglib-wasm
Version:
TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps
44 lines • 1.35 kB
TypeScript
/**
* Copy cover art from one audio file to another
*
* @param sourcePath - Path to source audio file
* @param targetPath - Path to target audio file (modified in place)
* @param options - Copy options
* @returns Promise that resolves when cover art is copied
* @throws Error if source has no cover art
*
* @example
* ```typescript
* // Copy cover art from one file to another
* await copyCoverArt("album/track01.mp3", "album/track02.mp3");
*
* // Copy all pictures
* await copyCoverArt("source.mp3", "target.mp3", { copyAll: true });
* ```
*/
export declare function copyCoverArt(sourcePath: string, targetPath: string, options?: {
copyAll?: boolean;
}): Promise<void>;
/**
* Check if cover art files exist for an audio file
*
* Looks for common cover art filenames in the same directory as the audio file.
*
* @param audioPath - Path to the audio file
* @returns Object with found cover art paths
*
* @example
* ```typescript
* const covers = await findCoverArtFiles("music/album/track01.mp3");
* if (covers.front) {
* await importCoverArt("music/album/track01.mp3", covers.front);
* }
* ```
*/
export declare function findCoverArtFiles(audioPath: string): Promise<{
front?: string;
back?: string;
folder?: string;
[key: string]: string | undefined;
}>;
//# sourceMappingURL=copy-and-find.d.ts.map