(null);
@@ -64,7 +62,7 @@ export function VideoPlayer({
className="object-cover"
fill
priority
- src={`${coverImage}?${cacheKey}` || "/fallback-video.png"}
+ src={coverImage || "/fallback-video.png"}
/>
setIsPlaying(false)}
- src={`${videoSrc}?${cacheKey}`}
+ src={videoSrc}
>
Your browser does not support the video tag.
diff --git a/apps/infoalloggi/src/pages/annuncio/[cod].tsx b/apps/infoalloggi/src/pages/annuncio/[cod].tsx
index 9d4cee4..fd170f6 100644
--- a/apps/infoalloggi/src/pages/annuncio/[cod].tsx
+++ b/apps/infoalloggi/src/pages/annuncio/[cod].tsx
@@ -630,11 +630,10 @@ const AnnuncioFooter = ({
{videos.map((video) => {
return (
);
})}
diff --git a/apps/infoalloggi/src/server/controllers/annunci.controller.ts b/apps/infoalloggi/src/server/controllers/annunci.controller.ts
index d626725..7df8d26 100644
--- a/apps/infoalloggi/src/server/controllers/annunci.controller.ts
+++ b/apps/infoalloggi/src/server/controllers/annunci.controller.ts
@@ -101,7 +101,12 @@ export const getAnnunciMetaByCod = async ({ cod }: { cod: string }) => {
try {
const annuncio = await db
.selectFrom("annunci")
- .select((_eb) => ["titolo_it", "desc_it", withImages()])
+ .select((_eb) => [
+ "titolo_it",
+ "desc_it",
+ withImages(),
+ "media_updated_at",
+ ])
.where("annunci.web", "=", true)
.where("codice", "=", cod)
.executeTakeFirst();
@@ -110,7 +115,7 @@ export const getAnnunciMetaByCod = async ({ cod }: { cod: string }) => {
}
const ogImage =
annuncio.images && annuncio.images.length > 0 && annuncio.images[0]
- ? `${env.BASE_URL}/storage-api/get/${annuncio.images[0].img}?image=true`
+ ? `${env.BASE_URL}/storage-api/get/${annuncio.images[0].img}?image=true&cachekey=${annuncio.media_updated_at?.toString()}`
: `${env.BASE_URL}/og.jpg`;
return {