feat: public_url photobooth pour les medias dans la galerie
🚀 Deploy — JH Photomaton / 🔍 Vérification (push) Has been cancelled
🚀 Deploy — JH Photomaton / 🍓 Deploy sur le Pi (push) Has been cancelled

This commit is contained in:
2026-07-17 12:39:17 +02:00
parent 16bf9ddfb3
commit 49fa7a02ac
3 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -23,9 +23,10 @@ class AppConfig:
@dataclass
class PhotoboothConfig:
base_url: str = "http://localhost:8083"
base_url: str = "http://localhost:8000"
public_url: str = "" # URL publique pour les medias (ex: https://photobooth.lessapinsduweb.com)
data_dir: str = "/home/pi/photobooth-data"
config_file: str = "/home/pi/.config/photobooth-app/config.json"
config_file: str = "/home/pi/photobooth-data/config/config.json"
media_dir: str = "/home/pi/photobooth-data/media/processed_full"
userdata_dir: str = "/home/pi/photobooth-data/userdata"
show_delete_button: bool = False
+4 -2
View File
@@ -71,10 +71,12 @@ class PhotoboothService:
return False
def media_url(self, identifier: str) -> str:
return f"{self._base}/media/full/{identifier}"
base = (self._cfg.public_url.rstrip("/") or self._base)
return f"{base}/media/full/{identifier}"
def thumbnail_url(self, identifier: str) -> str:
return f"{self._base}/media/thumbnail/{identifier}"
base = (self._cfg.public_url.rstrip("/") or self._base)
return f"{base}/media/thumbnail/{identifier}"
async def read_pb_config(self) -> dict:
"""Lit le fichier config.json de photobooth-app."""
+1
View File
@@ -14,6 +14,7 @@ app:
# --- Integration photobooth-app ---
photobooth:
base_url: "http://localhost:8000"
public_url: "https://photobooth.lessapinsduweb.com" # URL publique pour les medias dans la galerie
data_dir: "/home/pi/photobooth-data"
config_file: "/home/pi/photobooth-data/config/config.json"
media_dir: "/home/pi/photobooth-data/media/processed_full"