Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of ID3Stream class. #580

Merged
merged 1 commit into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/aiff/AiffParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { BasicParser } from '../common/BasicParser';

import * as AiffToken from './AiffToken';
import * as iff from '../iff';
import { ID3Stream } from "../id3v2/ID3Stream";

const debug = initDebug('music-metadata:parser:aiff');

Expand Down Expand Up @@ -81,8 +80,7 @@ export class AIFFParser extends BasicParser {

case 'ID3 ': // ID3-meta-data
const id3_data = await this.tokenizer.readToken<Buffer>(new Token.BufferType(header.chunkSize));
const id3stream = new ID3Stream(id3_data);
const rst = strtok3.fromStream(id3stream);
const rst = strtok3.fromBuffer(id3_data);
await new ID3v2Parser().parse(this.metadata, rst, this.options);
return header.chunkSize;

Expand Down
4 changes: 1 addition & 3 deletions lib/dsdiff/DsdiffParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Token from 'token-types';
import * as initDebug from 'debug';
import { FourCcToken } from '../common/FourCC';
import { BasicParser } from '../common/BasicParser';
import { ID3Stream } from '../id3v2/ID3Stream';

import {ChunkHeader, IChunkHeader} from "./DsdiffToken";
import * as strtok3 from "strtok3/lib/core";
Expand Down Expand Up @@ -67,8 +66,7 @@ export class DsdiffParser extends BasicParser {

case 'ID3': // Unofficial ID3 tag support
const id3_data = await this.tokenizer.readToken<Buffer>(new Token.BufferType(header.chunkSize));
const id3stream = new ID3Stream(id3_data);
const rst = strtok3.fromStream(id3stream);
const rst = strtok3.fromBuffer(id3_data);
await new ID3v2Parser().parse(this.metadata, rst, this.options);
break;

Expand Down
16 changes: 0 additions & 16 deletions lib/id3v2/ID3Stream.ts

This file was deleted.

4 changes: 1 addition & 3 deletions lib/riff/WaveParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ID3v2Parser } from '../id3v2/ID3v2Parser';
import Common from '../common/Util';
import { FourCcToken } from '../common/FourCC';
import { BasicParser } from '../common/BasicParser';
import { ID3Stream } from "../id3v2/ID3Stream";

const debug = initDebug('music-metadata:parser:RIFF');

Expand Down Expand Up @@ -93,8 +92,7 @@ export class WaveParser extends BasicParser {
case 'id3 ': // The way Picard, FooBar currently stores, ID3 meta-data
case 'ID3 ': // The way Mp3Tags stores ID3 meta-data
const id3_data = await this.tokenizer.readToken<Buffer>(new Token.BufferType(header.chunkSize));
const id3stream = new ID3Stream(id3_data);
const rst = strtok3.fromStream(id3stream);
const rst = strtok3.fromBuffer(id3_data);
await new ID3v2Parser().parse(this.metadata, rst, this.options);
break;

Expand Down