Skip to content

Commit f249d36

Browse files
committed
Merge branch 'release/v6.0.2' into develop
2 parents 56706ba + 1fe99fa commit f249d36

5 files changed

Lines changed: 26 additions & 9 deletions

File tree

docs/classes/Genres.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ string representation of them.
2020

2121
- [audioToIndex](Genres.md#audiotoindex)
2222
- [indexToAudio](Genres.md#indextoaudio)
23+
- [indexToAudioDirect](Genres.md#indextoaudiodirect)
2324
- [indexToVideo](Genres.md#indextovideo)
2425
- [videoToIndex](Genres.md#videotoindex)
2526

@@ -89,6 +90,22 @@ Genre name if found, or `undefined` if `index` is outside the
8990

9091
___
9192

93+
### indexToAudioDirect
94+
95+
`Static` **indexToAudioDirect**(`index`): `string`
96+
97+
#### Parameters
98+
99+
| Name | Type |
100+
| :------ | :------ |
101+
| `index` | `string` \| `number` |
102+
103+
#### Returns
104+
105+
`string`
106+
107+
___
108+
92109
### indexToVideo
93110

94111
`Static` **indexToVideo**(`index`, `allowParenthesis`): `string`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "node-taglib-sharp",
33
"description": "Read and write audio/video/picture tags using a similar interface to TagLib#",
4-
"version": "6.0.1",
4+
"version": "6.0.2",
55
"license": "LGPL-2.1-or-later",
66
"author": "Ben Russell <benrr101@outlook.com> (https://github.com/benrr101)",
77
"repository": "github:benrr101/node-taglib-sharp",

src/genres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default class Genres {
231231
? Genres.AUDIO_GENRES[safeIndex]
232232
: undefined;
233233
}
234-
234+
235235
public static indexToAudioDirect(index: number|string): string {
236236
if (typeof(index) === "string") {
237237
if (!(/\d+/).test(index)) {

src/id3v2/frameIdentifiers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {NotSupportedError} from "../errors";
44
/**
55
* Represents the identifier of a frame, depending on the version this may be 3 or 4
66
* bytes. Provides a simple way to switch between the identifiers used for different versions.
7-
7+
*
88
* @remarks
99
* This class is implemented in an attempt to unify frame identifiers, make it easy to
1010
* switch versions, find frames between tags, and determine which frames are supported on which

src/matroska/matroskaFile.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default class MatroskaFile extends File {
9696

9797
this.mode = FileAccessMode.Read;
9898
try {
99-
this.read(propertiesStyle);
99+
this.read();
100100

101101
this._properties = new Properties(this._readState.durationMilliseconds, this._tracks);
102102
this._tag = new MatroskaTagCollection(
@@ -139,7 +139,7 @@ export default class MatroskaFile extends File {
139139

140140
// #region Private Methods
141141

142-
private read(propertiesStyle: ReadStyle): void {
142+
private read(): void {
143143
// Look up the EBML 0-level ID
144144
// @TODO: This should only search like a couple kilobytes. File is supposed to *start* with this
145145
const firstElementOffset = this.find(ByteVector.fromByteArray([0x1A, 0x45, 0xDF, 0xA3]));
@@ -155,7 +155,7 @@ export default class MatroskaFile extends File {
155155
this.readEbmlHeader(e)
156156
parser.setOptions(this._header.ebmlMaxIdLength, this._header.ebmlMaxSizeLength)
157157
}],
158-
[MatroskaIds.SEGMENT, e => this.readSegments(e, propertiesStyle)]
158+
[MatroskaIds.SEGMENT, e => this.readSegments(e)]
159159
]);
160160
EbmlParser.processElements(parser, actions);
161161
} finally {
@@ -196,7 +196,7 @@ export default class MatroskaFile extends File {
196196
this._header = result;
197197
}
198198

199-
private readSegmentInfo(infoElement: EbmlElement, readState: TagReadState, readStyle: ReadStyle): void {
199+
private readSegmentInfo(infoElement: EbmlElement, readState: TagReadState): void {
200200
// @TODO: If read style is too low, don't read
201201
let duration: number = 0;
202202
let timeCodeScale: number;
@@ -216,7 +216,7 @@ export default class MatroskaFile extends File {
216216
}
217217
}
218218

219-
private readSegments(segmentsElement: EbmlElement, readStyle: ReadStyle): void {
219+
private readSegments(segmentsElement: EbmlElement): void {
220220
// Read the children of the segment element
221221
this._readState = {
222222
attachments: [],
@@ -226,7 +226,7 @@ export default class MatroskaFile extends File {
226226
};
227227
const segmentParseActions = new Map<number, (e: EbmlElement) => void>([
228228
[MatroskaIds.SEEK_HEAD, undefined],
229-
[MatroskaIds.INFO, e => this.readSegmentInfo(e, this._readState, readStyle)],
229+
[MatroskaIds.INFO, e => this.readSegmentInfo(e, this._readState)],
230230
[MatroskaIds.CLUSTER, undefined],
231231
[MatroskaIds.TRACKS, e => this.readTracks(e)],
232232
[MatroskaIds.CUES, undefined],

0 commit comments

Comments
 (0)