music-metadata 10.0.0 → 10.0.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.
@@ -39,8 +39,14 @@ export class APEv2Parser extends BasicParser {
39
39
  await reader.randomRead(apeBuf, 0, TagFooter.len, offset - TagFooter.len);
40
40
  const tagFooter = TagFooter.get(apeBuf, 0);
41
41
  if (tagFooter.ID === 'APETAGEX') {
42
- debug(`APE footer header at offset=${offset}`);
43
- return { footer: tagFooter, offset: offset - tagFooter.size };
42
+ if (tagFooter.flags.isHeader) {
43
+ debug(`APE Header found at offset=${offset - TagFooter.len}`);
44
+ }
45
+ else {
46
+ debug(`APE Footer found at offset=${offset - TagFooter.len}`);
47
+ offset -= tagFooter.size;
48
+ }
49
+ return { footer: tagFooter, offset };
44
50
  }
45
51
  }
46
52
  static parseTagFooter(metadata, buffer, options) {
@@ -105,7 +105,7 @@ export function parseTagFlags(flags) {
105
105
  return {
106
106
  containsHeader: isBitSet(flags, 31),
107
107
  containsFooter: isBitSet(flags, 30),
108
- isHeader: isBitSet(flags, 31),
108
+ isHeader: isBitSet(flags, 29),
109
109
  readOnly: isBitSet(flags, 0),
110
110
  dataType: (flags & 6) >> 1
111
111
  };
package/package.json CHANGED
@@ -1,152 +1,150 @@
1
- {
2
- "name": "music-metadata",
3
- "description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
4
- "version": "10.0.0",
5
- "author": {
6
- "name": "Borewit",
7
- "url": "https://github.com/Borewit"
8
- },
9
- "funding": [
10
- {
11
- "type": "github",
12
- "url": "https://github.com/sponsors/Borewit"
13
- },
14
- {
15
- "type": "buymeacoffee",
16
- "url": "https://buymeacoffee.com/borewit"
17
- }
18
- ],
19
- "type": "module",
20
- "exports": {
21
- ".": {
22
- "node": "./lib/index.js",
23
- "default": "./lib/core.js"
24
- }
25
- },
26
- "types": "lib/index.d.ts",
27
- "files": [
28
- "lib/**/*.js",
29
- "lib/**/*.d.ts"
30
- ],
31
- "keywords": [
32
- "music",
33
- "metadata",
34
- "meta",
35
- "audio",
36
- "tag",
37
- "tags",
38
- "duration",
39
- "MusicBrainz",
40
- "Discogs",
41
- "Picard",
42
- "ID3",
43
- "ID3v1",
44
- "ID3v2",
45
- "m4a",
46
- "m4b",
47
- "mp3",
48
- "mp4",
49
- "Vorbis",
50
- "ogg",
51
- "flac",
52
- "Matroska",
53
- "WebM",
54
- "EBML",
55
- "asf",
56
- "wma",
57
- "wmv",
58
- "ape",
59
- "MonkeyAudio",
60
- "aiff",
61
- "wav",
62
- "WavPack",
63
- "Opus",
64
- "speex",
65
- "musepack",
66
- "mpc",
67
- "dsd",
68
- "dsf",
69
- "mpc",
70
- "dff",
71
- "dsdiff",
72
- "aac",
73
- "adts",
74
- "length",
75
- "chapter",
76
- "info",
77
- "parse",
78
- "parser",
79
- "bwf"
80
- ],
81
- "scripts": {
82
- "clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts' 'test/**/*.js' 'test/**/*.js.map' 'test/**/*.js' 'test/**/*.js.map' 'doc-gen/**/*.js' 'doc-gen/**/*.js.map'",
83
- "compile-src": "tsc -p lib",
84
- "compile-test": "tsc -p test",
85
- "compile-doc": "tsc -p doc-gen",
86
- "compile": "npm run compile-src && npm run compile-test && npm run compile-doc",
87
- "eslint": "eslint lib test doc-gen",
88
- "lint-md": "remark -u preset-lint-markdown-style-guide .",
89
- "lint": "npm run lint-md && npm run eslint",
90
- "test": "mocha",
91
- "build": "npm run clean && npm run compile && npm run doc-gen",
92
- "start": "npm-run-all compile lint cover-test",
93
- "test-coverage": "c8 npm run test",
94
- "send-codacy": "c8 report --reporter=text-lcov | codacy-coverage",
95
- "doc-gen": "node doc-gen/gen.js"
96
- },
97
- "dependencies": {
98
- "@tokenizer/token": "^0.3.0",
99
- "content-type": "^1.0.5",
100
- "debug": "^4.3.4",
101
- "file-type": "^19.2.0",
102
- "media-typer": "^1.1.0",
103
- "strtok3": "^8.0.0",
104
- "token-types": "^6.0.0",
105
- "uint8array-extras": "^1.4.0"
106
- },
107
- "devDependencies": {
108
- "@eslint/compat": "^1.1.1",
109
- "@eslint/eslintrc": "^3.1.0",
110
- "@eslint/js": "^9.7.0",
111
- "@types/chai": "^4.3.16",
112
- "@types/chai-as-promised": "^7.1.8",
113
- "@types/debug": "^4.1.12",
114
- "@types/file-type": "^10.9.1",
115
- "@types/mocha": "^10.0.7",
116
- "@types/node": "^20.14.11",
117
- "@typescript-eslint/eslint-plugin": "^7.16.1",
118
- "@typescript-eslint/parser": "^7.16.1",
119
- "c8": "^10.1.2",
120
- "chai": "^5.1.1",
121
- "chai-as-promised": "^8.0.0",
122
- "del-cli": "^5.1.0",
123
- "eslint": "^9.7.0",
124
- "eslint-config-prettier": "^9.1.0",
125
- "eslint-import-resolver-typescript": "^3.6.1",
126
- "eslint-plugin-import": "^2.29.1",
127
- "eslint-plugin-jsdoc": "^48.7.0",
128
- "eslint-plugin-node": "^11.1.0",
129
- "eslint-plugin-unicorn": "^54.0.0",
130
- "globals": "^15.8.0",
131
- "mime": "^4.0.4",
132
- "mocha": "^10.6.0",
133
- "npm-run-all": "^4.1.5",
134
- "prettier": "^3.3.3",
135
- "remark-cli": "^12.0.1",
136
- "remark-preset-lint-markdown-style-guide": "^6.0.0",
137
- "ts-node": "^10.9.2",
138
- "typescript": "^5.5.3"
139
- },
140
- "engines": {
141
- "node": ">=16.0.0"
142
- },
143
- "repository": {
144
- "type": "git",
145
- "url": "git+https://github.com/borewit/music-metadata.git"
146
- },
147
- "license": "MIT",
148
- "bugs": {
149
- "url": "https://github.com/Borewit/music-metadata/issues"
150
- },
151
- "packageManager": "yarn@4.3.1"
152
- }
1
+ {
2
+ "name": "music-metadata",
3
+ "description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
4
+ "version": "10.0.1",
5
+ "author": {
6
+ "name": "Borewit",
7
+ "url": "https://github.com/Borewit"
8
+ },
9
+ "funding": [
10
+ {
11
+ "type": "github",
12
+ "url": "https://github.com/sponsors/Borewit"
13
+ },
14
+ {
15
+ "type": "buymeacoffee",
16
+ "url": "https://buymeacoffee.com/borewit"
17
+ }
18
+ ],
19
+ "type": "module",
20
+ "exports": {
21
+ ".": {
22
+ "node": "./lib/index.js",
23
+ "default": "./lib/core.js"
24
+ }
25
+ },
26
+ "types": "lib/index.d.ts",
27
+ "files": [
28
+ "lib/**/*.js",
29
+ "lib/**/*.d.ts"
30
+ ],
31
+ "keywords": [
32
+ "music",
33
+ "metadata",
34
+ "meta",
35
+ "audio",
36
+ "tag",
37
+ "tags",
38
+ "duration",
39
+ "MusicBrainz",
40
+ "Discogs",
41
+ "Picard",
42
+ "ID3",
43
+ "ID3v1",
44
+ "ID3v2",
45
+ "m4a",
46
+ "m4b",
47
+ "mp3",
48
+ "mp4",
49
+ "Vorbis",
50
+ "ogg",
51
+ "flac",
52
+ "Matroska",
53
+ "WebM",
54
+ "EBML",
55
+ "asf",
56
+ "wma",
57
+ "wmv",
58
+ "ape",
59
+ "MonkeyAudio",
60
+ "aiff",
61
+ "wav",
62
+ "WavPack",
63
+ "Opus",
64
+ "speex",
65
+ "musepack",
66
+ "mpc",
67
+ "dsd",
68
+ "dsf",
69
+ "mpc",
70
+ "dff",
71
+ "dsdiff",
72
+ "aac",
73
+ "adts",
74
+ "length",
75
+ "chapter",
76
+ "info",
77
+ "parse",
78
+ "parser",
79
+ "bwf"
80
+ ],
81
+ "scripts": {
82
+ "clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts' 'test/**/*.js' 'test/**/*.js.map' 'test/**/*.js' 'test/**/*.js.map' 'doc-gen/**/*.js' 'doc-gen/**/*.js.map'",
83
+ "compile-src": "tsc -p lib",
84
+ "compile-test": "tsc -p test",
85
+ "compile-doc": "tsc -p doc-gen",
86
+ "compile": "yarn run compile-src && yarn compile-test && yarn compile-doc",
87
+ "eslint": "eslint lib test doc-gen",
88
+ "lint-md": "yarn run remark -u preset-lint-markdown-style-guide .",
89
+ "lint": "yarn run lint-md && yarn run eslint",
90
+ "test": "mocha",
91
+ "build": "yarn run clean && yarn compile && yarn run doc-gen",
92
+ "start": "yarn run compile && yarn run lint && yarn run cover-test",
93
+ "test-coverage": "c8 yarn run test",
94
+ "send-codacy": "c8 report --reporter=text-lcov | codacy-coverage",
95
+ "doc-gen": "yarn node doc-gen/gen.js"
96
+ },
97
+ "dependencies": {
98
+ "@tokenizer/token": "^0.3.0",
99
+ "content-type": "^1.0.5",
100
+ "debug": "^4.3.4",
101
+ "file-type": "^19.2.0",
102
+ "media-typer": "^1.1.0",
103
+ "strtok3": "^8.0.0",
104
+ "token-types": "^6.0.0",
105
+ "uint8array-extras": "^1.4.0"
106
+ },
107
+ "devDependencies": {
108
+ "@eslint/compat": "^1.1.1",
109
+ "@eslint/eslintrc": "^3.1.0",
110
+ "@eslint/js": "^9.7.0",
111
+ "@types/chai": "^4.3.16",
112
+ "@types/chai-as-promised": "^7.1.8",
113
+ "@types/debug": "^4.1.12",
114
+ "@types/mocha": "^10.0.7",
115
+ "@types/node": "^22.0.3",
116
+ "@typescript-eslint/eslint-plugin": "^7.16.1",
117
+ "@typescript-eslint/parser": "^7.16.1",
118
+ "c8": "^10.1.2",
119
+ "chai": "^5.1.1",
120
+ "chai-as-promised": "^8.0.0",
121
+ "del-cli": "^5.1.0",
122
+ "eslint": "^9.7.0",
123
+ "eslint-config-prettier": "^9.1.0",
124
+ "eslint-import-resolver-typescript": "^3.6.1",
125
+ "eslint-plugin-import": "^2.29.1",
126
+ "eslint-plugin-jsdoc": "^48.7.0",
127
+ "eslint-plugin-node": "^11.1.0",
128
+ "eslint-plugin-unicorn": "^55.0.0",
129
+ "globals": "^15.8.0",
130
+ "mime": "^4.0.4",
131
+ "mocha": "^10.6.0",
132
+ "prettier": "^3.3.3",
133
+ "remark-cli": "^12.0.1",
134
+ "remark-preset-lint-markdown-style-guide": "^6.0.0",
135
+ "ts-node": "^10.9.2",
136
+ "typescript": "^5.5.3"
137
+ },
138
+ "engines": {
139
+ "node": ">=16.0.0"
140
+ },
141
+ "repository": {
142
+ "type": "git",
143
+ "url": "git+https://github.com/borewit/music-metadata.git"
144
+ },
145
+ "license": "MIT",
146
+ "bugs": {
147
+ "url": "https://github.com/Borewit/music-metadata/issues"
148
+ },
149
+ "packageManager": "yarn@4.3.1"
150
+ }