Add initial Amazon Music support

This commit is contained in:
Jonathan Cremin 2018-04-08 16:31:46 +01:00
parent bd85678303
commit b0fcf55071
25 changed files with 248 additions and 222 deletions

View file

@ -18,7 +18,7 @@ export function parseUrl(url) {
}
function exactMatch(needle, haystack, type, various) {
// try to find exact match
// try to find exact match
return haystack.find((entry) => {
if (!entry[type] || (various && (entry.artist.name !== 'Various' || entry.artist.name !== 'Various Artists'))) {
return false;
@ -32,7 +32,7 @@ function exactMatch(needle, haystack, type, various) {
}
function looseMatch(needle, haystack, type, various) {
// try to find exact match
// try to find exact match
return haystack.find((entry) => {
if (!entry[type] || (various && (entry.artist.name !== 'Various' || entry.artist.name !== 'Various Artists'))) {
return false;