fix: add MIME type for the decrypted file

This commit is contained in:
awalol committed 2025-07-11 23:40:31 +08:00
1 parent 54f784d778
commit fbe8ef8ba1
3 files changed
+14 -4

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ import { DecipherFactory, DecipherInstance, Status } from '~/decrypt-worker/Deci
import { UnsupportedSourceFile } from '~/decrypt-worker/util/DecryptError.ts';
import { ready as umCryptoReady } from '@unlock-music/crypto';
import { go } from '~/util/go.ts';
import { detectAudioExtension } from '~/decrypt-worker/util/audioType.ts';
import { AudioMimeType, detectAudioExtension } from '~/decrypt-worker/util/audioType.ts';
class DecryptCommandHandler {
private readonly label: string;
@@ -75,7 +75,7 @@ class DecryptCommandHandler {
audioExt = 'm4a';
}
return { decrypted: URL.createObjectURL(toBlob(result.data)), ext: audioExt };
return { decrypted: URL.createObjectURL(toBlob(result.data, AudioMimeType[audioExt])), ext: audioExt };
}
}