taglib-wasm 1.8.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/disc-folder.d.ts +19 -0
- package/dist/disc-folder.d.ts.map +1 -0
- package/dist/disc-folder.js +550 -0
- package/dist/index.browser.d.ts +3 -4
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +171 -173
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -13
- package/dist/simple.browser.js +164 -30
- package/dist/src/constants/complex-properties.d.ts +0 -114
- package/dist/src/constants/complex-properties.d.ts.map +1 -1
- package/dist/src/constants/complex-properties.js +0 -55
- package/dist/src/constants/index.d.ts +0 -1
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +0 -1
- package/dist/src/file-utils/import-operations.d.ts.map +1 -1
- package/dist/src/file-utils/import-operations.js +1 -1
- package/dist/src/folder-api/file-processors.d.ts.map +1 -1
- package/dist/src/folder-api/file-processors.js +6 -5
- package/dist/src/folder-api/scan-for-albums.js +3 -3
- package/dist/src/folder-api/scan-operations.js +2 -2
- package/dist/src/msgpack/decoder.d.ts.map +1 -1
- package/dist/src/msgpack/decoder.js +5 -6
- package/dist/src/msgpack/encoder.d.ts.map +1 -1
- package/dist/src/msgpack/encoder.js +4 -3
- package/dist/src/runtime/module-loader.d.ts.map +1 -1
- package/dist/src/runtime/module-loader.js +3 -3
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts +8 -0
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/file-handle.js +32 -1
- package/dist/src/simple/batch-operations.d.ts.map +1 -1
- package/dist/src/simple/batch-operations.js +14 -10
- package/dist/src/simple/picture-operations.js +1 -1
- package/dist/src/taglib/audio-file-base.d.ts +15 -9
- package/dist/src/taglib/audio-file-base.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-base.js +35 -4
- package/dist/src/taglib/audio-file-impl.d.ts +2 -2
- package/dist/src/taglib/audio-file-impl.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-impl.js +25 -13
- package/dist/src/taglib/audio-file-interface.d.ts +27 -6
- package/dist/src/taglib/audio-file-interface.d.ts.map +1 -1
- package/dist/src/taglib/auto-dispose.d.ts +6 -0
- package/dist/src/taglib/auto-dispose.d.ts.map +1 -0
- package/dist/src/taglib/auto-dispose.js +13 -0
- package/dist/src/taglib/embind-adapter.d.ts +2 -2
- package/dist/src/taglib/embind-adapter.d.ts.map +1 -1
- package/dist/src/taglib/embind-adapter.js +17 -0
- package/dist/src/taglib/extra-state-registry.d.ts.map +1 -1
- package/dist/src/taglib/extra-state-registry.js +9 -0
- package/dist/src/taglib/metadata-extent.d.ts.map +1 -1
- package/dist/src/taglib/metadata-extent.js +44 -1
- package/dist/src/taglib/mutable-tag.d.ts +15 -15
- package/dist/src/taglib/mutable-tag.d.ts.map +1 -1
- package/dist/src/taglib/save-reconstruct.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.d.ts.map +1 -1
- package/dist/src/types/tags.d.ts +0 -4
- package/dist/src/types/tags.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/wasm.d.ts +20 -1
- package/dist/src/wasm.d.ts.map +1 -1
- package/dist/src/web-utils/canvas.d.ts.map +1 -1
- package/dist/src/web-utils/canvas.js +6 -1
- package/dist/src/web-utils/data-url.js +1 -1
- package/dist/taglib-wasi.wasm +0 -0
- package/dist/taglib-web.wasm +0 -0
- package/package.json +18 -10
- package/dist/src/constants/tags.d.ts +0 -81
- package/dist/src/constants/tags.d.ts.map +0 -1
- package/dist/src/constants/tags.js +0 -86
package/dist/index.browser.js
CHANGED
|
@@ -1716,6 +1716,23 @@ var init_mutable_tag_impl = __esm({
|
|
|
1716
1716
|
}
|
|
1717
1717
|
});
|
|
1718
1718
|
|
|
1719
|
+
// src/taglib/auto-dispose.ts
|
|
1720
|
+
function registerAutoDispose(target, handle) {
|
|
1721
|
+
registry.register(target, handle, target);
|
|
1722
|
+
}
|
|
1723
|
+
function unregisterAutoDispose(target) {
|
|
1724
|
+
registry.unregister(target);
|
|
1725
|
+
}
|
|
1726
|
+
var registry;
|
|
1727
|
+
var init_auto_dispose = __esm({
|
|
1728
|
+
"src/taglib/auto-dispose.ts"() {
|
|
1729
|
+
"use strict";
|
|
1730
|
+
registry = new FinalizationRegistry((handle) => {
|
|
1731
|
+
handle.destroy();
|
|
1732
|
+
});
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1719
1736
|
// src/taglib/audio-file-base.ts
|
|
1720
1737
|
var LYRICS_PROPERTY_KEY, LYRICS_WIRE_KEY, EMPTY_KEY_SET, BaseAudioFileImpl;
|
|
1721
1738
|
var init_audio_file_base = __esm({
|
|
@@ -1725,6 +1742,7 @@ var init_audio_file_base = __esm({
|
|
|
1725
1742
|
init_errors2();
|
|
1726
1743
|
init_mp4_item_names();
|
|
1727
1744
|
init_mutable_tag_impl();
|
|
1745
|
+
init_auto_dispose();
|
|
1728
1746
|
LYRICS_PROPERTY_KEY = "lyrics";
|
|
1729
1747
|
LYRICS_WIRE_KEY = toTagLibKey(LYRICS_PROPERTY_KEY);
|
|
1730
1748
|
EMPTY_KEY_SET = /* @__PURE__ */ new Set();
|
|
@@ -1745,6 +1763,7 @@ var init_audio_file_base = __esm({
|
|
|
1745
1763
|
this.isPartiallyLoaded = isPartiallyLoaded;
|
|
1746
1764
|
this.partialLoadOptions = partialLoadOptions;
|
|
1747
1765
|
this.partialKeysAtLoad = isPartiallyLoaded ? new Set(Object.keys(fileHandle.getProperties())) : void 0;
|
|
1766
|
+
registerAutoDispose(this, fileHandle);
|
|
1748
1767
|
}
|
|
1749
1768
|
/**
|
|
1750
1769
|
* Wire-key text properties present in the partial header at load but now
|
|
@@ -1804,16 +1823,36 @@ var init_audio_file_base = __esm({
|
|
|
1804
1823
|
this.handle.setProperties(translated);
|
|
1805
1824
|
}
|
|
1806
1825
|
getProperty(key) {
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1826
|
+
const wireKey = toTagLibKey(fromTagLibKey(key));
|
|
1827
|
+
const values = this.handle.getProperties()[wireKey]?.filter(
|
|
1828
|
+
(v) => v !== ""
|
|
1829
|
+
);
|
|
1830
|
+
if (values !== void 0 && values.length > 0) return values;
|
|
1809
1831
|
if (!this.isMP4()) return void 0;
|
|
1810
|
-
const remapped = this.properties()[key]?.
|
|
1811
|
-
return remapped
|
|
1832
|
+
const remapped = this.properties()[key]?.filter((v) => v !== "");
|
|
1833
|
+
return remapped !== void 0 && remapped.length > 0 ? remapped : void 0;
|
|
1812
1834
|
}
|
|
1813
1835
|
setProperty(key, value) {
|
|
1814
1836
|
const wireKey = toTagLibKey(fromTagLibKey(key));
|
|
1815
1837
|
const atomNames = mp4FreeformAtomNames([wireKey]);
|
|
1816
1838
|
if (atomNames.length > 0 && this.isMP4()) {
|
|
1839
|
+
if (value === "") {
|
|
1840
|
+
const prior = this.handle.getMp4ItemRemovals?.() ?? [];
|
|
1841
|
+
this.handle.setMp4ItemRemovals?.([
|
|
1842
|
+
.../* @__PURE__ */ new Set([...prior, ...atomNames])
|
|
1843
|
+
]);
|
|
1844
|
+
if (this.module.isWasi) {
|
|
1845
|
+
this.handle.setProperties({
|
|
1846
|
+
...this.handle.getProperties(),
|
|
1847
|
+
[wireKey]: []
|
|
1848
|
+
});
|
|
1849
|
+
} else {
|
|
1850
|
+
const rest = { ...this.handle.getProperties() };
|
|
1851
|
+
delete rest[wireKey];
|
|
1852
|
+
this.handle.setProperties(rest);
|
|
1853
|
+
}
|
|
1854
|
+
return;
|
|
1855
|
+
}
|
|
1817
1856
|
this.handle.setProperties({
|
|
1818
1857
|
...this.handle.getProperties(),
|
|
1819
1858
|
[wireKey]: [value],
|
|
@@ -1823,6 +1862,14 @@ var init_audio_file_base = __esm({
|
|
|
1823
1862
|
}
|
|
1824
1863
|
this.handle.setProperty(wireKey, value);
|
|
1825
1864
|
}
|
|
1865
|
+
/**
|
|
1866
|
+
* The empty-string clearing contract, named (taglib-qyw2): both backends
|
|
1867
|
+
* remove the property when the written value is empty, and setProperty's
|
|
1868
|
+
* wire-key normalization + MP4 freeform atom-name handling apply unchanged.
|
|
1869
|
+
*/
|
|
1870
|
+
removeProperty(key) {
|
|
1871
|
+
this.setProperty(key, "");
|
|
1872
|
+
}
|
|
1826
1873
|
isMP4() {
|
|
1827
1874
|
return this.handle.isMP4();
|
|
1828
1875
|
}
|
|
@@ -1855,6 +1902,7 @@ var init_audio_file_base = __esm({
|
|
|
1855
1902
|
return this.handle.isValid();
|
|
1856
1903
|
}
|
|
1857
1904
|
dispose() {
|
|
1905
|
+
unregisterAutoDispose(this);
|
|
1858
1906
|
if (this.fileHandle) {
|
|
1859
1907
|
this.fileHandle.destroy();
|
|
1860
1908
|
this.fileHandle = null;
|
|
@@ -1928,6 +1976,7 @@ function isValidBitrateMode(value) {
|
|
|
1928
1976
|
}
|
|
1929
1977
|
function wrapEmbindHandle(raw) {
|
|
1930
1978
|
const stagedId3v2Frames = {};
|
|
1979
|
+
let destroyed = false;
|
|
1931
1980
|
const overrides = {
|
|
1932
1981
|
getTagData() {
|
|
1933
1982
|
const tw = raw.getTag();
|
|
@@ -2007,6 +2056,22 @@ function wrapEmbindHandle(raw) {
|
|
|
2007
2056
|
stripId3Tags(opts) {
|
|
2008
2057
|
raw.stripId3Tags(opts);
|
|
2009
2058
|
},
|
|
2059
|
+
destroy() {
|
|
2060
|
+
if (destroyed) return;
|
|
2061
|
+
destroyed = true;
|
|
2062
|
+
raw.destroy();
|
|
2063
|
+
},
|
|
2064
|
+
get destroyed() {
|
|
2065
|
+
return destroyed;
|
|
2066
|
+
},
|
|
2067
|
+
// taglib-qyw2: the PropertyMap erase pass computes freeform item names
|
|
2068
|
+
// from the property table (upper-cased) and misses the restored exact-case
|
|
2069
|
+
// atom (taglib-bnhl), so clears queue the exact name here; the imperative
|
|
2070
|
+
// Embind model applies removeItem immediately, before setProperties.
|
|
2071
|
+
setMp4ItemRemovals(removals) {
|
|
2072
|
+
const handle = raw;
|
|
2073
|
+
for (const name of removals) handle.removeMP4Item(name);
|
|
2074
|
+
},
|
|
2010
2075
|
getAudioProperties() {
|
|
2011
2076
|
const pw = raw.getAudioProperties();
|
|
2012
2077
|
if (!pw) return null;
|
|
@@ -2106,6 +2171,15 @@ var init_extra_state_registry = __esm({
|
|
|
2106
2171
|
else if (complete) target.setIxml(null);
|
|
2107
2172
|
}
|
|
2108
2173
|
},
|
|
2174
|
+
{
|
|
2175
|
+
name: "_mp4ItemRemovals",
|
|
2176
|
+
copy(target, source, complete) {
|
|
2177
|
+
const v = source.getMp4ItemRemovals?.();
|
|
2178
|
+
if (complete || v !== void 0 && v.length > 0) {
|
|
2179
|
+
target.setMp4ItemRemovals?.(v ?? []);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2109
2183
|
{
|
|
2110
2184
|
name: "id3v2Frames",
|
|
2111
2185
|
copy(target, source) {
|
|
@@ -2294,7 +2368,7 @@ var init_audio_file_impl = __esm({
|
|
|
2294
2368
|
mimeType: pic.mimeType,
|
|
2295
2369
|
data: pic.data,
|
|
2296
2370
|
type: PICTURE_TYPE_NAMES[pic.type] ?? "Other",
|
|
2297
|
-
description: pic.description
|
|
2371
|
+
...pic.description !== void 0 ? { description: pic.description } : {}
|
|
2298
2372
|
}));
|
|
2299
2373
|
}
|
|
2300
2374
|
setPictures(pictures) {
|
|
@@ -2319,13 +2393,20 @@ var init_audio_file_impl = __esm({
|
|
|
2319
2393
|
getChapters() {
|
|
2320
2394
|
const sorted = sortChapters(this.handle.getChapters());
|
|
2321
2395
|
const trackEndMs = this.audioProperties()?.durationMs;
|
|
2322
|
-
return sorted.map((c, i) =>
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2396
|
+
return sorted.map((c, i) => {
|
|
2397
|
+
const endTimeMs = inferEndTimeMs(sorted, i, trackEndMs);
|
|
2398
|
+
return {
|
|
2399
|
+
startTimeMs: c.startTimeMs,
|
|
2400
|
+
...endTimeMs !== void 0 ? { endTimeMs } : {},
|
|
2401
|
+
// Truthiness, not !== undefined: an empty CHAP title/id must read back
|
|
2402
|
+
// as ABSENT (the old `c.title || undefined` contract; the Embind
|
|
2403
|
+
// reader emits "" unconditionally, WASI omits — coalescing keeps the
|
|
2404
|
+
// backends agreeing).
|
|
2405
|
+
...c.title ? { title: c.title } : {},
|
|
2406
|
+
...c.id ? { id: c.id } : {},
|
|
2407
|
+
...c.source !== void 0 ? { source: c.source } : {}
|
|
2408
|
+
};
|
|
2409
|
+
});
|
|
2329
2410
|
}
|
|
2330
2411
|
setChapters(chapters, options) {
|
|
2331
2412
|
const fmt = this.getFormat();
|
|
@@ -2339,10 +2420,10 @@ var init_audio_file_impl = __esm({
|
|
|
2339
2420
|
const style = options?.mp4ChapterStyle ?? "quicktime";
|
|
2340
2421
|
const source = fmt === "MP4" ? style : "id3";
|
|
2341
2422
|
const raw = sorted.map((c, i) => ({
|
|
2342
|
-
id: c.id,
|
|
2423
|
+
...c.id !== void 0 ? { id: c.id } : {},
|
|
2343
2424
|
startTimeMs: c.startTimeMs,
|
|
2344
2425
|
endTimeMs: inferEndTimeMs(sorted, i, trackEndMs) ?? c.startTimeMs,
|
|
2345
|
-
title: c.title,
|
|
2426
|
+
...c.title !== void 0 ? { title: c.title } : {},
|
|
2346
2427
|
source
|
|
2347
2428
|
}));
|
|
2348
2429
|
this.handle.setChapters(raw, style);
|
|
@@ -2369,8 +2450,9 @@ var init_audio_file_impl = __esm({
|
|
|
2369
2450
|
return this.handle.getRatings().map(
|
|
2370
2451
|
(r) => ({
|
|
2371
2452
|
rating: r.rating,
|
|
2372
|
-
email: r.email
|
|
2373
|
-
|
|
2453
|
+
...r.email !== void 0 && r.email !== "" ? { email: r.email } : {},
|
|
2454
|
+
// 0 must read back as ABSENT (old `r.counter || undefined` contract).
|
|
2455
|
+
...r.counter !== 0 ? { counter: r.counter } : {}
|
|
2374
2456
|
})
|
|
2375
2457
|
);
|
|
2376
2458
|
}
|
|
@@ -2401,7 +2483,11 @@ var init_audio_file_impl = __esm({
|
|
|
2401
2483
|
return ratings.length > 0 ? normalized(ratings[0].rating) : void 0;
|
|
2402
2484
|
}
|
|
2403
2485
|
setRating(rating, email) {
|
|
2404
|
-
this.setRatings([{
|
|
2486
|
+
this.setRatings([{
|
|
2487
|
+
rating,
|
|
2488
|
+
...email !== void 0 ? { email } : {},
|
|
2489
|
+
counter: 0
|
|
2490
|
+
}]);
|
|
2405
2491
|
}
|
|
2406
2492
|
getId3v2Frames(id) {
|
|
2407
2493
|
assertMp3(this.getFormat());
|
|
@@ -2514,7 +2600,24 @@ function isMpegFrameSync(bytes, at = 0) {
|
|
|
2514
2600
|
if (version === 1 || layer === 0) return false;
|
|
2515
2601
|
const bitrateIndex = bytes[at + 2] >> 4 & 15;
|
|
2516
2602
|
const sampleRateIndex = bytes[at + 2] >> 2 & 3;
|
|
2517
|
-
|
|
2603
|
+
if (bitrateIndex === 0 || bitrateIndex === 15 || sampleRateIndex === 3) {
|
|
2604
|
+
return false;
|
|
2605
|
+
}
|
|
2606
|
+
const mpeg1 = version === 3;
|
|
2607
|
+
const layerIndex = layer ^ 3;
|
|
2608
|
+
const bitrate = MPEG_BITRATES[mpeg1 ? 0 : 1][layerIndex][bitrateIndex];
|
|
2609
|
+
const sampleRateTable = mpeg1 ? 0 : version === 2 ? 1 : 2;
|
|
2610
|
+
const sampleRate = MPEG_SAMPLE_RATES[sampleRateTable][sampleRateIndex];
|
|
2611
|
+
const samplesPerFrame = layerIndex === 2 ? mpeg1 ? 1152 : 576 : layerIndex === 1 ? 1152 : 384;
|
|
2612
|
+
let frameLength = Math.floor(samplesPerFrame * bitrate * 125 / sampleRate);
|
|
2613
|
+
if ((bytes[at + 2] & 2) !== 0) frameLength += layerIndex === 0 ? 4 : 1;
|
|
2614
|
+
if (frameLength === 0) return false;
|
|
2615
|
+
const next = at + frameLength;
|
|
2616
|
+
if (bytes.length < next + 4) return false;
|
|
2617
|
+
const mask = 4294839296;
|
|
2618
|
+
const header = ((bytes[at] << 24 | bytes[at + 1] << 16 | bytes[at + 2] << 8 | bytes[at + 3]) >>> 0 & mask) >>> 0;
|
|
2619
|
+
const nextHeader = ((bytes[next] << 24 | bytes[next + 1] << 16 | bytes[next + 2] << 8 | bytes[next + 3]) >>> 0 & mask) >>> 0;
|
|
2620
|
+
return header === nextHeader;
|
|
2518
2621
|
}
|
|
2519
2622
|
function containerEnd(bytes, at, limit) {
|
|
2520
2623
|
if (at >= bytes.length) return bytes.length < limit ? null : void 0;
|
|
@@ -2557,9 +2660,36 @@ function trailerFitsInFooter(tail, footerSize) {
|
|
|
2557
2660
|
}
|
|
2558
2661
|
return true;
|
|
2559
2662
|
}
|
|
2663
|
+
var MPEG_BITRATES, MPEG_SAMPLE_RATES;
|
|
2560
2664
|
var init_metadata_extent = __esm({
|
|
2561
2665
|
"src/taglib/metadata-extent.ts"() {
|
|
2562
2666
|
"use strict";
|
|
2667
|
+
MPEG_BITRATES = [
|
|
2668
|
+
[
|
|
2669
|
+
[0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0],
|
|
2670
|
+
// Layer I
|
|
2671
|
+
[0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 0],
|
|
2672
|
+
// Layer II
|
|
2673
|
+
[0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0]
|
|
2674
|
+
// Layer III
|
|
2675
|
+
],
|
|
2676
|
+
[
|
|
2677
|
+
[0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 0],
|
|
2678
|
+
// Layer I
|
|
2679
|
+
[0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0],
|
|
2680
|
+
// Layer II
|
|
2681
|
+
[0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0]
|
|
2682
|
+
// Layer III
|
|
2683
|
+
]
|
|
2684
|
+
];
|
|
2685
|
+
MPEG_SAMPLE_RATES = [
|
|
2686
|
+
[44100, 48e3, 32e3],
|
|
2687
|
+
// MPEG-1
|
|
2688
|
+
[22050, 24e3, 16e3],
|
|
2689
|
+
// MPEG-2
|
|
2690
|
+
[11025, 12e3, 8e3]
|
|
2691
|
+
// MPEG-2.5
|
|
2692
|
+
];
|
|
2563
2693
|
}
|
|
2564
2694
|
});
|
|
2565
2695
|
|
|
@@ -2831,7 +2961,7 @@ var VERSION;
|
|
|
2831
2961
|
var init_version = __esm({
|
|
2832
2962
|
"src/version.ts"() {
|
|
2833
2963
|
"use strict";
|
|
2834
|
-
VERSION = "
|
|
2964
|
+
VERSION = "2.0.0";
|
|
2835
2965
|
}
|
|
2836
2966
|
});
|
|
2837
2967
|
|
|
@@ -3310,7 +3440,7 @@ async function readPictureMetadata(file) {
|
|
|
3310
3440
|
return pictures.map((pic) => ({
|
|
3311
3441
|
type: pic.type,
|
|
3312
3442
|
mimeType: pic.mimeType,
|
|
3313
|
-
description: pic.description,
|
|
3443
|
+
...pic.description !== void 0 ? { description: pic.description } : {},
|
|
3314
3444
|
size: pic.data.length
|
|
3315
3445
|
}));
|
|
3316
3446
|
}
|
|
@@ -3384,10 +3514,10 @@ function extractDynamics(audioFile) {
|
|
|
3384
3514
|
"replayGainAlbumPeak"
|
|
3385
3515
|
];
|
|
3386
3516
|
for (const field of fields) {
|
|
3387
|
-
const val = audioFile.getProperty(field);
|
|
3388
|
-
if (val) dynamics[field] = val;
|
|
3517
|
+
const val = audioFile.getProperty(field)?.[0];
|
|
3518
|
+
if (val !== void 0) dynamics[field] = val;
|
|
3389
3519
|
}
|
|
3390
|
-
let appleSoundCheck = audioFile.getProperty("appleSoundCheck");
|
|
3520
|
+
let appleSoundCheck = audioFile.getProperty("appleSoundCheck")?.[0];
|
|
3391
3521
|
if (!appleSoundCheck && audioFile.isMP4()) {
|
|
3392
3522
|
appleSoundCheck = audioFile.getMP4Item("----:com.apple.iTunes:iTunNORM");
|
|
3393
3523
|
}
|
|
@@ -3413,23 +3543,27 @@ async function readMetadata(file) {
|
|
|
3413
3543
|
`File may be corrupted or in an unsupported format. File: ${name}`
|
|
3414
3544
|
);
|
|
3415
3545
|
}
|
|
3546
|
+
const dynamics = extractDynamics(audioFile);
|
|
3416
3547
|
return {
|
|
3417
3548
|
tags: readExtendedTag(audioFile),
|
|
3418
3549
|
properties: audioFile.audioProperties(),
|
|
3419
3550
|
hasCoverArt: audioFile.getPictures().length > 0,
|
|
3420
|
-
dynamics:
|
|
3551
|
+
...dynamics !== void 0 ? { dynamics } : {}
|
|
3421
3552
|
};
|
|
3422
3553
|
} finally {
|
|
3423
3554
|
audioFile.dispose();
|
|
3424
3555
|
}
|
|
3425
3556
|
}
|
|
3426
3557
|
async function readMetadataBatch(files, options = {}) {
|
|
3427
|
-
return executeBatch(files, options, (audioFile) =>
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3558
|
+
return executeBatch(files, options, (audioFile) => {
|
|
3559
|
+
const dynamics = extractDynamics(audioFile);
|
|
3560
|
+
return {
|
|
3561
|
+
tags: readExtendedTag(audioFile),
|
|
3562
|
+
properties: audioFile.audioProperties(),
|
|
3563
|
+
hasCoverArt: audioFile.getPictures().length > 0,
|
|
3564
|
+
...dynamics !== void 0 ? { dynamics } : {}
|
|
3565
|
+
};
|
|
3566
|
+
});
|
|
3433
3567
|
}
|
|
3434
3568
|
|
|
3435
3569
|
// src/simple/index.ts
|
|
@@ -3438,89 +3572,6 @@ init_types2();
|
|
|
3438
3572
|
// src/constants/index.ts
|
|
3439
3573
|
init_properties();
|
|
3440
3574
|
|
|
3441
|
-
// src/constants/tags.ts
|
|
3442
|
-
var Tags = {
|
|
3443
|
-
// Basic Properties
|
|
3444
|
-
Title: "title",
|
|
3445
|
-
Artist: "artist",
|
|
3446
|
-
Album: "album",
|
|
3447
|
-
Date: "date",
|
|
3448
|
-
TrackNumber: "trackNumber",
|
|
3449
|
-
Genre: "genre",
|
|
3450
|
-
Comment: "comment",
|
|
3451
|
-
// Extended Properties
|
|
3452
|
-
AlbumArtist: "albumArtist",
|
|
3453
|
-
Composer: "composer",
|
|
3454
|
-
Copyright: "copyright",
|
|
3455
|
-
EncodedBy: "encodedBy",
|
|
3456
|
-
DiscNumber: "discNumber",
|
|
3457
|
-
TotalTracks: "totalTracks",
|
|
3458
|
-
TotalDiscs: "totalDiscs",
|
|
3459
|
-
Compilation: "compilation",
|
|
3460
|
-
Bpm: "bpm",
|
|
3461
|
-
Lyricist: "lyricist",
|
|
3462
|
-
Conductor: "conductor",
|
|
3463
|
-
Remixer: "remixedBy",
|
|
3464
|
-
Language: "language",
|
|
3465
|
-
Publisher: "publisher",
|
|
3466
|
-
Mood: "mood",
|
|
3467
|
-
Media: "media",
|
|
3468
|
-
RadioStationOwner: "radioStationOwner",
|
|
3469
|
-
Producer: "producer",
|
|
3470
|
-
Subtitle: "subtitle",
|
|
3471
|
-
Label: "label",
|
|
3472
|
-
// Sorting Properties
|
|
3473
|
-
TitleSort: "titleSort",
|
|
3474
|
-
ArtistSort: "artistSort",
|
|
3475
|
-
AlbumArtistSort: "albumArtistSort",
|
|
3476
|
-
AlbumSort: "albumSort",
|
|
3477
|
-
ComposerSort: "composerSort",
|
|
3478
|
-
// Identifiers
|
|
3479
|
-
Isrc: "isrc",
|
|
3480
|
-
Asin: "asin",
|
|
3481
|
-
CatalogNumber: "catalogNumber",
|
|
3482
|
-
Barcode: "barcode",
|
|
3483
|
-
// MusicBrainz Identifiers
|
|
3484
|
-
MusicBrainzArtistId: "musicbrainzArtistId",
|
|
3485
|
-
MusicBrainzReleaseArtistId: "musicbrainzReleaseArtistId",
|
|
3486
|
-
MusicBrainzWorkId: "musicbrainzWorkId",
|
|
3487
|
-
MusicBrainzReleaseId: "musicbrainzReleaseId",
|
|
3488
|
-
MusicBrainzRecordingId: "musicbrainzTrackId",
|
|
3489
|
-
MusicBrainzTrackId: "musicbrainzTrackId",
|
|
3490
|
-
MusicBrainzReleaseGroupId: "musicbrainzReleaseGroupId",
|
|
3491
|
-
MusicBrainzReleaseTrackId: "musicbrainzReleaseTrackId",
|
|
3492
|
-
// AcoustID
|
|
3493
|
-
AcoustidFingerprint: "acoustidFingerprint",
|
|
3494
|
-
AcoustidId: "acoustidId",
|
|
3495
|
-
// Podcast Properties
|
|
3496
|
-
PodcastId: "podcastId",
|
|
3497
|
-
PodcastUrl: "podcastUrl",
|
|
3498
|
-
// Grouping and Work
|
|
3499
|
-
Grouping: "grouping",
|
|
3500
|
-
Work: "work",
|
|
3501
|
-
// Additional Metadata
|
|
3502
|
-
Lyrics: "lyrics",
|
|
3503
|
-
AlbumGain: "replayGainAlbumGain",
|
|
3504
|
-
AlbumPeak: "replayGainAlbumPeak",
|
|
3505
|
-
TrackGain: "replayGainTrackGain",
|
|
3506
|
-
TrackPeak: "replayGainTrackPeak",
|
|
3507
|
-
// Original release
|
|
3508
|
-
OriginalArtist: "originalArtist",
|
|
3509
|
-
OriginalAlbum: "originalAlbum",
|
|
3510
|
-
OriginalDate: "originalDate",
|
|
3511
|
-
// Miscellaneous
|
|
3512
|
-
Script: "script",
|
|
3513
|
-
InvolvedPeople: "involvedPeople",
|
|
3514
|
-
Encoding: "encoding"
|
|
3515
|
-
};
|
|
3516
|
-
var VALID_TAG_NAMES = new Set(Object.values(Tags));
|
|
3517
|
-
function isValidTagName(name) {
|
|
3518
|
-
return VALID_TAG_NAMES.has(name);
|
|
3519
|
-
}
|
|
3520
|
-
function getAllTagNames() {
|
|
3521
|
-
return Object.values(Tags);
|
|
3522
|
-
}
|
|
3523
|
-
|
|
3524
3575
|
// src/constants/format-mappings.ts
|
|
3525
3576
|
var FormatMappings = {
|
|
3526
3577
|
Title: {
|
|
@@ -3594,59 +3645,6 @@ function getPropertiesByFormat(format) {
|
|
|
3594
3645
|
);
|
|
3595
3646
|
}
|
|
3596
3647
|
|
|
3597
|
-
// src/constants/complex-properties.ts
|
|
3598
|
-
var COMPLEX_PROPERTIES = {
|
|
3599
|
-
PICTURE: {
|
|
3600
|
-
key: "PICTURE",
|
|
3601
|
-
description: "Embedded album art or images",
|
|
3602
|
-
type: "binary",
|
|
3603
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis", "FLAC"],
|
|
3604
|
-
mappings: {
|
|
3605
|
-
id3v2: { frame: "APIC" },
|
|
3606
|
-
mp4: "covr",
|
|
3607
|
-
vorbis: "METADATA_BLOCK_PICTURE",
|
|
3608
|
-
flac: "PICTURE"
|
|
3609
|
-
}
|
|
3610
|
-
},
|
|
3611
|
-
RATING: {
|
|
3612
|
-
key: "RATING",
|
|
3613
|
-
description: "Track rating (normalized 0.0-1.0)",
|
|
3614
|
-
type: "object",
|
|
3615
|
-
supportedFormats: ["ID3v2", "Vorbis", "MP4"],
|
|
3616
|
-
mappings: {
|
|
3617
|
-
id3v2: { frame: "POPM" },
|
|
3618
|
-
vorbis: "RATING",
|
|
3619
|
-
mp4: "----:com.apple.iTunes:RATING"
|
|
3620
|
-
}
|
|
3621
|
-
},
|
|
3622
|
-
LYRICS: {
|
|
3623
|
-
key: "LYRICS",
|
|
3624
|
-
description: "Unsynchronized lyrics text",
|
|
3625
|
-
type: "object",
|
|
3626
|
-
supportedFormats: ["ID3v2", "Vorbis", "MP4"],
|
|
3627
|
-
mappings: {
|
|
3628
|
-
id3v2: { frame: "USLT" },
|
|
3629
|
-
vorbis: "LYRICS",
|
|
3630
|
-
mp4: "\xA9lyr"
|
|
3631
|
-
}
|
|
3632
|
-
},
|
|
3633
|
-
CHAPTER: {
|
|
3634
|
-
key: "CHAPTER",
|
|
3635
|
-
description: "Chapter markers with time ranges",
|
|
3636
|
-
type: "object",
|
|
3637
|
-
supportedFormats: ["ID3v2"],
|
|
3638
|
-
mappings: {
|
|
3639
|
-
id3v2: { frame: "CHAP" }
|
|
3640
|
-
}
|
|
3641
|
-
}
|
|
3642
|
-
};
|
|
3643
|
-
var COMPLEX_PROPERTY_KEY = {
|
|
3644
|
-
PICTURE: "PICTURE",
|
|
3645
|
-
RATING: "RATING",
|
|
3646
|
-
LYRICS: "LYRICS",
|
|
3647
|
-
CHAPTER: "CHAPTER"
|
|
3648
|
-
};
|
|
3649
|
-
|
|
3650
3648
|
// src/web-utils/data-url.ts
|
|
3651
3649
|
init_classes();
|
|
3652
3650
|
function pictureToDataURL(picture) {
|
|
@@ -3673,7 +3671,7 @@ function dataURLToPicture(dataURL, type = "FrontCover", description) {
|
|
|
3673
3671
|
mimeType,
|
|
3674
3672
|
data,
|
|
3675
3673
|
type,
|
|
3676
|
-
description
|
|
3674
|
+
...description !== void 0 ? { description } : {}
|
|
3677
3675
|
};
|
|
3678
3676
|
}
|
|
3679
3677
|
|
|
@@ -3706,7 +3704,12 @@ async function canvasToPicture(canvas, options = {}) {
|
|
|
3706
3704
|
blob.arrayBuffer().then(
|
|
3707
3705
|
(arrayBuffer) => {
|
|
3708
3706
|
const data = new Uint8Array(arrayBuffer);
|
|
3709
|
-
resolve({
|
|
3707
|
+
resolve({
|
|
3708
|
+
mimeType: format,
|
|
3709
|
+
data,
|
|
3710
|
+
type,
|
|
3711
|
+
...description !== void 0 ? { description } : {}
|
|
3712
|
+
});
|
|
3710
3713
|
},
|
|
3711
3714
|
reject
|
|
3712
3715
|
);
|
|
@@ -3784,8 +3787,6 @@ export {
|
|
|
3784
3787
|
AudioFileImpl,
|
|
3785
3788
|
BITRATE_CONTROL_MODE_NAMES,
|
|
3786
3789
|
BITRATE_CONTROL_MODE_VALUES,
|
|
3787
|
-
COMPLEX_PROPERTIES,
|
|
3788
|
-
COMPLEX_PROPERTY_KEY,
|
|
3789
3790
|
EnvironmentError,
|
|
3790
3791
|
FileOperationError,
|
|
3791
3792
|
FormatMappings,
|
|
@@ -3800,7 +3801,6 @@ export {
|
|
|
3800
3801
|
TagLib,
|
|
3801
3802
|
TagLibError,
|
|
3802
3803
|
TagLibInitializationError,
|
|
3803
|
-
Tags,
|
|
3804
3804
|
UnsupportedFormatError,
|
|
3805
3805
|
addPicture,
|
|
3806
3806
|
applyCoverArt,
|
|
@@ -3818,7 +3818,6 @@ export {
|
|
|
3818
3818
|
findPictureByType,
|
|
3819
3819
|
getAllProperties,
|
|
3820
3820
|
getAllPropertyKeys,
|
|
3821
|
-
getAllTagNames,
|
|
3822
3821
|
getPropertiesByFormat,
|
|
3823
3822
|
getPropertyMetadata,
|
|
3824
3823
|
imageFileToPicture,
|
|
@@ -3832,7 +3831,6 @@ export {
|
|
|
3832
3831
|
isUnsupportedFormatError,
|
|
3833
3832
|
isValidAudioFile,
|
|
3834
3833
|
isValidProperty,
|
|
3835
|
-
isValidTagName,
|
|
3836
3834
|
loadTagLibModule,
|
|
3837
3835
|
pictureToDataURL,
|
|
3838
3836
|
readCoverArt,
|
package/dist/index.d.ts
CHANGED
|
@@ -40,18 +40,17 @@ export { EnvironmentError, FileOperationError, InvalidFormatError, isEnvironment
|
|
|
40
40
|
export type { TagLibErrorCode } from "./src/errors.js";
|
|
41
41
|
export { initializeForDenoCompile, isDenoCompiled, prepareWasmForEmbedding, } from "./src/deno-compile.js";
|
|
42
42
|
export { addPicture, applyCoverArt, applyPictures, applyTags, applyTagsToFile, type BatchItem, type BatchOptions, type BatchResult, clearPictures, clearTags, type FileMetadata, findPictureByType, isValidAudioFile, readCoverArt, readFormat, readMetadata, readMetadataBatch, readPictureMetadata, readPictures, readProperties, readPropertiesBatch, readTags, readTagsBatch, replacePictureByType, setBufferMode, } from "./src/simple/index.js";
|
|
43
|
-
export { FormatMappings, getAllProperties, getAllPropertyKeys,
|
|
43
|
+
export { FormatMappings, getAllProperties, getAllPropertyKeys, getPropertiesByFormat, getPropertyMetadata, isValidProperty, PROPERTIES, } from "./src/constants.js";
|
|
44
44
|
export type { PropertyMetadata } from "./src/constants/property-types.js";
|
|
45
45
|
export { copyCoverArt, exportAllPictures, exportCoverArt, exportPictureByType, findCoverArtFiles, importCoverArt, importPictureWithType, loadPictureFromFile, savePictureToFile, } from "./src/file-utils/index.js";
|
|
46
46
|
export { type AlbumDisc, type AlbumGroup, type AlbumGroupingResult, type AlbumGroupItem, type AlbumGroupKey, type AudioDynamics, type AudioFileMetadata, type DiscConfidence, type DiscFolderInfo, discFolderInfo, type DuplicateGroup, exportFolderMetadata, findDuplicates, type FolderScanItem, type FolderScanOptions, type FolderScanResult, type FolderUpdateItem, type FolderUpdateResult, groupAlbums, type GroupAlbumsOptions, scanFolder, scanForAlbums, type ScanForAlbumsOptions, updateFolderTags, } from "./src/folder-api/index.js";
|
|
47
47
|
export { canvasToPicture, createPictureDownloadURL, createPictureGallery, dataURLToPicture, displayPicture, imageFileToPicture, pictureToDataURL, setCoverArtFromCanvas, } from "./src/web-utils/index.js";
|
|
48
|
-
export type { AudioCodec, AudioFileInput, AudioProperties, BitrateControlMode, BroadcastAudioExtension, Chapter, ContainerFormat, ExtendedTag, FieldMapping, FileType, NamedAudioInput, OpenOptions, Picture, PictureType, PropertyMap, SetChaptersOptions, Tag, TagInput,
|
|
48
|
+
export type { AudioCodec, AudioFileInput, AudioProperties, BitrateControlMode, BroadcastAudioExtension, Chapter, ContainerFormat, ExtendedTag, FieldMapping, FileType, NamedAudioInput, OpenOptions, Picture, PictureType, PropertyMap, SetChaptersOptions, Tag, TagInput, } from "./src/types.js";
|
|
49
49
|
export { BITRATE_CONTROL_MODE_NAMES, BITRATE_CONTROL_MODE_VALUES, PICTURE_TYPE_NAMES, PICTURE_TYPE_VALUES, } from "./src/types.js";
|
|
50
50
|
export type { PropertyKey, PropertyValue } from "./src/constants.js";
|
|
51
51
|
export type { FormatPropertyKey, TagFormat, } from "./src/types/format-property-keys.js";
|
|
52
52
|
export type { TypedAudioProperties } from "./src/types/audio-formats.js";
|
|
53
|
-
export {
|
|
54
|
-
export type { ComplexPropertyKey, ComplexPropertyKeyMap, ComplexPropertyValueMap, Id3v2Frame, Rating, UnsyncedLyrics, VariantMap, } from "./src/constants/complex-properties.js";
|
|
53
|
+
export type { Id3v2Frame, Rating, UnsyncedLyrics, VariantMap, } from "./src/constants/complex-properties.js";
|
|
55
54
|
export { RatingUtils } from "./src/utils/rating.js";
|
|
56
55
|
export type { NormalizedRating, PopmRating } from "./src/utils/rating.js";
|
|
57
56
|
export * as bwf from "./src/bwf/bext.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,YAAY,EACV,SAAS,EACT,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,eAAe,EACf,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,aAAa,EACb,SAAS,EACT,KAAK,YAAY,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -51,13 +51,10 @@ import {
|
|
|
51
51
|
FormatMappings,
|
|
52
52
|
getAllProperties,
|
|
53
53
|
getAllPropertyKeys,
|
|
54
|
-
getAllTagNames,
|
|
55
54
|
getPropertiesByFormat,
|
|
56
55
|
getPropertyMetadata,
|
|
57
56
|
isValidProperty,
|
|
58
|
-
|
|
59
|
-
PROPERTIES,
|
|
60
|
-
Tags
|
|
57
|
+
PROPERTIES
|
|
61
58
|
} from "./src/constants.js";
|
|
62
59
|
import {
|
|
63
60
|
copyCoverArt,
|
|
@@ -95,10 +92,6 @@ import {
|
|
|
95
92
|
PICTURE_TYPE_NAMES,
|
|
96
93
|
PICTURE_TYPE_VALUES
|
|
97
94
|
} from "./src/types.js";
|
|
98
|
-
import {
|
|
99
|
-
COMPLEX_PROPERTIES,
|
|
100
|
-
COMPLEX_PROPERTY_KEY
|
|
101
|
-
} from "./src/constants/complex-properties.js";
|
|
102
95
|
import { RatingUtils } from "./src/utils/rating.js";
|
|
103
96
|
import * as bwf from "./src/bwf/bext.js";
|
|
104
97
|
import { loadTagLibModule } from "./src/runtime/module-loader.js";
|
|
@@ -106,8 +99,6 @@ export {
|
|
|
106
99
|
AudioFileImpl,
|
|
107
100
|
BITRATE_CONTROL_MODE_NAMES,
|
|
108
101
|
BITRATE_CONTROL_MODE_VALUES,
|
|
109
|
-
COMPLEX_PROPERTIES,
|
|
110
|
-
COMPLEX_PROPERTY_KEY,
|
|
111
102
|
EnvironmentError,
|
|
112
103
|
FileOperationError,
|
|
113
104
|
FormatMappings,
|
|
@@ -122,7 +113,6 @@ export {
|
|
|
122
113
|
TagLib,
|
|
123
114
|
TagLibError,
|
|
124
115
|
TagLibInitializationError,
|
|
125
|
-
Tags,
|
|
126
116
|
UnsupportedFormatError,
|
|
127
117
|
addPicture,
|
|
128
118
|
applyCoverArt,
|
|
@@ -149,7 +139,6 @@ export {
|
|
|
149
139
|
findPictureByType,
|
|
150
140
|
getAllProperties,
|
|
151
141
|
getAllPropertyKeys,
|
|
152
|
-
getAllTagNames,
|
|
153
142
|
getPropertiesByFormat,
|
|
154
143
|
getPropertyMetadata,
|
|
155
144
|
groupAlbums,
|
|
@@ -168,7 +157,6 @@ export {
|
|
|
168
157
|
isUnsupportedFormatError,
|
|
169
158
|
isValidAudioFile,
|
|
170
159
|
isValidProperty,
|
|
171
|
-
isValidTagName,
|
|
172
160
|
loadPictureFromFile,
|
|
173
161
|
loadTagLibModule,
|
|
174
162
|
pictureToDataURL,
|