change priority

This commit is contained in:
aria 2024-07-11 12:49:57 -04:00
parent 44bc197d35
commit 8e877ec4d7
2 changed files with 2 additions and 1 deletions

View File

@ -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]

View File

@ -45,6 +45,7 @@ export interface Track {
album?: Album
durationMs?: number
coverArtwork?: CoverArtwork[]
regions?: Region[]
}
export interface SearchResults {