add isrc lookup to applicable services

This commit is contained in:
aria
2024-08-15 00:54:16 -04:00
parent dfdecafc1f
commit 2d2bfb93db
7 changed files with 59 additions and 13 deletions

View File

@@ -300,4 +300,12 @@ export default class Qobuz implements StreamerWithLogin {
explicit: true
}
}
async isrcLookup(isrc: string): Promise<Track> {
const isrcUrl = (await this.search(isrc)).tracks?.[0]?.url
if (!isrcUrl) throw new Error(`Not available on Qobuz.`)
else {
const track = <Track>(await this.getByUrl(isrcUrl)).metadata
return track
}
}
}