Skip to content

Commit

Permalink
Fix type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapppa committed May 6, 2024
1 parent 003d185 commit 2f7553c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export default class {
}

if (song.source === MediaSource.SoundCloud) {
const scSong = await this.soundcloud.util.streamTrack(song.url);
const scSong = await this.soundcloud.util.streamTrack(song.url) as Readable;
return this.createReadStream({url: scSong, cacheKey: song.url, cache: song.length < 30 * 60});
}

Expand Down Expand Up @@ -599,7 +599,7 @@ export default class {
}
}

private async createReadStream(options: {url: string | ReadableStream; cacheKey: string; ffmpegInputOptions?: string[]; cache?: boolean; volumeAdjustment?: string}): Promise<Readable> {
private async createReadStream(options: {url: string | Readable; cacheKey: string; ffmpegInputOptions?: string[]; cache?: boolean; volumeAdjustment?: string}): Promise<Readable> {
return new Promise((resolve, reject) => {
const capacitor = new WriteStream();

Expand Down

0 comments on commit 2f7553c

Please sign in to comment.