Add Podcast match tab and find covers

This commit is contained in:
advplyr 2022-04-13 18:13:39 -05:00
parent 4edba20e9e
commit 3f6ed6dbf9
10 changed files with 113 additions and 20 deletions

View file

@ -13,5 +13,13 @@ class PodcastFinder {
Logger.debug(`[iTunes] Podcast search for "${term}" returned ${results.length} results`)
return results
}
async findCovers(term) {
if (!term) return null
Logger.debug(`[iTunes] Searching for podcast covers with term "${term}"`)
var results = await this.iTunesApi.searchPodcasts(term)
if (!results) return []
return results.map(r => r.cover).filter(r => r)
}
}
module.exports = PodcastFinder