🚛 Massive refactor of dashboard

This commit is contained in:
2022-05-23 22:01:51 -07:00
parent f0505d7428
commit d80c672cd1
18 changed files with 127 additions and 77 deletions

View File

@@ -58,3 +58,25 @@ export const determineCoverFile = (data) => {
return result[0];
}
};
export const determineExternalMetadata = (metadataSource, source) => {
switch (metadataSource) {
case "comicvine":
return {
coverURL: source.comicvine.image.small_url,
issue: source.comicvine.name,
icon: "cvlogo.svg",
};
case "locg":
return {
coverURL: source.locg.cover,
issue: source.locg.name,
icon: "locglogo.svg",
};
case undefined:
return {};
default:
break;
}
};