From 8e877ec4d711b9b4c16002be62e2907eadfcdfaa Mon Sep 17 00:00:00 2001 From: aria Date: Thu, 11 Jul 2024 12:49:57 -0400 Subject: [PATCH] change priority --- src/streamers/soundcloud/main.ts | 2 +- src/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/streamers/soundcloud/main.ts b/src/streamers/soundcloud/main.ts index 9630544..1237104 100644 --- a/src/streamers/soundcloud/main.ts +++ b/src/streamers/soundcloud/main.ts @@ -265,8 +265,8 @@ async function getStream( if (hq == true && filter.length == 0) throw new Error('Could not find HQ format.') if (filter.length == 0) filter = transcodings.filter((x) => x.preset.startsWith('aac_')) // prioritize aac (go+) - if (filter.length == 0) filter = transcodings.filter((x) => x.preset.startsWith('opus_')) // then opus if (filter.length == 0) filter = transcodings.filter((x) => x.preset.startsWith('mp3_')) // then mp3 + if (filter.length == 0) filter = transcodings.filter((x) => x.preset.startsWith('opus_')) // then opus if (filter.length == 0) throw new Error('Could not find applicable format.') // and this is just in case none of those exist const transcoding = filter[0] diff --git a/src/types.ts b/src/types.ts index ca28bb5..68dd2e7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -45,6 +45,7 @@ export interface Track { album?: Album durationMs?: number coverArtwork?: CoverArtwork[] + regions?: Region[] } export interface SearchResults {