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

@@ -91,6 +91,15 @@ class Lucida {
})
)
}
async isrcLookup(isrc: string) {
const results = await Promise.all(
Object.values(this.modules).map(async (e) => {
if (e.isrcLookup) return await e.isrcLookup(isrc)
})
)
const moduleNames = Object.keys(this.modules)
return Object.fromEntries(results.map((e, i) => [moduleNames[i], e]))
}
}
export default Lucida