music-metadata 11.11.0 → 11.11.1

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 CHANGED
@@ -9,6 +9,8 @@
9
9
 
10
10
  # music-metadata
11
11
 
12
+ <img src="image/logo-music-metadata.jpg" width="60%" style="display: block; margin: auto;" alt="logo">
13
+
12
14
  Key features:
13
15
  - **Comprehensive Format Support**: Supports popular audio formats like MP3, MP4, FLAC, Ogg, WAV, AIFF, and more.
14
16
  - **Extensive Metadata Extraction**: Extracts detailed metadata, including ID3v1, ID3v2, APE, Vorbis, and iTunes/MP4 tags.
@@ -64,7 +64,7 @@ export class ID3v2Parser {
64
64
  this.headerType = (`ID3v2.${id3Header.version.major}`);
65
65
  await (id3Header.flags.isExtendedHeader ? this.parseExtendedHeader() : this.parseId3Data(id3Header.size));
66
66
  // Post process
67
- const chapters = ID3v2Parser.mapId3v2Chapters(this.metadata.native[this.headerType], this.metadata.format.sampleRate);
67
+ const chapters = ID3v2Parser.mapId3v2Chapters(this.metadata.native[this.headerType]);
68
68
  this.metadata.setFormat('chapters', chapters);
69
69
  }
70
70
  async parseExtendedHeader() {
@@ -125,7 +125,9 @@ export class ID3v2Parser {
125
125
  * This function expects the `native` tags already to contain parsed `CHAP` and `CTOC` frame values,
126
126
  * as produced by `FrameParser.readData`.
127
127
  */
128
- static mapId3v2Chapters(id3Tags, sampleRate) {
128
+ static mapId3v2Chapters(id3Tags) {
129
+ if (!id3Tags)
130
+ return;
129
131
  const chapFrames = id3Tags.filter(t => t.id === 'CHAP');
130
132
  if (!chapFrames?.length)
131
133
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "music-metadata",
3
3
  "description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
4
- "version": "11.11.0",
4
+ "version": "11.11.1",
5
5
  "author": {
6
6
  "name": "Borewit",
7
7
  "url": "https://github.com/Borewit"
@@ -120,14 +120,14 @@
120
120
  "win-guid": "^0.2.0"
121
121
  },
122
122
  "devDependencies": {
123
- "@biomejs/biome": "2.3.11",
123
+ "@biomejs/biome": "2.3.13",
124
124
  "@types/chai": "^5.2.3",
125
125
  "@types/chai-as-promised": "^8.0.2",
126
126
  "@types/content-type": "^1.1.9",
127
127
  "@types/debug": "^4.1.12",
128
128
  "@types/media-typer": "^1.1.3",
129
129
  "@types/mocha": "^10.0.10",
130
- "@types/node": "^25.0.10",
130
+ "@types/node": "^25.1.0",
131
131
  "c8": "^10.1.3",
132
132
  "chai": "^6.2.2",
133
133
  "chai-as-promised": "^8.0.2",