Fixed actor data and avatar fetching and display.
This commit is contained in:
@@ -211,7 +211,9 @@ async function storePhotos(photos, {
|
||||
.first();
|
||||
|
||||
if (primaryPhoto) {
|
||||
await upsert(`${domain}s_${role}s`, photoAssociations, [`${domain}_id`, 'media_id']);
|
||||
const remainingAssociations = photoAssociations.filter(association => association.media_id === primaryPhoto.media_id);
|
||||
|
||||
await upsert(`${domain}s_${role}s`, remainingAssociations, [`${domain}_id`, 'media_id']);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -219,6 +221,8 @@ async function storePhotos(photos, {
|
||||
upsert(`${domain}s_${primaryRole}s`, photoAssociations.slice(0, 1), [`${domain}_id`, 'media_id']),
|
||||
upsert(`${domain}s_${role}s`, photoAssociations.slice(1), [`${domain}_id`, 'media_id']),
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await upsert(`${domain}s_${role}s`, photoAssociations, [`${domain}_id`, 'media_id']);
|
||||
|
||||
@@ -306,7 +306,6 @@ async function storeReleaseAssets(release, releaseId) {
|
||||
targetId: releaseId,
|
||||
subpath,
|
||||
}, identifier),
|
||||
/*
|
||||
storePhotos(release.covers, {
|
||||
role: 'cover',
|
||||
targetId: releaseId,
|
||||
@@ -316,7 +315,6 @@ async function storeReleaseAssets(release, releaseId) {
|
||||
targetId: releaseId,
|
||||
subpath,
|
||||
}, identifier),
|
||||
*/
|
||||
]);
|
||||
} catch (error) {
|
||||
console.log(release.url, error);
|
||||
|
||||
Reference in New Issue
Block a user