diff --git a/manifest_chrome.json b/manifest_chrome.json index 4237c46..2e0e4b6 100644 --- a/manifest_chrome.json +++ b/manifest_chrome.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "SensCritique", - "version": "1.5.1", + "version": "1.5.2", "description": "Vous avez du mal à trouver des bons programmes sur vos plateformes de streaming ?", "icons": { "48": "images/logo-48.png", diff --git a/manifest_firefox.json b/manifest_firefox.json index b405aeb..f89fb75 100644 --- a/manifest_firefox.json +++ b/manifest_firefox.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "SensCritique", - "version": "1.5.1", + "version": "1.5.2", "description": "La note SensCritique est une boussole pour arrêter de perdre votre temps, et s’invite sur Netflix, Prime Video et Disney+ pour vous permettre de choisir de manière éclairée vos programmes.", "icons": { "48": "images/logo-48.png", diff --git a/package-lock.json b/package-lock.json index 372af85..c285df8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "senscritique-extension", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7b74618..0b08448 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "senscritique-extension", - "version": "1.5.1", + "version": "1.5.2", "description": "La note SensCritique est une boussole pour arrêter de perdre votre temps, et s’invite sur Netflix, Prime Video et Disney+ pour vous permettre de choisir de manière éclairée vos programmes.", "author": "SensCritique", "repository": { diff --git a/releases/latest_chrome.zip b/releases/latest_chrome.zip index 7b17f8d..6c39434 100644 Binary files a/releases/latest_chrome.zip and b/releases/latest_chrome.zip differ diff --git a/releases/latest_firefox.xpi b/releases/latest_firefox.xpi index 40bc79d..7d60814 100644 Binary files a/releases/latest_firefox.xpi and b/releases/latest_firefox.xpi differ diff --git a/src/dom/providers/PrimeVideo.ts b/src/dom/providers/PrimeVideo.ts index 37e79ed..6736951 100644 --- a/src/dom/providers/PrimeVideo.ts +++ b/src/dom/providers/PrimeVideo.ts @@ -79,8 +79,22 @@ export default class PrimeVideo extends Manager { renderWallRatings(browserExtensionProducts: BrowserExtensionProduct[]): void { // Response from API with all browserExtensionProducts - browserExtensionProducts.forEach((browserExtensionProduct) => { + browserExtensionProducts.forEach(async (browserExtensionProduct) => { + // Note : Save in cache product information before rendering to prevent UI bugs const hash = md5(browserExtensionProduct.platformId.toString()) + const videoInfo = { + name: name, + redirect: await generateRedirectUrl(name), + id: '', + url: browserExtensionProduct.url, + type: browserExtensionProduct.type, + rating: browserExtensionProduct?.rating?.toString(), + hash, + platformId: browserExtensionProduct?.platformId, + } + + this.cache.save(videoInfo) + const platformId = browserExtensionProduct.platformId const wallElements = document.querySelectorAll( `[data-testid="packshot"] a[href*="/detail/${platformId}"][role="button"]:not([class*="tst-"])`