(inputPath: string, outputPath: string)
| 194 | return fs.existsSync(outputPath); |
| 195 | } catch (error) { |
| 196 | console.error("Video conversion failed:", error); |
| 197 | return false; |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | async addMetadataAndCover(inputMp3: string, outputPath: string, metadata: SongInfo, coverPath?: string): Promise<boolean> { |
| 202 | try { |
| 203 | const args: string[] = ["-i", inputMp3, "-c:a", "copy", "-id3v2_version", "3"]; |
| 204 | if (coverPath) { |
| 205 | args.push("-i", coverPath, "-map", "0:a", "-map", "1:v", "-disposition:v:0", "attached_pic"); |
| 206 | } |
| 207 | args.push("-metadata", `title=${metadata.title}`); |
no test coverage detected