commit 613017c8709203ca9398eca9bfc6990e256d23b6 Author: Abderrahim-Mouhcine Date: Sun Aug 16 19:57:59 2026 +0100 Initial upload: immich-tv-viewer diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3820a95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..da47f56 --- /dev/null +++ b/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "924134a44c189315be2148659913dda1671cbe99" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: android + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: ios + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: linux + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: macos + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: web + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + - platform: windows + create_revision: 924134a44c189315be2148659913dda1671cbe99 + base_revision: 924134a44c189315be2148659913dda1671cbe99 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/Music/README_PLACE_MP3_HERE.txt b/Music/README_PLACE_MP3_HERE.txt new file mode 100644 index 0000000..42a7d1f --- /dev/null +++ b/Music/README_PLACE_MP3_HERE.txt @@ -0,0 +1,11 @@ +Place tes fichiers MP3 ici. + +Exemples : +Music/chanson1.mp3 +Music/chanson2.mp3 + +Le dossier est déclaré dans pubspec.yaml avec : + assets: + - Music/ + +Ne supprime pas ce dossier. diff --git a/Music/andriig-melancholic-nostalgic-sentimental-music-497356 (1).mp3 b/Music/andriig-melancholic-nostalgic-sentimental-music-497356 (1).mp3 new file mode 100644 index 0000000..24ddd25 Binary files /dev/null and b/Music/andriig-melancholic-nostalgic-sentimental-music-497356 (1).mp3 differ diff --git a/Music/andriig-melancholic-nostalgic-sentimental-music-497356.mp3 b/Music/andriig-melancholic-nostalgic-sentimental-music-497356.mp3 new file mode 100644 index 0000000..24ddd25 Binary files /dev/null and b/Music/andriig-melancholic-nostalgic-sentimental-music-497356.mp3 differ diff --git a/Music/atlasaudio-nostalgic-511878.mp3 b/Music/atlasaudio-nostalgic-511878.mp3 new file mode 100644 index 0000000..153f8e8 Binary files /dev/null and b/Music/atlasaudio-nostalgic-511878.mp3 differ diff --git a/Music/leberch-nostalgia-437043.mp3 b/Music/leberch-nostalgia-437043.mp3 new file mode 100644 index 0000000..013e624 Binary files /dev/null and b/Music/leberch-nostalgia-437043.mp3 differ diff --git a/Music/leberch-winter-dew-248068.mp3 b/Music/leberch-winter-dew-248068.mp3 new file mode 100644 index 0000000..8c909a4 Binary files /dev/null and b/Music/leberch-winter-dew-248068.mp3 differ diff --git a/Music/tunetank-nostalgic-piano-ambient-349310.mp3 b/Music/tunetank-nostalgic-piano-ambient-349310.mp3 new file mode 100644 index 0000000..0bf2724 Binary files /dev/null and b/Music/tunetank-nostalgic-piano-ambient-349310.mp3 differ diff --git a/Music/welc0mei0-190117-chill-japan-calm-simple-nostalgic-143427.mp3 b/Music/welc0mei0-190117-chill-japan-calm-simple-nostalgic-143427.mp3 new file mode 100644 index 0000000..5c2b181 Binary files /dev/null and b/Music/welc0mei0-190117-chill-japan-calm-simple-nostalgic-143427.mp3 differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2f7d0c --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# immich_tv_viewer + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter) +- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/README_APPLICATION.txt b/README_APPLICATION.txt new file mode 100644 index 0000000..3f77ba1 --- /dev/null +++ b/README_APPLICATION.txt @@ -0,0 +1,49 @@ +# Immich TV Viewer - V1 + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers inclus + +- lib/main.dart +- android/app/src/main/AndroidManifest.xml +- android/app/src/main/res/xml/network_security_config.xml + +## Avant de lancer + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API Immich locale. + +L'URL serveur est déjà configurée : + +```dart +const String immichBaseUrl = 'http://192.168.1.29:2283/api'; +``` + +## Dépendance déjà ajoutée + +Tu as déjà exécuté : + +```powershell +flutter pub add http +``` + +## Test Windows + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d windows +``` + +## Test Google TV / Android TV + +```powershell +flutter devices +flutter run -d TON_DEVICE_ANDROID +``` diff --git a/README_V1_3_PHOTOS_ONLY.txt b/README_V1_3_PHOTOS_ONLY.txt new file mode 100644 index 0000000..5c1a05e --- /dev/null +++ b/README_V1_3_PHOTOS_ONLY.txt @@ -0,0 +1,50 @@ +# Immich TV Viewer - V1.3 Photos Only + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés + +- lib/main.dart + +## Objectif de cette version + +Cette version corrige le problème suivant : + +- Les vidéos apparaissaient dans V1.2 mais ne se lisaient pas. +- Certaines personnes sans photo restaient visibles dans la grille. + +## Changements + +- Les vidéos sont exclues. +- La recherche utilise de nouveau `type: IMAGE`. +- L'écran principal affiche uniquement les personnes qui ont au moins une photo. +- Avant d'afficher une personne, l'app teste rapidement si Immich renvoie au moins une photo pour cette personne. +- Les photos d'une personne sont paginées. +- Les miniatures gardent le fallback : + 1. `thumbnail?size=preview` + 2. puis `thumbnail?size=thumbnail` + 3. puis message clair si la miniature est indisponible. + +## Attention + +Le premier chargement est plus long, car l'app vérifie les personnes une par une par petits groupes. +C'est volontaire pour éviter d'afficher des personnes sans photos. + +## Après extraction + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API Immich locale. + +## Commande de test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V1_4_DEBUG_TOOLS.txt b/README_V1_4_DEBUG_TOOLS.txt new file mode 100644 index 0000000..6f039ae --- /dev/null +++ b/README_V1_4_DEBUG_TOOLS.txt @@ -0,0 +1,55 @@ +# Immich TV Viewer - V1.4 Debug Tools + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- tools/immich_debug_person.ps1 +- tools/immich_debug_people_sample.ps1 +- README_V1_4_DEBUG_TOOLS.txt + +## Changements dans l'app + +- Affiche les 8 premiers caractères de l'ID personne sous chaque visage. +- Affiche aussi l'ID court dans le titre de l'écran photos. +- Ajoute des logs Flutter `IMMICH_DEBUG` dans la console quand on ouvre une personne et quand on charge les photos. +- Corrige la boucle de pagination photos pour ne pas refaire deux fois la même requête par page. + +## Test manuel d'une personne précise + +Dans PowerShell : + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +$env:IMMICH_KEY = "TA_CLE_API" +.\tools\immich_debug_person.ps1 -PersonId "ID_PERSONNE_ICI" +``` + +Le script crée : + +- `debug_person_xxxxxxxx.json` +- `person_xxxxxxxx.jpg` +- `asset_preview_xxxxxxxx.jpg` +- `asset_thumb_xxxxxxxx.jpg` + +## Test global rapide + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +$env:IMMICH_KEY = "TA_CLE_API" +.\tools\immich_debug_people_sample.ps1 +``` + +Le script crée : + +- `immich_people_photo_debug.csv` + +## Lancer l'app + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V1_5_AUTHENTICATED_IMAGES.txt b/README_V1_5_AUTHENTICATED_IMAGES.txt new file mode 100644 index 0000000..7add93a --- /dev/null +++ b/README_V1_5_AUTHENTICATED_IMAGES.txt @@ -0,0 +1,71 @@ +# Immich TV Viewer - V1.5 Authenticated Images + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- tools/immich_debug_person.ps1 +- tools/immich_debug_people_sample.ps1 +- README_V1_5_AUTHENTICATED_IMAGES.txt + +## Pourquoi cette version existe + +Le test manuel PowerShell a prouvé que pour la personne : + +8d3a46fe-5100-4785-bab6-b6fdf062fe69 + +Immich renvoie bien : + +- 20 images sur la première page +- nextPage = 2 +- une miniature preview valide +- une miniature thumbnail valide + +Donc le problème n'est pas l'API Immich. +Le problème probable vient de l'affichage Flutter avec `Image.network`. + +## Correction V1.5 + +- Remplacement de `Image.network` par un téléchargement manuel avec `http.get`. +- L'app envoie elle-même le header `x-api-key`. +- L'image est ensuite affichée via `Image.memory`. +- Ajout de logs `IMMICH_IMAGE_FETCH` dans la console Flutter : + - status HTTP + - taille en bytes + - URL testée +- Cache mémoire simple pour éviter de retélécharger la même image trop souvent. + +## Après extraction + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API Immich locale. + +## Commande de test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` + +## Ce qu'il faut regarder dans PowerShell + +Quand tu cliques sur une personne, cherche : + +```text +IMMICH_DEBUG selected person ... +IMMICH_DEBUG person=... page=1 rawItems=... +IMMICH_DEBUG person=... totalPhotos=... +IMMICH_IMAGE_FETCH status=200 bytes=... +``` + +Si `IMMICH_IMAGE_FETCH status=200 bytes=287000` apparaît mais rien ne s'affiche, alors le problème est le décodage image Flutter/TV. +Si `status=401`, c'est la clé API. +Si `status=404`, l'URL ou l'asset pose problème. diff --git a/README_V1_6_TV_SELECT_FIX.txt b/README_V1_6_TV_SELECT_FIX.txt new file mode 100644 index 0000000..80b7782 --- /dev/null +++ b/README_V1_6_TV_SELECT_FIX.txt @@ -0,0 +1,71 @@ +# Immich TV Viewer - V1.6 TV Select Fix + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- tools/immich_debug_person.ps1 +- tools/immich_debug_people_sample.ps1 +- README_V1_6_TV_SELECT_FIX.txt + +## Diagnostic + +Le test manuel PowerShell a montré que la personne : + +8d3a46fe-5100-4785-bab6-b6fdf062fe69 + +renvoie bien 20 images sur la première page, avec miniatures valides. + +Mais dans l'app, cliquer cette personne ne produit aucun log Flutter. +Donc `onPressed` n'est pas déclenché. + +## Correction V1.6 + +Le composant `TvCard` ne dépend plus seulement de `InkWell`. +Il intercepte directement les touches TV : + +- select +- enter +- numpadEnter +- space +- gameButtonA +- labels possibles : ok, center, select, enter + +## Logs ajoutés + +Quand une carte personne reçoit le focus : + +```text +IMMICH_DEBUG focus person ... +``` + +Quand elle est activée : + +```text +IMMICH_DEBUG activate person ... +IMMICH_DEBUG selected person ... +``` + +## Test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` + +Sur la Mi Box : + +1. Va sur la carte `8d3a46fe` +2. Regarde si la console affiche `IMMICH_DEBUG focus person ...` +3. Appuie sur OK +4. Regarde si la console affiche `IMMICH_DEBUG activate person ...` + +## Interprétation + +- Si `focus` apparaît mais pas `activate` : touche OK non reconnue. +- Si ni `focus` ni `activate` n'apparaissent : la carte n'a pas le focus réel. +- Si `activate` apparaît mais pas `selected` : bug dans le callback. +- Si `selected` apparaît puis `rawItems=20` : l'écran photos doit s'ouvrir. diff --git a/README_V2_1_AUTO_ZAPPING.txt b/README_V2_1_AUTO_ZAPPING.txt new file mode 100644 index 0000000..03410ac --- /dev/null +++ b/README_V2_1_AUTO_ZAPPING.txt @@ -0,0 +1,37 @@ +# Immich TV Viewer - V2.1 Auto Zapping + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés + +- lib/main.dart +- README_V2_1_AUTO_ZAPPING.txt + +## Nouvelle fonctionnalité + +Dans la visionneuse photo : + +- Si l'utilisateur reste sur une image pendant 1 minute sans action, le zapping automatique démarre. +- Une fois lancé, l'app passe automatiquement à la photo suivante toutes les 10 secondes. +- À la fin de la liste, le zapping revient à la première photo. +- Appuyer sur gauche, droite, OK, entrée ou retour coupe/réinitialise le zapping. +- Un indicateur `Zapping auto • 10s` apparaît en bas à gauche pendant le mode automatique. + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_2_SURPRENDS_MOI.txt b/README_V2_2_SURPRENDS_MOI.txt new file mode 100644 index 0000000..40f8742 --- /dev/null +++ b/README_V2_2_SURPRENDS_MOI.txt @@ -0,0 +1,39 @@ +# Immich TV Viewer - V2.2 Surprends-moi + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés + +- lib/main.dart +- README_V2_2_SURPRENDS_MOI.txt + +## Nouvelle fonctionnalité + +Ajout d'un menu gauche : + +- Photos +- Explorer +- Surprends-moi + +## Surprends-moi + +Ce menu charge les photos, mélange la liste aléatoirement et lance un zapping automatique avec changement toutes les 10 secondes. + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_3_1_FIX_MAXPAGES.txt b/README_V2_3_1_FIX_MAXPAGES.txt new file mode 100644 index 0000000..f193f91 --- /dev/null +++ b/README_V2_3_1_FIX_MAXPAGES.txt @@ -0,0 +1,56 @@ +# Immich TV Viewer - V2.3.1 Fix maxPages + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt +- README_V2_3_1_FIX_MAXPAGES.txt + +## Correction + +Corrige l'erreur Dart : + +```text +The argument type 'int?' can't be assigned to the parameter type 'int' +``` + +Cause : + +- `getRandomTimelinePhotos({int? maxPages})` +- appelait `getAllTimelinePhotos(maxPages: maxPages)` +- mais `getAllTimelinePhotos` attendait encore un `int` + +Correction : + +- `getAllTimelinePhotos({int? maxPages})` +- si `maxPages == null`, l'app charge toutes les pages jusqu'à `nextPage == null` + +## Fonctionnalités conservées + +- Menu Photos +- Menu Explorer +- Menu Surprends-moi +- Zapping automatique après 1 minute dans la visionneuse +- Zapping aléatoire toutes les 10 secondes +- Écran gardé allumé via `FLAG_KEEP_SCREEN_ON` + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_3_2_FIX_MAXPAGES_CALL.txt b/README_V2_3_2_FIX_MAXPAGES_CALL.txt new file mode 100644 index 0000000..bce7085 --- /dev/null +++ b/README_V2_3_2_FIX_MAXPAGES_CALL.txt @@ -0,0 +1,30 @@ +# Immich TV Viewer - V2.3.2 Fix maxPages call + +Correction de compilation ligne 157. + +## Fichiers modifiés + +- lib/main.dart + +## Correction + +L'appel problématique : + +```dart +getAllTimelinePhotos(maxPages: maxPages) +``` + +est remplacé par : + +```dart +final photos = maxPages == null + ? await getAllTimelinePhotos() + : await getAllTimelinePhotos(maxPages: maxPages); +``` + +## Test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_3_3_FIX_MAXPAGES_SIMPLE.txt b/README_V2_3_3_FIX_MAXPAGES_SIMPLE.txt new file mode 100644 index 0000000..443aa68 --- /dev/null +++ b/README_V2_3_3_FIX_MAXPAGES_SIMPLE.txt @@ -0,0 +1,26 @@ +# Immich TV Viewer - V2.3.3 Fix maxPages simple + +Correction de compilation. + +## Fichiers modifiés + +- lib/main.dart + +## Correction + +`maxPages` n'est plus nullable. + +Les fonctions utilisent maintenant : + +```dart +int maxPages = 9999 +``` + +Cela veut dire : charger toutes les pages disponibles jusqu'à ce qu'Immich renvoie `nextPage == null`. + +## Test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_3_4_PHOTOS_ALL_PAGES.txt b/README_V2_3_4_PHOTOS_ALL_PAGES.txt new file mode 100644 index 0000000..d2d18b3 --- /dev/null +++ b/README_V2_3_4_PHOTOS_ALL_PAGES.txt @@ -0,0 +1,66 @@ +# Immich TV Viewer - V2.3.4 Photos All Pages + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- tools/immich_count_all_photos.ps1 +- android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt +- README_V2_3_4_PHOTOS_ALL_PAGES.txt + +## Correction + +La rubrique Photos était encore limitée à : + +```dart +ImmichApi.getAllTimelinePhotos(maxPages: 8) +``` + +Donc elle affichait environ : + +```text +8 pages × 250 = 2000 photos +``` + +Alors que Surprends-moi chargeait toutes les pages. + +Maintenant : + +```dart +ImmichApi.getAllTimelinePhotos() +``` + +est utilisé dans Photos et Surprends-moi. + +## Résultat attendu + +- Photos doit afficher le même ordre de grandeur que Surprends-moi +- Si Surprends-moi affiche 13000+, Photos doit afficher 13000+ aussi + +## Script manuel pour compter les photos + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +$env:IMMICH_KEY = "TA_CLE_API" +powershell -ExecutionPolicy Bypass -File .\tools\immich_count_all_photos.ps1 +``` + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_3_KEEP_AWAKE_ALL_PHOTOS.txt b/README_V2_3_KEEP_AWAKE_ALL_PHOTOS.txt new file mode 100644 index 0000000..840805c --- /dev/null +++ b/README_V2_3_KEEP_AWAKE_ALL_PHOTOS.txt @@ -0,0 +1,62 @@ +# Immich TV Viewer - V2.3 Keep Awake + Toutes les photos + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt +- README_V2_3_KEEP_AWAKE_ALL_PHOTOS.txt + +## Corrections + +### 1. Écran de veille Mi Box / Google TV + +Ajout de `FLAG_KEEP_SCREEN_ON` dans `MainActivity.kt`. + +Résultat : + +- l'écran de veille ne devrait plus se déclencher pendant l'application +- utile pendant le zapping automatique +- pas besoin d'ajouter un package Flutter + +### 2. Nombre de photos incohérent + +Avant : + +- Photos chargeait environ 2000 photos +- Surprends-moi chargeait environ 3000 photos + +Cause : + +- Photos utilisait `maxPages: 8` +- Surprends-moi utilisait `maxPages: 12` + +Correction : + +- Les deux modes chargent maintenant toutes les pages jusqu'à `nextPage == null` +- Le nombre affiché doit donc être cohérent entre Photos et Surprends-moi + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` + +## Note + +Le chargement initial peut être plus long si ta bibliothèque contient beaucoup de photos. +C'est normal : cette version cherche le total réel en parcourant toutes les pages. diff --git a/README_V2_4_1_FIX_MUSIC_MANIFEST.txt b/README_V2_4_1_FIX_MUSIC_MANIFEST.txt new file mode 100644 index 0000000..48f19a8 --- /dev/null +++ b/README_V2_4_1_FIX_MUSIC_MANIFEST.txt @@ -0,0 +1,66 @@ +# Immich TV Viewer - V2.4.1 Fix Music Manifest + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés + +- lib/main.dart +- pubspec.yaml +- README_V2_4_1_FIX_MUSIC_MANIFEST.txt + +## Correction + +La V2.4 cherchait les musiques via : + +```dart +rootBundle.loadString('AssetManifest.json') +``` + +Sur ta version Flutter / Android TV, ce fichier n'est pas disponible comme asset texte : + +```text +Unable to load asset: "AssetManifest.json" +``` + +La V2.4.1 utilise maintenant l'API moderne Flutter : + +```dart +AssetManifest.loadFromAssetBundle(rootBundle) +``` + +## Résultat attendu + +Au lancement de la visionneuse photo ou de Surprends-moi, tu dois voir : + +```text +IMMICH_MUSIC found X tracks +IMMICH_MUSIC play Music/nom_du_fichier.mp3 +``` + +## Vérification du dossier Music + +Tes fichiers doivent être ici : + +```text +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer\Music +``` + +Exemples : + +```text +Music\track01.mp3 +Music\track02.mp3 +``` + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +`flutter clean` est important ici, parce que les assets audio doivent être réembarqués dans l'APK. diff --git a/README_V2_4_RANDOM_MUSIC.txt b/README_V2_4_RANDOM_MUSIC.txt new file mode 100644 index 0000000..6cee80b --- /dev/null +++ b/README_V2_4_RANDOM_MUSIC.txt @@ -0,0 +1,88 @@ +# Immich TV Viewer - V2.4 Musique aléatoire + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- pubspec.yaml +- Music/README_PLACE_MP3_HERE.txt +- README_V2_4_RANDOM_MUSIC.txt + +## Nouvelle fonctionnalité + +La visionneuse photo lance une musique de fond aléatoire à partir du dossier : + +```text +Music/ +``` + +Formats acceptés par le filtre de l'app : + +- .mp3 +- .m4a +- .aac +- .wav +- .ogg + +## Fonctionnement + +- Quand tu ouvres une photo en plein écran, la musique démarre. +- Pendant Surprends-moi, la musique démarre aussi automatiquement. +- Quand un morceau finit, un autre morceau est choisi aléatoirement. +- Quand tu quittes la visionneuse photo, la musique s'arrête. + +## Important : fichiers MP3 + +Tes fichiers doivent être dans : + +```text +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer\Music +``` + +Exemple : + +```text +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer\Music\track01.mp3 +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer\Music\track02.mp3 +``` + +## Pubspec + +Cette version ajoute : + +```yaml +dependencies: + just_audio: ^0.9.42 + +flutter: + assets: + - Music/ +``` + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Logs utiles + +Dans PowerShell, tu peux voir : + +```text +IMMICH_MUSIC found X tracks +IMMICH_MUSIC play Music/nom_du_fichier.mp3 +``` + +Si tu vois : + +```text +IMMICH_MUSIC no music files found in Music/ +``` + +alors les fichiers ne sont pas inclus dans le build, ou le dossier n'est pas déclaré dans `pubspec.yaml`. diff --git a/README_V2_5_1_GLASS_OVERLAY_LOCATION_FIX.txt b/README_V2_5_1_GLASS_OVERLAY_LOCATION_FIX.txt new file mode 100644 index 0000000..854278c --- /dev/null +++ b/README_V2_5_1_GLASS_OVERLAY_LOCATION_FIX.txt @@ -0,0 +1,81 @@ +# Immich TV Viewer - V2.5.1 Glass Overlay + Location Fix + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.5. + +## Fichiers modifiés + +- lib/main.dart +- README_V2_5_1_GLASS_OVERLAY_LOCATION_FIX.txt + +## Corrections + +### 1. Lieu de la photo + +Avant, l'overlay utilisait principalement les données renvoyées par `/search/metadata`. +Cet endpoint ne contient pas toujours les détails EXIF complets. + +Maintenant, pour l'overlay, l'app appelle : + +```text +/api/assets/{assetId} +``` + +et lit : + +```text +exifInfo.city +exifInfo.state +exifInfo.country +exifInfo.latitude +exifInfo.longitude +``` + +Si ville/région/pays sont absents mais que les coordonnées GPS existent, l'app affiche : + +```text +GPS 48.8566, 2.3522 +``` + +Si rien n'est disponible : + +```text +Lieu inconnu +``` + +### 2. Overlay plus discret + +L'overlay est maintenant : + +- plus petit +- placé en bas à gauche +- transparent +- style glass / brillant +- fond flouté via `BackdropFilter` +- disparition douce après 3 secondes + +## Logs utiles + +Dans PowerShell : + +```text +IMMICH_LOCATION asset=... location="..." date="..." +``` + +Si le log affiche toujours `Lieu inconnu`, alors Immich ne renvoie pas de ville/GPS pour cette photo dans `/api/assets/{id}`. + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +Ne pas oublier de remettre ta clé API dans `lib/main.dart` si le fichier est remplacé. diff --git a/README_V2_5_OVERLAY_DATE_POSITION.txt b/README_V2_5_OVERLAY_DATE_POSITION.txt new file mode 100644 index 0000000..2791d61 --- /dev/null +++ b/README_V2_5_OVERLAY_DATE_POSITION.txt @@ -0,0 +1,66 @@ +# Immich TV Viewer - V2.5 Overlay date + position + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.4.1 validée : + +- Photos OK +- Explorer OK +- Surprends-moi OK +- Zapping auto OK +- Écran gardé allumé OK +- Musique aléatoire OK + +## Fichiers modifiés + +- lib/main.dart +- README_V2_5_OVERLAY_DATE_POSITION.txt + +## Nouvelle fonctionnalité + +Dans la visionneuse photo : + +- affichage d'un overlay avec : + - position de la photo : ville, région, pays si disponibles + - date de la photo +- l'overlay reste visible 3 secondes +- puis il disparaît doucement +- l'overlay réapparaît à chaque changement de photo + +## Suppression + +L'affichage fixe du bas a été retiré : + +- compteur `42 / 13865` +- badge `Zapping auto • 10s` +- nom du fichier photo + +## Remarques + +La position dépend des données EXIF / géolocalisation renvoyées par Immich. +Si Immich ne renvoie pas de ville/région/pays, l'app affiche : + +```text +Lieu inconnu +``` + +Si la date est absente, l'app affiche : + +```text +Date inconnue +``` + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +Ne pas oublier de remettre ta clé API dans `lib/main.dart` si le fichier est remplacé. diff --git a/README_V2_6_1_FIX_KOTLIN_VIDEO_BUILD.txt b/README_V2_6_1_FIX_KOTLIN_VIDEO_BUILD.txt new file mode 100644 index 0000000..d8ba575 --- /dev/null +++ b/README_V2_6_1_FIX_KOTLIN_VIDEO_BUILD.txt @@ -0,0 +1,72 @@ +# Immich TV Viewer - V2.6.1 Fix Kotlin Video Build + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.6 Vidéos. + +## Problème corrigé + +Erreur : + +```text +Execution failed for task ':video_player_android:compileDebugKotlin' +Could not close incremental caches +this and base files have different roots: +C:\Users\...\Pub\Cache\... +D:\07-Logiciels\...\android +``` + +C'est un problème Kotlin / Gradle sous Windows avec le cache incrémental du plugin `video_player_android`. + +## Correction + +Ajout / modification de : + +```text +android/gradle.properties +``` + +avec : + +```properties +kotlin.incremental=false +kotlin.compiler.execution.strategy=in-process +``` + +Cela désactive le cache Kotlin incrémental et évite le daemon Kotlin pour ce projet. + +## Commandes recommandées + +Important : arrête les vieux daemons Gradle et nettoie les caches de build. + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +.\android\gradlew --stop + +Remove-Item -Recurse -Force .\build -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\android\.gradle -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\.dart_tool -ErrorAction SilentlyContinue + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Nouvelle rubrique conservée + +Menu : + +- Photos +- Vidéos +- Explorer +- Surprends-moi + +## Note + +La première compilation après cette correction peut être plus lente. +C'est normal : on force Kotlin à arrêter ses petits tours de cache cassé. diff --git a/README_V2_6_2_SKIP_INCOMPATIBLE_VIDEOS.txt b/README_V2_6_2_SKIP_INCOMPATIBLE_VIDEOS.txt new file mode 100644 index 0000000..23b3f66 --- /dev/null +++ b/README_V2_6_2_SKIP_INCOMPATIBLE_VIDEOS.txt @@ -0,0 +1,67 @@ +# Immich TV Viewer - V2.6.2 Skip Incompatible Videos + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.6.1. + +## Problème observé + +Erreur sur Mi Box : + +```text +PlatformException(VideoError...) +MediaCodecVideoRenderer error +format_supported=NO_EXCEEDS_CAPABILITIES +video/avc +3840x2160 +60 fps +``` + +Cela signifie que la vidéo dépasse les capacités du décodeur vidéo matériel de la Mi Box. + +## Correction + +Au lieu d'afficher un gros écran rouge : + +- l'app détecte les erreurs `NO_EXCEEDS_CAPABILITIES`, `MediaCodec`, `VideoRenderer` +- affiche `Vidéo incompatible Mi Box` +- attend 2 secondes +- passe automatiquement à la vidéo suivante + +## Navigation conservée + +- flèche droite : vidéo suivante +- flèche gauche : vidéo précédente +- OK / entrée : pause / lecture +- fin d'une vidéo compatible : passage automatique à la suivante +- vidéo incompatible : passage automatique à la suivante + +## Important + +Cette correction ne rend pas lisible une vidéo que le matériel ne sait pas décoder. +Elle évite seulement que le zapping vidéo se bloque dessus. + +Pour lire les vidéos 4K 60 H.264 sur Mi Box, il faudra : +- soit que Immich serve une version transcodée compatible +- soit convertir/transcoder les vidéos côté serveur +- soit filtrer les vidéos trop lourdes dans l'app + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +.\android\gradlew --stop + +Remove-Item -Recurse -Force .\build -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\android\.gradle -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\.dart_tool -ErrorAction SilentlyContinue + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_6_VIDEOS.txt b/README_V2_6_VIDEOS.txt new file mode 100644 index 0000000..5b3f0b0 --- /dev/null +++ b/README_V2_6_VIDEOS.txt @@ -0,0 +1,71 @@ +# Immich TV Viewer - V2.6 Vidéos + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.5.1 validée. + +## Fichiers modifiés + +- lib/main.dart +- pubspec.yaml +- README_V2_6_VIDEOS.txt + +## Nouvelle rubrique + +Ajout d'un menu gauche : + +- Photos +- Vidéos +- Explorer +- Surprends-moi + +## Fonctionnalités vidéo + +La rubrique `Vidéos` : + +- charge toutes les vidéos du serveur Immich via `/search/metadata` avec `type: VIDEO` +- affiche une grille de miniatures vidéo +- permet d'ouvrir une vidéo en plein écran +- lecture via endpoint Immich : + +```text +/api/assets/{assetId}/video/playback +``` + +- flèche droite : vidéo suivante +- flèche gauche : vidéo précédente +- OK / Entrée : pause / lecture +- fin d'une vidéo : passage automatique à la vidéo suivante +- à la fin de la liste : retour à la première vidéo + +## Dépendance ajoutée + +```yaml +dependencies: + video_player: ^2.9.2 +``` + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Logs utiles + +```text +IMMICH_VIDEO play ... +IMMICH_VIDEO error ... +``` + +## Note + +La lecture dépend des formats vidéo pris en charge par Android TV / ExoPlayer. +Si certaines vidéos HEVC/H.265 ne se lisent pas, il faudra activer/forcer le transcodage côté Immich ou ajouter une stratégie de fallback. diff --git a/README_V2_7_1_FIX_ANDROID_EMBEDDING.txt b/README_V2_7_1_FIX_ANDROID_EMBEDDING.txt new file mode 100644 index 0000000..2953c41 --- /dev/null +++ b/README_V2_7_1_FIX_ANDROID_EMBEDDING.txt @@ -0,0 +1,88 @@ +# Immich TV Viewer - V2.7.1 Fix Android Embedding + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.7 : + +- nom : Imedia Photos +- icône personnalisée +- banner TV +- vidéos avec skip des vidéos incompatibles + +## Problème corrigé + +Erreur : + +```text +Build failed due to use of deleted Android v1 embedding. +``` + +Cause probable : + +Le fichier AndroidManifest.xml ne déclarait plus correctement : + +```xml + +``` + +## Correction + +Manifest Android restauré proprement avec : + +- `android:name="${applicationName}"` +- `android:label="@string/app_name"` +- `android:icon="@mipmap/ic_launcher"` +- `android:banner="@drawable/tv_banner"` +- `android:usesCleartextTraffic="true"` +- `MainActivity` +- `LAUNCHER` +- `LEANBACK_LAUNCHER` +- `flutterEmbedding = 2` + +## Fichiers modifiés / ajoutés + +- android/app/src/main/AndroidManifest.xml +- android/app/src/main/res/values/strings.xml +- android/app/src/main/res/values/styles.xml +- android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt +- tools/check_android_manifest.ps1 +- README_V2_7_1_FIX_ANDROID_EMBEDDING.txt + +## Installation propre + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +.\android\gradlew --stop + +Remove-Item -Recurse -Force .\build -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\android\.gradle -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\.dart_tool -ErrorAction SilentlyContinue + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Vérification rapide + +```powershell +powershell -ExecutionPolicy Bypass -File .\tools\check_android_manifest.ps1 +``` + +Tu dois voir : + +```text +flutterEmbedding +MainActivity +LEANBACK_LAUNCHER +@string/app_name +@mipmap/ic_launcher +@drawable/tv_banner +``` diff --git a/README_V2_7_2_PERFORMANCE_THUMBNAILS.txt b/README_V2_7_2_PERFORMANCE_THUMBNAILS.txt new file mode 100644 index 0000000..21fcb96 --- /dev/null +++ b/README_V2_7_2_PERFORMANCE_THUMBNAILS.txt @@ -0,0 +1,87 @@ +# Immich TV Viewer - V2.7.2 Performance Thumbnails + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.7.1 : + +- Imedia Photos +- icône personnalisée +- Android embedding v2 corrigé +- vidéos conservées +- musique conservée +- overlay conservé + +## Problème observé + +La console affichait : + +```text +Skipped 824 frames +The application may be doing too much work on its main thread +``` + +et des miniatures chargées en `size=preview` avec parfois plus de 1 Mo : + +```text +thumbnail?size=preview bytes=1385699 +``` + +Sur Mi Box, afficher une grille avec autant d'images lourdes provoque des ralentissements. + +## Correction + +### Grilles + +Les grilles utilisent maintenant : + +```text +thumbnail?size=thumbnail +``` + +pour : + +- Photos +- Vidéos +- Surprends-moi + +### Plein écran + +La visionneuse garde : + +```text +thumbnail?size=preview +``` + +pour conserver une meilleure qualité quand une photo est affichée seule. + +### Cache + +Le cache image est limité à environ 180 entrées pour éviter de saturer la mémoire. + +### Logs + +Les logs d'images sont réduits : + +- les previews sont encore logguées +- les erreurs sont logguées +- les petites miniatures de grille ne floodent plus la console + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +.\android\gradlew --stop + +Remove-Item -Recurse -Force .\build -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\android\.gradle -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force .\.dart_tool -ErrorAction SilentlyContinue + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_7_3_EXIT_CONFIRMATION.txt b/README_V2_7_3_EXIT_CONFIRMATION.txt new file mode 100644 index 0000000..6e5906b --- /dev/null +++ b/README_V2_7_3_EXIT_CONFIRMATION.txt @@ -0,0 +1,52 @@ +# Immich TV Viewer - V2.7.3 Confirmation de sortie + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.7.2 : + +- Imedia Photos +- icône personnalisée +- performances miniatures améliorées +- vidéos +- musique +- overlay date / lieu + +## Nouvelle fonctionnalité + +Quand l'utilisateur appuie sur retour depuis l'écran principal, l'app n'est plus fermée brusquement. + +Une confirmation apparaît : + +```text +Quitter Imedia Photos ? +Tu veux vraiment fermer l’application ? +``` + +Boutons : + +- Annuler +- Quitter + +## Comportement + +- Depuis l'écran principal : confirmation avant fermeture +- Depuis les écrans internes : retour normal vers l'écran précédent +- Si l'utilisateur confirme : fermeture via `SystemNavigator.pop()` + +## Fichier modifié + +- lib/main.dart + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_7_IMEDIA_PHOTOS_NAME_ICON.txt b/README_V2_7_IMEDIA_PHOTOS_NAME_ICON.txt new file mode 100644 index 0000000..b309fae --- /dev/null +++ b/README_V2_7_IMEDIA_PHOTOS_NAME_ICON.txt @@ -0,0 +1,78 @@ +# Immich TV Viewer - V2.7 Imedia Photos + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.6.2. + +## Changements + +### Nom de l'application + +L'application est renommée : + +```text +Imedia Photos +``` + +Modifications : + +- `MaterialApp.title` +- `android:label` +- ressource Android `@string/app_name` + +### Icône + +Ajout d'une icône personnalisée : + +- fond sombre moderne +- carte photo +- symbole lecture / média +- style adapté TV / photos + +Fichiers générés : + +```text +android/app/src/main/res/mipmap-mdpi/ic_launcher.png +android/app/src/main/res/mipmap-hdpi/ic_launcher.png +android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +android/app/src/main/res/drawable/tv_banner.png +assets/generated/imedia_photos_icon_1024.png +``` + +## Fichiers modifiés / ajoutés + +- lib/main.dart +- android/app/src/main/AndroidManifest.xml +- android/app/src/main/res/values/strings.xml +- android/app/src/main/res/mipmap-*/ic_launcher.png +- android/app/src/main/res/drawable/tv_banner.png +- assets/generated/imedia_photos_icon_1024.png +- README_V2_7_IMEDIA_PHOTOS_NAME_ICON.txt + +## Installation / test + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Si l'ancienne icône reste affichée + +Android TV garde parfois l'icône en cache. Dans ce cas : + +```powershell +adb connect 192.168.1.8:5555 +adb shell pm clear com.example.immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` + +Ou désinstalle puis réinstalle l'application. diff --git a/README_V2_8_1_FIX_CONST_DELAY.txt b/README_V2_8_1_FIX_CONST_DELAY.txt new file mode 100644 index 0000000..35b498a --- /dev/null +++ b/README_V2_8_1_FIX_CONST_DELAY.txt @@ -0,0 +1,41 @@ +# Imedia Photos - V2.8.1 Fix Const Delay + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.8 Settings. + +## Problème corrigé + +Erreur build : + +```text +Constant evaluation error +The invocation of 'autoDelaySeconds' is not allowed in a constant expression. +``` + +Cause : + +Le texte dynamique suivant était dans un `const Row` : + +```dart +Text('${AppSettings.autoDelaySeconds} secondes par photo') +``` + +## Correction + +Le `Row` n'est plus `const`. +Les widgets internes qui peuvent rester constants gardent leur `const`. + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_8_2_TV_SETTINGS_UI_FIX.txt b/README_V2_8_2_TV_SETTINGS_UI_FIX.txt new file mode 100644 index 0000000..fa97a6f --- /dev/null +++ b/README_V2_8_2_TV_SETTINGS_UI_FIX.txt @@ -0,0 +1,79 @@ +# Imedia Photos - V2.8.2 TV Settings UI Fix + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.8.1. + +## Problèmes corrigés + +### 1. Barres jaunes dans Paramètres + +Les barres jaunes venaient d'un overflow Flutter dans le menu gauche. + +Correction : + +- largeur du menu gauche réduite à 178 px +- icônes réduites +- textes réduits +- espacements réduits +- libellés raccourcis : + - Surprends-moi -> Surprise + - Paramètres -> Réglages + +### 2. Clavier qui cache la clé API + +L'écran Paramètres est maintenant séparé en 3 onglets : + +- Serveur +- Clé API +- Zapping + +La clé API est seule sur sa page, donc le clavier ne recouvre plus tout le formulaire. + +### 3. OK / clavier TV + +Les champs de texte ont été améliorés pour Android TV : + +- focus dédié par champ +- appui OK / Entrée pris en charge +- affichage forcé du clavier +- scroll automatique vers le champ actif +- validation clavier ferme le clavier + +### 4. Menus diminués + +Le menu gauche est réduit d'environ 50% visuellement. + +## Fichiers modifiés + +- lib/main.dart + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Utilisation + +Dans Paramètres : + +1. Onglet Serveur + - IP Immich + - Port + +2. Onglet Clé API + - colle la clé API + +3. Onglet Zapping + - délai entre deux photos + +Ensuite bouton Enregistrer. diff --git a/README_V2_8_3_TV_SETTINGS_DIALOGS.txt b/README_V2_8_3_TV_SETTINGS_DIALOGS.txt new file mode 100644 index 0000000..67e5bcc --- /dev/null +++ b/README_V2_8_3_TV_SETTINGS_DIALOGS.txt @@ -0,0 +1,69 @@ +# Imedia Photos - V2.8.3 TV Settings Dialogs + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.8.2. + +## Problème corrigé + +Sur Android TV, les champs texte de la page Réglages pouvaient piéger le focus : + +- impossible de sortir proprement du champ +- retour affichait la confirmation de sortie de l'application +- le clavier pouvait rester coincé ou ne plus se rouvrir correctement + +## Nouvelle solution + +La page Réglages n'utilise plus de champs texte directement. + +Chaque paramètre est maintenant une ligne-bouton : + +- Adresse IP +- Port +- Clé API Immich +- Délai auto + +Quand on appuie sur OK : + +- une fenêtre d'édition s'ouvre +- le clavier s'affiche dans cette fenêtre +- OK valide +- Annuler annule +- Retour ferme la fenêtre / le clavier, pas l'application + +## Autre correction + +Le bouton Retour de l'écran principal vérifie maintenant si un champ texte est actif. +Si oui : + +- il ferme le clavier +- il quitte le champ +- il n'affiche pas la confirmation de sortie de l'application + +## Fichiers modifiés + +- lib/main.dart + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Utilisation + +Dans Réglages : + +1. Sélectionne une ligne avec la télécommande. +2. Appuie sur OK. +3. Modifie la valeur dans la fenêtre. +4. Valide avec OK. +5. Appuie sur Enregistrer en bas. diff --git a/README_V2_8_4_TV_FOCUS_BACK_NAVIGATION.txt b/README_V2_8_4_TV_FOCUS_BACK_NAVIGATION.txt new file mode 100644 index 0000000..c3cf521 --- /dev/null +++ b/README_V2_8_4_TV_FOCUS_BACK_NAVIGATION.txt @@ -0,0 +1,59 @@ +# Imedia Photos - V2.8.4 TV Focus Back Navigation + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.8.3. + +## Problème corrigé + +Sur Android TV, après ouverture d'une zone texte : + +- impossible de sortir correctement du focus +- bouton Retour affichait la confirmation de sortie de l'application +- haut/bas ne permettaient pas de naviguer vers les boutons + +## Nouvelle logique + +### Page Réglages + +Les paramètres sont des lignes-boutons : + +- Adresse IP +- Port +- Clé API Immich +- Délai auto + +OK ouvre une fenêtre d'édition. + +### Fenêtre d'édition + +Dans la zone texte : + +- Bas ou Droite : ferme le clavier et met le focus sur OK +- Haut ou Gauche : ferme le clavier et met le focus sur Annuler +- Retour : ferme le clavier et met le focus sur OK +- OK clavier : valide la valeur + +Hors zone texte : + +- Retour : ferme la fenêtre +- OK sur OK : valide +- OK sur Annuler : annule + +## Fichiers modifiés + +- lib/main.dart + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_8_5_DIRECT_TV_FOCUS_SETTINGS.txt b/README_V2_8_5_DIRECT_TV_FOCUS_SETTINGS.txt new file mode 100644 index 0000000..ccd8404 --- /dev/null +++ b/README_V2_8_5_DIRECT_TV_FOCUS_SETTINGS.txt @@ -0,0 +1,64 @@ +# Imedia Photos - V2.8.5 Direct TV Focus Settings + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.8.4. + +## Navigation demandée + +### Onglet Serveur + +Depuis le champ Adresse IP : + +- flèche haut : bouton Serveur +- flèche bas : champ Port + +Depuis le champ Port : + +- flèche haut : champ Adresse IP +- flèche bas : bouton Enregistrer + +Depuis le bouton Serveur : + +- flèche bas : champ Adresse IP +- flèche droite : bouton Clé API + +### Onglet Clé API + +Depuis le champ Clé API : + +- flèche haut : bouton Clé API +- flèche bas : bouton Enregistrer + +### Onglet Zapping + +Depuis le champ Délai : + +- flèche haut : bouton Zapping +- flèche bas : bouton Enregistrer + +## Bouton Retour + +Si le focus est dans un champ de réglage : + +- Retour ferme le clavier +- Retour renvoie le focus au bouton de l'onglet actif +- La confirmation de sortie de l'application ne s'affiche pas + +## Fichiers modifiés + +- lib/main.dart + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` diff --git a/README_V2_8_SETTINGS.txt b/README_V2_8_SETTINGS.txt new file mode 100644 index 0000000..ebc82c3 --- /dev/null +++ b/README_V2_8_SETTINGS.txt @@ -0,0 +1,85 @@ +# Imedia Photos - V2.8 Paramètres + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Base + +Cette version part de la V2.7.3. + +## Nouvelle rubrique + +Ajout d'un menu gauche : + +- Photos +- Vidéos +- Explorer +- Surprends-moi +- Paramètres + +## Paramètres disponibles + +### Serveur Immich + +- Adresse IP du serveur Immich +- Port de connexion Immich + +L'application construit automatiquement : + +```text +http://IP:PORT/api +``` + +Exemple : + +```text +192.168.1.29 +2283 +``` + +### Clé API Immich + +L'application utilise la clé API via le header : + +```text +x-api-key +``` + +Elle n'a pas besoin du compte/mot de passe Immich. + +### Zapping photo + +- Délai entre deux photos en mode auto +- Valeur acceptée : 3 à 300 secondes +- Valeur par défaut : 10 secondes + +## Stockage local + +Les paramètres sont sauvegardés localement avec `shared_preferences`. + +## Dépendance ajoutée + +```yaml +shared_preferences: ^2.3.5 +``` + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +flutter clean +flutter pub get +flutter run -d 192.168.1.8:5555 +``` + +## Important + +Après avoir changé l'IP, le port ou la clé API, retourne dans Photos / Explorer / Surprends-moi et utilise Rafraîchir si nécessaire. + +## Réponse à la question compte/mot de passe + +Non, l'application n'a pas besoin du login/mot de passe Immich. +Elle a seulement besoin d'une clé API générée dans Immich. +C'est plus propre et plus sûr que de stocker le mot de passe utilisateur. diff --git a/README_V2_UI_PHOTOS_EXPLORER.txt b/README_V2_UI_PHOTOS_EXPLORER.txt new file mode 100644 index 0000000..4e859d4 --- /dev/null +++ b/README_V2_UI_PHOTOS_EXPLORER.txt @@ -0,0 +1,37 @@ +# Immich TV Viewer - V2 UI Photos + Explorer + +Projet cible : + +D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer + +## Fichiers modifiés + +- lib/main.dart +- README_V2_UI_PHOTOS_EXPLORER.txt + +## Nouveautés + +- Interface type Immich avec menu gauche. +- Menu limité à `Photos` et `Explorer`. +- `Photos` affiche les photos de la bibliothèque Immich. +- `Explorer` affiche les personnes. +- Sélection d'une personne = affichage de ses photos. +- Vidéos exclues pour l'instant. +- Images chargées avec `http.get` + `Image.memory`, pas `Image.network`. + +## Important + +Dans `lib/main.dart`, remplace : + +```dart +const String immichApiKey = 'COLLE_TA_CLE_API_ICI'; +``` + +par ta vraie clé API. + +## Installation + +```powershell +cd D:\07-Logiciels\17-IMMICH-TV\immich_tv_viewer +flutter run -d 192.168.1.8:5555 +``` diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..be3943c --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts new file mode 100644 index 0000000..10bd665 --- /dev/null +++ b/android/app/build.gradle.kts @@ -0,0 +1,45 @@ +plugins { + id("com.android.application") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.immich_tv_viewer" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.immich_tv_viewer" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + +flutter { + source = "../.." +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..e5c4a25 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt b/android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt new file mode 100644 index 0000000..a3020eb --- /dev/null +++ b/android/app/src/main/kotlin/com/example/immich_tv_viewer/MainActivity.kt @@ -0,0 +1,12 @@ +package com.example.immich_tv_viewer + +import android.os.Bundle +import android.view.WindowManager +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + } +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/tv_banner.png b/android/app/src/main/res/drawable/tv_banner.png new file mode 100644 index 0000000..7c7816f Binary files /dev/null and b/android/app/src/main/res/drawable/tv_banner.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..b64ce0f Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..2a12561 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..1975b5b Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..0ee9088 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..2b8f1f8 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..a6579bd --- /dev/null +++ b/android/app/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Imedia Photos + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d4690c2 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..2439f15 --- /dev/null +++ b/android/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle.kts b/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..0eec844 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,11 @@ + +# Fix Windows/Kotlin cache issue with video_player_android +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true +kotlin.incremental=false +kotlin.compiler.execution.strategy=in-process +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..2d428bf --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts new file mode 100644 index 0000000..c21f0c5 --- /dev/null +++ b/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "9.0.1" apply false + id("org.jetbrains.kotlin.android") version "2.3.20" apply false +} + +include(":app") diff --git a/asset_preview_1abf2f00.jpg b/asset_preview_1abf2f00.jpg new file mode 100644 index 0000000..31701f0 Binary files /dev/null and b/asset_preview_1abf2f00.jpg differ diff --git a/asset_thumb_1abf2f00.jpg b/asset_thumb_1abf2f00.jpg new file mode 100644 index 0000000..9bd8c0e Binary files /dev/null and b/asset_thumb_1abf2f00.jpg differ diff --git a/assets/generated/imedia_photos_icon_1024.png b/assets/generated/imedia_photos_icon_1024.png new file mode 100644 index 0000000..605bb57 Binary files /dev/null and b/assets/generated/imedia_photos_icon_1024.png differ diff --git a/debug_person_8d3a46fe.json b/debug_person_8d3a46fe.json new file mode 100644 index 0000000..55c83e2 --- /dev/null +++ b/debug_person_8d3a46fe.json @@ -0,0 +1,1498 @@ +{ + "albums": { + "total": 0, + "count": 0, + "items": [ + + ], + "facets": [ + + ] + }, + "assets": { + "total": 20, + "count": 20, + "items": [ + { + "id": "1abf2f00-2b25-467d-85fe-047ca78e4bf2", + "createdAt": "2026-06-24T12:03:43.896Z", + "deviceAssetId": "1000076429", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-23/IMG_20260623_100507.jpg", + "originalFileName": "IMG_20260623_100507.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "4igKDYKih6fPWIhnhld3aUnPyOB9", + "fileCreatedAt": "2026-06-23T09:05:07.427Z", + "fileModifiedAt": "2026-06-23T09:05:07.000Z", + "localDateTime": "2026-06-23T10:05:07.427Z", + "updatedAt": "2026-06-24T12:03:46.674Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "db744670-7c48-4743-ba48-bdf524608517", + "boundingBoxX1": 752, + "boundingBoxY1": 247, + "boundingBoxX2": 1115, + "boundingBoxY2": 713, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "885efd62-a3bb-4c80-bf4b-4f4f4003e6fe", + "boundingBoxX1": 1202, + "boundingBoxY1": 797, + "boundingBoxX2": 1432, + "boundingBoxY2": 1087, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "Th/hzYtnFmg/gPw4W5uudyOWif0=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "9b1c8a3c-2093-4d15-8f36-d1ca5684178b", + "createdAt": "2026-06-19T17:57:24.483Z", + "deviceAssetId": "1000075985", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-19/IMG_20260619_185456.jpg", + "originalFileName": "IMG_20260619_185456.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "ZRgWDQKXeX93V2eHiIdniFp/k9AY", + "fileCreatedAt": "2026-06-19T17:54:56.399Z", + "fileModifiedAt": "2026-06-19T17:54:56.000Z", + "localDateTime": "2026-06-19T18:54:56.399Z", + "updatedAt": "2026-06-19T17:57:26.953Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "a77fcc8c-8ce8-4f15-aa4d-5e190dab1a29", + "boundingBoxX1": 510, + "boundingBoxY1": 776, + "boundingBoxX2": 942, + "boundingBoxY2": 1395, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "b+3cDqKJdV0NPGNCRaL/KYYtrq4=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "40a3dc6d-92f1-4c74-8d3f-d042c27c9e05", + "createdAt": "2026-06-12T18:59:08.033Z", + "deviceAssetId": "1000060891", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-07/IMG_20260607_211754.jpg", + "originalFileName": "IMG_20260607_211754.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "4CgODYIvl5d9eXloeHd3iF95+WWn", + "fileCreatedAt": "2026-06-07T20:17:54.330Z", + "fileModifiedAt": "2026-06-07T20:17:54.000Z", + "localDateTime": "2026-06-07T21:17:54.330Z", + "updatedAt": "2026-06-12T18:59:18.883Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "b4ec24ae-0e6b-4911-9df1-59b0fa8cc221", + "boundingBoxX1": 1338, + "boundingBoxY1": 114, + "boundingBoxX2": 1673, + "boundingBoxY2": 483, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "a08d4b27-fa4e-48cf-abc1-ded9d6a5b432", + "boundingBoxX1": 1089, + "boundingBoxY1": 651, + "boundingBoxX2": 1347, + "boundingBoxY2": 959, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "lK9XUDQE9mUX1p8cG4y1SEcwKb8=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "2893205e-9cde-4b7c-8aaa-26dfc4b90719", + "createdAt": "2026-06-12T18:59:08.189Z", + "deviceAssetId": "1000060890", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-07/IMG_20260607_211750.jpg", + "originalFileName": "IMG_20260607_211750.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "qSgKDYIfiZaKeWlaeWdoiZ81/FnU", + "fileCreatedAt": "2026-06-07T20:17:50.635Z", + "fileModifiedAt": "2026-06-07T20:17:50.000Z", + "localDateTime": "2026-06-07T21:17:50.635Z", + "updatedAt": "2026-06-12T18:59:18.667Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "86ffc739-4376-42f9-862f-25cc63d1416f", + "boundingBoxX1": 1368, + "boundingBoxY1": -26, + "boundingBoxX2": 1726, + "boundingBoxY2": 409, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "64a35d57-ae58-467c-8965-e8093f0ba389", + "boundingBoxX1": 1104, + "boundingBoxY1": 583, + "boundingBoxX2": 1382, + "boundingBoxY2": 893, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "k7qvk2N/cDMleatSVKAVD3u6gHU=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "883cfc16-81c8-4192-856d-650268ba9e9f", + "createdAt": "2026-06-12T18:59:08.355Z", + "deviceAssetId": "1000060889", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-07/IMG_20260607_211745.jpg", + "originalFileName": "IMG_20260607_211745.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "5igOFYKOhXhfh4eGh3h4eI9695dm", + "fileCreatedAt": "2026-06-07T20:17:45.871Z", + "fileModifiedAt": "2026-06-07T20:17:45.000Z", + "localDateTime": "2026-06-07T21:17:45.871Z", + "updatedAt": "2026-06-12T18:59:19.128Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "da7c930d-645b-4f55-9c7a-36fc8e7090e4", + "boundingBoxX1": 1046, + "boundingBoxY1": 471, + "boundingBoxX2": 1319, + "boundingBoxY2": 797, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "3c5d3213-754b-4b50-8ef7-781f743ef0ee", + "boundingBoxX1": 758, + "boundingBoxY1": 919, + "boundingBoxX2": 1027, + "boundingBoxY2": 1248, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "CoOdqAvh+efhyXlXP+bJuwWRQDo=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "ecdeca7a-7220-4d9f-a4c0-64d27400c363", + "createdAt": "2026-06-12T19:00:35.180Z", + "deviceAssetId": "1000060154", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-06-01/IMG_20260601_112814.jpg", + "originalFileName": "IMG_20260601_112814.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "IwgWHQSXeH93V3iXh3hoiHZ9QKUH", + "fileCreatedAt": "2026-06-01T10:28:14.255Z", + "fileModifiedAt": "2026-06-01T10:28:14.000Z", + "localDateTime": "2026-06-01T11:28:14.255Z", + "updatedAt": "2026-06-12T19:00:41.186Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "3398007a-2851-45ab-b9f9-7822a8c01cbd", + "boundingBoxX1": 470, + "boundingBoxY1": 730, + "boundingBoxX2": 894, + "boundingBoxY2": 1357, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "3jOTv5cJldJBzLf5cdHjpL+gnPw=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "8b9f331e-b444-4058-99aa-a5c98e8bd7e5", + "createdAt": "2026-05-27T08:04:58.422Z", + "deviceAssetId": "1000059674", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-27/IMG_20260527_090418.jpg", + "originalFileName": "IMG_20260527_090418.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "qQgKBYJWZ3j2SJZ1mLd0ag6XYpBE", + "fileCreatedAt": "2026-05-27T08:04:18.282Z", + "fileModifiedAt": "2026-05-27T08:04:18.000Z", + "localDateTime": "2026-05-27T09:04:18.282Z", + "updatedAt": "2026-05-27T08:05:01.676Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "6d887bb1-375b-4937-bc01-188484566197", + "boundingBoxX1": 287, + "boundingBoxY1": 851, + "boundingBoxX2": 585, + "boundingBoxY2": 1230, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "6bbc393a-f4ef-4118-a269-343409289f72", + "boundingBoxX1": 829, + "boundingBoxY1": 178, + "boundingBoxX2": 1345, + "boundingBoxY2": 710, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "t0BgPsajlSY8pw4xnrXGjdAXxXs=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "bbf76948-484c-4769-9a09-3d97d993e756", + "createdAt": "2026-05-27T08:04:58.922Z", + "deviceAssetId": "1000059673", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-27/IMG_20260527_090415.jpg", + "originalFileName": "IMG_20260527_090415.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "qAgKBYJViHj3OIZzmKd2aRy/UOA1", + "fileCreatedAt": "2026-05-27T08:04:15.613Z", + "fileModifiedAt": "2026-05-27T08:04:15.000Z", + "localDateTime": "2026-05-27T09:04:15.613Z", + "updatedAt": "2026-05-27T08:05:01.699Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "debac5c9-c237-485f-98b2-2d7acf809943", + "boundingBoxX1": 277, + "boundingBoxY1": 778, + "boundingBoxX2": 548, + "boundingBoxY2": 1122, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "f874f3b6-ef70-451a-97d0-35051c746cea", + "boundingBoxX1": 855, + "boundingBoxY1": 128, + "boundingBoxX2": 1359, + "boundingBoxY2": 660, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "lMnpZLQg5SFF///jTBJUjoyrc0w=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "dfb666e1-5216-4ce9-9600-b7c0127a6aea", + "createdAt": "2026-05-27T08:04:59.336Z", + "deviceAssetId": "1000059672", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-27/IMG_20260527_090412.jpg", + "originalFileName": "IMG_20260527_090412.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "ZwgKDYJVinj3NpaSmId3aEe/Q/JX", + "fileCreatedAt": "2026-05-27T08:04:12.963Z", + "fileModifiedAt": "2026-05-27T08:04:12.000Z", + "localDateTime": "2026-05-27T09:04:12.963Z", + "updatedAt": "2026-05-27T08:05:02.242Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "c120df1b-4c99-4fae-b37c-7b96860c6863", + "boundingBoxX1": 398, + "boundingBoxY1": 733, + "boundingBoxX2": 643, + "boundingBoxY2": 1026, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "80bb7b22-783e-4836-abfd-0119a1977585", + "boundingBoxX1": 910, + "boundingBoxY1": 79, + "boundingBoxX2": 1336, + "boundingBoxY2": 620, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "TuBC04Ed6lzTHJ1xwhe5rhZgn/c=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "35fd9e54-74cb-4eb5-ab12-0863a2a47407", + "createdAt": "2026-05-27T08:04:59.777Z", + "deviceAssetId": "1000059671", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-27/IMG_20260527_090410.jpg", + "originalFileName": "IMG_20260527_090410.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "aAgKBYJHenf3NZeDqKh2aSqvMeA0", + "fileCreatedAt": "2026-05-27T08:04:10.756Z", + "fileModifiedAt": "2026-05-27T08:04:10.000Z", + "localDateTime": "2026-05-27T09:04:10.756Z", + "updatedAt": "2026-05-27T08:05:04.226Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "7a01286b-9b70-4eaa-8f88-f52f1900b31a", + "boundingBoxX1": 495, + "boundingBoxY1": 860, + "boundingBoxX2": 722, + "boundingBoxY2": 1144, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "9c9db2fe-9ace-40c8-ab28-4eea6e10c6d6", + "boundingBoxX1": 939, + "boundingBoxY1": 164, + "boundingBoxX2": 1301, + "boundingBoxY2": 672, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "F/1lGCw3C0EmxRBnKQxyYJeOT5Y=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "1d99cc7f-0d28-47cc-8fd0-782c25eab327", + "createdAt": "2026-05-25T20:14:33.552Z", + "deviceAssetId": "1000059393", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-24/IMG_20260524_133944.jpg", + "originalFileName": "IMG_20260524_133944.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "nPcNDYKmm5mPmIhmiJiGhwSNQ7Bm", + "fileCreatedAt": "2026-05-24T12:39:44.350Z", + "fileModifiedAt": "2026-05-24T12:39:44.000Z", + "localDateTime": "2026-05-24T13:39:44.350Z", + "updatedAt": "2026-05-25T20:14:38.948Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "239668d2-ce87-4eb7-8656-279e780bd258", + "boundingBoxX1": 797, + "boundingBoxY1": 255, + "boundingBoxX2": 1220, + "boundingBoxY2": 787, + "imageWidth": 1920, + "imageHeight": 1440, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "YwvxuVf//i8Y8tL7IT6VfJPqnkU=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 6528, + "height": 4896, + "isEdited": false + }, + { + "id": "84a721f3-48dc-42de-9704-753fa2a5e79a", + "createdAt": "2026-05-25T20:14:35.742Z", + "deviceAssetId": "1000059351", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-23/IMG_20260523_212154.jpg", + "originalFileName": "IMG_20260523_212154.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "G/gNFQRGepBoeJZ3d4eWVwL6Y6Ar", + "fileCreatedAt": "2026-05-23T20:21:54.337Z", + "fileModifiedAt": "2026-05-23T20:21:54.000Z", + "localDateTime": "2026-05-23T21:21:54.337Z", + "updatedAt": "2026-05-25T20:14:40.311Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "461b3340-5446-45b4-bd4a-40af6996c3d1", + "boundingBoxX1": 285, + "boundingBoxY1": 671, + "boundingBoxX2": 677, + "boundingBoxY2": 1268, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "5671be58-81ff-4ac2-85a8-7e5c3c13160b", + "boundingBoxX1": 684, + "boundingBoxY1": 817, + "boundingBoxX2": 1059, + "boundingBoxY2": 1321, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "REbRsxi+nI0L2QCFcZTGv5xuTCI=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "0af4847c-506b-4c54-807e-326b38bbdde5", + "createdAt": "2026-05-25T20:14:37.767Z", + "deviceAssetId": "1000059197", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-22/IMG_20260522_212113.jpg", + "originalFileName": "IMG_20260522_212113.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "mBgKFQJWlAuamJqIWod3iHcHeCVA", + "fileCreatedAt": "2026-05-22T20:21:13.853Z", + "fileModifiedAt": "2026-05-22T20:21:13.000Z", + "localDateTime": "2026-05-22T21:21:13.853Z", + "updatedAt": "2026-05-25T20:14:48.820Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "121fd017-9a00-4a6b-bdc3-ad6d797af38b", + "boundingBoxX1": 815, + "boundingBoxY1": 620, + "boundingBoxX2": 1232, + "boundingBoxY2": 1176, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "bf03a60e-c3c9-40ce-8656-9bcbbfa60888", + "boundingBoxX1": 391, + "boundingBoxY1": 1028, + "boundingBoxX2": 673, + "boundingBoxY2": 1378, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "o+s87vw+YA1Mb9pm+OgW3MbNGkE=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": "23854928-b51c-414b-8f25-911629dbff2c", + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "12892c69-07c8-460f-85f1-089473c684d5", + "createdAt": "2026-05-25T20:14:40.139Z", + "deviceAssetId": "1000059198", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-22/IMG_20260522_212128.jpg", + "originalFileName": "IMG_20260522_212128.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "GykKFQJWhAuZmJqIaYd3iHcHdyUw", + "fileCreatedAt": "2026-05-22T20:21:13.853Z", + "fileModifiedAt": "2026-05-22T20:21:29.000Z", + "localDateTime": "2026-05-22T21:21:13.853Z", + "updatedAt": "2026-05-25T20:14:48.822Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "72962bc1-4ad6-4be2-ac81-fb7ff698e8ee", + "boundingBoxX1": 815, + "boundingBoxY1": 621, + "boundingBoxX2": 1231, + "boundingBoxY2": 1179, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "661877ec-5796-45d3-af74-17382ac8cc58", + "boundingBoxX1": 389, + "boundingBoxY1": 1025, + "boundingBoxX2": 676, + "boundingBoxY2": 1381, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "hgyW0AYUE8gpLuXm4vmLngkaz1s=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": "23854928-b51c-414b-8f25-911629dbff2c", + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "c56c64b0-93b9-496f-bc2b-67d6c80bc12a", + "createdAt": "2026-05-12T17:46:08.078Z", + "deviceAssetId": "1000057953", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-12/IMG_20260512_184423.jpg", + "originalFileName": "IMG_20260512_184423.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "TxgGHQSPlqulGNBKhpumeKqfiPiZ", + "fileCreatedAt": "2026-05-12T17:44:23.621Z", + "fileModifiedAt": "2026-05-12T17:44:23.000Z", + "localDateTime": "2026-05-12T18:44:23.621Z", + "updatedAt": "2026-05-12T17:46:08.979Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "2f223d7d-8455-4e2d-aae8-8101e02489ad", + "boundingBoxX1": 435, + "boundingBoxY1": 531, + "boundingBoxX2": 628, + "boundingBoxY2": 790, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "db7b3815-1ebb-4d24-acc4-cdfff82ea74d", + "boundingBoxX1": 772, + "boundingBoxY1": 447, + "boundingBoxX2": 1019, + "boundingBoxY2": 841, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "4bopNbQU/bhAgtM2YrPXV/aYzlY=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 3072, + "height": 4096, + "isEdited": false + }, + { + "id": "2d8f061e-2b20-4169-90c6-f77a1689fc16", + "createdAt": "2026-05-12T17:46:08.484Z", + "deviceAssetId": "1000057952", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-12/IMG_20260512_184422_1.jpg", + "originalFileName": "IMG_20260512_184422_1.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "TxgGHQSPlqqWGMBahpumaKqfiPiZ", + "fileCreatedAt": "2026-05-12T17:44:22.971Z", + "fileModifiedAt": "2026-05-12T17:44:22.000Z", + "localDateTime": "2026-05-12T18:44:22.971Z", + "updatedAt": "2026-05-12T17:46:10.375Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "bd2971ad-a23e-4be1-a5e4-afe32e1dd92f", + "boundingBoxX1": 410, + "boundingBoxY1": 555, + "boundingBoxX2": 605, + "boundingBoxY2": 805, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "2c3fcbf5-24af-46c0-ba26-202de69c8a4b", + "boundingBoxX1": 751, + "boundingBoxY1": 463, + "boundingBoxX2": 998, + "boundingBoxY2": 843, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "r7OHQiEeBbFsREBRRIrt01V5glw=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 3072, + "height": 4096, + "isEdited": false + }, + { + "id": "6847191f-1b80-46f6-ad83-1bacc22b0ac3", + "createdAt": "2026-05-12T17:46:08.272Z", + "deviceAssetId": "1000057951", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-12/IMG_20260512_184422.jpg", + "originalFileName": "IMG_20260512_184422.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "UBgGJQSeh6uVOLBbhZuWeKmfifmZ", + "fileCreatedAt": "2026-05-12T17:44:22.127Z", + "fileModifiedAt": "2026-05-12T17:44:22.000Z", + "localDateTime": "2026-05-12T18:44:22.127Z", + "updatedAt": "2026-05-12T17:46:10.251Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "ebccaed7-c319-4172-a2ad-0bc4d36a5728", + "boundingBoxX1": 400, + "boundingBoxY1": 555, + "boundingBoxX2": 586, + "boundingBoxY2": 801, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "e9de96de-d371-448f-9fe1-fc8768bd4335", + "boundingBoxX1": 769, + "boundingBoxY1": 453, + "boundingBoxX2": 1037, + "boundingBoxY2": 839, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "U3ZepkgeGJgXbHp2U7tSX4Hd0S4=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 3072, + "height": 4096, + "isEdited": false + }, + { + "id": "fe2b6c1e-4a08-40bf-9a33-4c527c156aec", + "createdAt": "2026-05-09T08:34:04.015Z", + "deviceAssetId": "1000057678", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-09/IMG_20260509_093320.jpg", + "originalFileName": "IMG_20260509_093320.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "6ygKFQK/iD6Fd5eXd5Wnp4ePpfM4", + "fileCreatedAt": "2026-05-09T08:33:20.260Z", + "fileModifiedAt": "2026-05-09T08:33:20.000Z", + "localDateTime": "2026-05-09T09:33:20.260Z", + "updatedAt": "2026-05-09T08:34:05.772Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "41d94150-a753-47d0-9b4d-0fff7de6dbc0", + "boundingBoxX1": 670, + "boundingBoxY1": 946, + "boundingBoxX2": 1029, + "boundingBoxY2": 1502, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "b11fdb9e-197b-4ce4-b5cb-248f63e86f81", + "boundingBoxX1": 245, + "boundingBoxY1": 935, + "boundingBoxX2": 581, + "boundingBoxY2": 1386, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "bMOvzJPru7leM+e9I7k+W1LUSmc=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "4a598a13-b250-4f71-8e25-6e622823813b", + "createdAt": "2026-05-09T08:34:04.264Z", + "deviceAssetId": "1000057677", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-05-09/IMG_20260509_093317.jpg", + "originalFileName": "IMG_20260509_093317.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "6ygKFQKvdz6VWJeXd5aXp4Z/lfRH", + "fileCreatedAt": "2026-05-09T08:33:17.346Z", + "fileModifiedAt": "2026-05-09T08:33:17.000Z", + "localDateTime": "2026-05-09T09:33:17.346Z", + "updatedAt": "2026-05-09T08:34:06.233Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "77baf1cc-5e6d-4367-9b3f-f9c74e655009", + "boundingBoxX1": 726, + "boundingBoxY1": 952, + "boundingBoxX2": 1071, + "boundingBoxY2": 1461, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + }, + { + "id": "af3beb4b-142d-4d3d-a348-ded29a333f24", + "name": "Yassin", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/af/3b/af3beb4b-142d-4d3d-a348-ded29a333f24.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T23:10:16.65652+00:00", + "faces": [ + { + "id": "91e159c5-88b1-401c-8236-c768a78ff33e", + "boundingBoxX1": 364, + "boundingBoxY1": 913, + "boundingBoxX2": 651, + "boundingBoxY2": 1295, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "Tv0eF0rbtgXRUnrE1EHp8jgp1a8=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + }, + { + "id": "5b9354cb-ce8f-46a6-a233-5179c760d111", + "createdAt": "2026-04-28T12:02:59.243Z", + "deviceAssetId": "1000056084", + "ownerId": "62e24b86-8720-478e-88c7-466627cdc938", + "deviceId": "ff8e545d8661066bafaff94b9a724eacf24badf52c4d6ee1986ac775093e4cad", + "libraryId": null, + "type": "IMAGE", + "originalPath": "/opt/immich/upload/library/62e24b86-8720-478e-88c7-466627cdc938/2026/2026-04-28/IMG_20260428_123939.jpg", + "originalFileName": "IMG_20260428_123939.jpg", + "originalMimeType": "image/jpeg", + "thumbhash": "WRgGFQQfrHhrR5anaHaWaAWnZGBJ", + "fileCreatedAt": "2026-04-28T11:39:39.594Z", + "fileModifiedAt": "2026-04-28T11:39:39.000Z", + "localDateTime": "2026-04-28T12:39:39.594Z", + "updatedAt": "2026-04-28T12:03:01.015Z", + "isFavorite": false, + "isArchived": false, + "isTrashed": false, + "visibility": "timeline", + "duration": "0:00:00.00000", + "livePhotoVideoId": null, + "people": [ + { + "id": "8d3a46fe-5100-4785-bab6-b6fdf062fe69", + "name": "Ana", + "birthDate": null, + "thumbnailPath": "/opt/immich/upload/thumbs/62e24b86-8720-478e-88c7-466627cdc938/8d/3a/8d3a46fe-5100-4785-bab6-b6fdf062fe69.jpeg", + "isHidden": false, + "isFavorite": false, + "updatedAt": "2025-11-29T16:08:11.82186+00:00", + "faces": [ + { + "id": "79b98b02-d34c-4acf-aab4-1c9f0f1caed7", + "boundingBoxX1": 409, + "boundingBoxY1": 687, + "boundingBoxX2": 1099, + "boundingBoxY2": 1793, + "imageWidth": 1440, + "imageHeight": 1920, + "sourceType": "machine-learning" + } + ] + } + ], + "unassignedFaces": [ + + ], + "checksum": "bDB0qkvSSxuTun9/ngXNiBKXLy0=", + "isOffline": false, + "hasMetadata": true, + "duplicateId": null, + "resized": true, + "width": 4896, + "height": 6528, + "isEdited": false + } + ], + "facets": [ + + ], + "nextPage": "2" + } +} diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..391a902 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..104deab --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,644 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + ); + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c3fedb2 --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..c30b367 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,16 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } + + func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { + GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..0eeeb54 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,70 @@ + + + + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Immich Tv Viewer + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + immich_tv_viewer + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneClassName + UIWindowScene + UISceneConfigurationName + flutter + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/Runner/SceneDelegate.swift b/ios/Runner/SceneDelegate.swift new file mode 100644 index 0000000..b9ce8ea --- /dev/null +++ b/ios/Runner/SceneDelegate.swift @@ -0,0 +1,6 @@ +import Flutter +import UIKit + +class SceneDelegate: FlutterSceneDelegate { + +} diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..6fd5dd4 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,2806 @@ + +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; +import 'dart:ui'; +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:http/http.dart' as http; +import 'package:just_audio/just_audio.dart'; +import 'package:video_player/video_player.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +String get immichBaseUrl => AppSettings.immichBaseUrl; +String get immichApiKey => AppSettings.apiKey; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await AppSettings.load(); + runApp(const ImmichTvApp()); +} + +class AppSettings { + static const String defaultServerIp = '192.168.1.29'; + static const String defaultPort = '2283'; + static const String defaultApiKey = 'COLLE_TA_CLE_API_ICI'; + static const int defaultAutoDelaySeconds = 10; + + static String serverIp = defaultServerIp; + static String port = defaultPort; + static String apiKey = defaultApiKey; + static int autoDelaySeconds = defaultAutoDelaySeconds; + + static String get immichBaseUrl { + final cleanIp = serverIp.trim().replaceAll('http://', '').replaceAll('https://', '').replaceAll('/api', '').replaceAll('/', ''); + final cleanPort = port.trim(); + return 'http://$cleanIp:$cleanPort/api'; + } + + static Future load() async { + final prefs = await SharedPreferences.getInstance(); + + serverIp = prefs.getString('immich_server_ip') ?? defaultServerIp; + port = prefs.getString('immich_port') ?? defaultPort; + apiKey = prefs.getString('immich_api_key') ?? defaultApiKey; + autoDelaySeconds = prefs.getInt('auto_delay_seconds') ?? defaultAutoDelaySeconds; + + if (autoDelaySeconds < 3) { + autoDelaySeconds = 3; + } + + if (autoDelaySeconds > 300) { + autoDelaySeconds = 300; + } + } + + static Future save({ + required String newServerIp, + required String newPort, + required String newApiKey, + required int newAutoDelaySeconds, + }) async { + final prefs = await SharedPreferences.getInstance(); + + serverIp = newServerIp.trim().replaceAll('http://', '').replaceAll('https://', '').replaceAll('/api', '').replaceAll('/', ''); + port = newPort.trim(); + apiKey = newApiKey.trim(); + autoDelaySeconds = newAutoDelaySeconds.clamp(3, 300); + + await prefs.setString('immich_server_ip', serverIp); + await prefs.setString('immich_port', port); + await prefs.setString('immich_api_key', apiKey); + await prefs.setInt('auto_delay_seconds', autoDelaySeconds); + } +} + +class ImmichTvApp extends StatelessWidget { + const ImmichTvApp({super.key}); + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Imedia Photos', + debugShowCheckedModeBanner: false, + theme: ThemeData.dark(useMaterial3: true), + home: const HomeShell(), + ); + } +} + + +class SettingsBackHandler { + static bool Function()? handleBack; + + static bool run() { + final handler = handleBack; + if (handler == null) { + return false; + } + + return handler(); + } +} + +class AppColors { + static const background = Color(0xFF020409); + static const sidebar = Color(0xFF080D16); + static const card = Color(0xFF121722); + static const selected = Color(0xFF234A91); + static const selectedBorder = Color(0xFF4C8DFF); + static const mutedText = Color(0xFFB8BFCC); +} + +enum AppSection { photos, videos, explorer, surprise, settings } + +class ImmichPerson { + final String id; + final String name; + final bool isHidden; + ImmichPerson({required this.id, required this.name, required this.isHidden}); + bool get hasName => name.trim().isNotEmpty; + String displayName(int index) => hasName ? name.trim() : 'Sans nom ${index + 1}'; + factory ImmichPerson.fromJson(Map json) => ImmichPerson( + id: json['id'] ?? '', + name: json['name'] ?? '', + isHidden: json['isHidden'] ?? false, + ); +} + +class PersonWithCount { + final ImmichPerson person; + final int photoCount; + final ImmichAsset? firstAsset; + PersonWithCount({required this.person, required this.photoCount, required this.firstAsset}); +} + +class ImmichAsset { + final String id; + final String fileName; + final String mediaType; + final bool isTrashed; + final String localDateTime; + final String city; + final String state; + final String country; + final double? latitude; + final double? longitude; + + ImmichAsset({ + required this.id, + required this.fileName, + required this.mediaType, + required this.isTrashed, + required this.localDateTime, + required this.city, + required this.state, + required this.country, + required this.latitude, + required this.longitude, + }); + + factory ImmichAsset.fromJson(Map json) { + final exifInfo = json['exifInfo'] is Map + ? json['exifInfo'] as Map + : {}; + + String clean(dynamic value) { + if (value == null) return ''; + final text = value.toString().trim(); + if (text == 'null') return ''; + return text; + } + + double? cleanDouble(dynamic value) { + if (value == null) return null; + if (value is num) return value.toDouble(); + return double.tryParse(value.toString()); + } + + final lat = cleanDouble( + exifInfo['latitude'] ?? + exifInfo['lat'] ?? + json['latitude'] ?? + json['lat'], + ); + + final lon = cleanDouble( + exifInfo['longitude'] ?? + exifInfo['lon'] ?? + exifInfo['lng'] ?? + json['longitude'] ?? + json['lon'] ?? + json['lng'], + ); + + return ImmichAsset( + id: clean(json['id']), + fileName: clean(json['originalFileName']), + mediaType: clean(json['type']).isEmpty ? 'UNKNOWN' : clean(json['type']), + isTrashed: json['isTrashed'] == true, + localDateTime: clean( + json['localDateTime'] ?? + exifInfo['dateTimeOriginal'] ?? + json['fileCreatedAt'] ?? + json['createdAt'], + ), + city: clean(exifInfo['city'] ?? json['city']), + state: clean(exifInfo['state'] ?? json['state']), + country: clean(exifInfo['country'] ?? json['country']), + latitude: lat, + longitude: lon, + ); + } + + String get locationLabel { + final parts = [city, state, country] + .where((part) => part.trim().isNotEmpty) + .toList(); + + if (parts.isNotEmpty) { + return parts.join(', '); + } + + if (latitude != null && longitude != null) { + return 'GPS ${latitude!.toStringAsFixed(4)}, ${longitude!.toStringAsFixed(4)}'; + } + + return 'Lieu inconnu'; + } + + String get dateLabel { + final rawDate = localDateTime.trim(); + + if (rawDate.isEmpty) { + return 'Date inconnue'; + } + + final parsedDate = DateTime.tryParse(rawDate); + + if (parsedDate == null) { + return rawDate; + } + + final day = parsedDate.day.toString().padLeft(2, '0'); + final month = parsedDate.month.toString().padLeft(2, '0'); + final year = parsedDate.year.toString(); + + return '$day/$month/$year'; + } +} + +class SearchPageResult { + final List assets; + final String? nextPage; + SearchPageResult({required this.assets, required this.nextPage}); +} + +class ImmichApi { + static Map get headers => {'x-api-key': AppSettings.apiKey}; + static final Map> _imageBytesCache = {}; + static final Map> _assetDetailsCache = {}; + + static void clearCaches() { + _imageBytesCache.clear(); + _assetDetailsCache.clear(); + } + + static Future> getAllPeople() async { + final all = []; + var page = 1; + var hasNext = true; + while (hasNext) { + final uri = Uri.parse('$immichBaseUrl/people?page=$page&size=100&withHidden=false'); + final res = await http.get(uri, headers: headers); + if (res.statusCode != 200) throw Exception('Erreur people: ${res.statusCode} ${res.body}'); + final data = jsonDecode(res.body) as Map; + final people = (data['people'] as List? ?? []) + .map((e) => ImmichPerson.fromJson(e as Map)) + .where((p) => p.id.isNotEmpty && !p.isHidden) + .toList(); + all.addAll(people); + hasNext = data['hasNextPage'] == true; + page++; + if (page > 50) break; + } + all.sort((a,b){ + if (a.hasName && !b.hasName) return -1; + if (!a.hasName && b.hasName) return 1; + return a.name.toLowerCase().compareTo(b.name.toLowerCase()); + }); + return all; + } + + static Future> getPeopleWithPhotoCounts({void Function(String)? onProgress}) async { + final people = await getAllPeople(); + final result = []; + const batch = 6; + for (var i = 0; i < people.length; i += batch) { + onProgress?.call('Analyse ${i + 1}/${people.length} personnes...'); + final slice = people.skip(i).take(batch).toList(); + final checked = await Future.wait(slice.map((p) async { + final first = await searchPhotosForPerson(p.id, page: 1, size: 1); + if (first.assets.isEmpty) return PersonWithCount(person: p, photoCount: 0, firstAsset: null); + final count = await countPhotosForPerson(p.id); + return PersonWithCount(person: p, photoCount: count, firstAsset: first.assets.first); + })); + result.addAll(checked.where((x) => x.photoCount > 0)); + } + result.sort((a,b) => b.photoCount.compareTo(a.photoCount)); + return result; + } + + static Future countPhotosForPerson(String personId) async { + var total=0, page=1; String? next='1'; + while (next != null) { + final r = await searchPhotosForPerson(personId, page: page, size: 250); + total += r.assets.length; + next = r.nextPage; + if (next == null || next.isEmpty) break; + page = int.tryParse(next) ?? page + 1; + if (page > 100) break; + } + return total; + } + + static Future> getAllTimelinePhotos({int maxPages = 9999}) async { + final all=[]; + var page=1; String? next='1'; + while (next != null && page <= maxPages) { + final r = await searchAllPhotos(page: page, size: 250); + all.addAll(r.assets); + next = r.nextPage; + if (next == null || next.isEmpty) break; + page = int.tryParse(next) ?? page+1; + } + return all; + } + + static Future> getRandomTimelinePhotos({int maxPages = 9999}) async { + final photos = await getAllTimelinePhotos(maxPages: maxPages); + photos.shuffle(Random()); + return photos; + } + + static Future> getAllTimelineVideos({ + int maxPages = 9999, + }) async { + final allAssets = []; + var page = 1; + const size = 250; + String? nextPage = '1'; + + while (nextPage != null && page <= maxPages) { + final pageResult = await searchAllVideos(page: page, size: size); + + allAssets.addAll(pageResult.assets); + nextPage = pageResult.nextPage; + + if (nextPage == null || nextPage.isEmpty) { + break; + } + + page = int.tryParse(nextPage) ?? page + 1; + } + + return allAssets; + } + + static Future searchAllVideos({ + required int page, + required int size, + }) async { + final data = await _postSearchMetadata({ + 'type': 'VIDEO', + 'size': size, + 'page': page, + 'order': 'desc', + 'withArchived': false, + 'withDeleted': false, + 'withPeople': false, + 'withStacked': true, + }); + + return _parseSearchPageForType(data, 'VIDEO'); + } + + static String assetVideoPlaybackUrl(String assetId) { + return '$immichBaseUrl/assets/$assetId/video/playback'; + } + + static Future> getPhotosForPerson(String personId) async { + final all=[]; + var page=1; String? next='1'; + while (next != null) { + final r=await searchPhotosForPerson(personId, page: page, size: 250); + debugPrint('IMMICH_DEBUG person=$personId page=$page imageAssets=${r.assets.length}'); + all.addAll(r.assets); + next=r.nextPage; + if (next == null || next.isEmpty) break; + page=int.tryParse(next) ?? page+1; + if (page > 100) break; + } + debugPrint('IMMICH_DEBUG person=$personId totalPhotos=${all.length}'); + return all; + } + + static Future getAssetDetails(String assetId) { + if (_assetDetailsCache.containsKey(assetId)) { + return _assetDetailsCache[assetId]!; + } + + final future = _getAssetDetailsNoCache(assetId); + _assetDetailsCache[assetId] = future; + return future; + } + + static Future _getAssetDetailsNoCache(String assetId) async { + final uri = Uri.parse('$immichBaseUrl/assets/$assetId'); + final response = await http.get(uri, headers: headers); + + if (response.statusCode != 200) { + throw Exception('Erreur détail asset: ${response.statusCode}'); + } + + final asset = ImmichAsset.fromJson( + jsonDecode(response.body) as Map, + ); + + debugPrint( + 'IMMICH_LOCATION asset=$assetId location="${asset.locationLabel}" date="${asset.dateLabel}"', + ); + + return asset; + } + + static Future searchAllPhotos({required int page, required int size}) async { + return _parseSearchPage(await _postSearchMetadata({ + 'type':'IMAGE','size':size,'page':page,'order':'desc', + 'withArchived':false,'withDeleted':false,'withPeople':false,'withStacked':true, + })); + } + + static Future searchPhotosForPerson(String personId,{required int page,required int size}) async { + return _parseSearchPage(await _postSearchMetadata({ + 'personIds':[personId],'type':'IMAGE','size':size,'page':page,'order':'desc', + 'withArchived':true,'withDeleted':false,'withPeople':true,'withStacked':true, + })); + } + + static Future> _postSearchMetadata(Map body) async { + final res = await http.post(Uri.parse('$immichBaseUrl/search/metadata'), headers:{...headers,'Content-Type':'application/json'}, body:jsonEncode(body)); + if (res.statusCode != 200 && res.statusCode != 201) throw Exception('Erreur search: ${res.statusCode} ${res.body}'); + return jsonDecode(res.body) as Map; + } + + static SearchPageResult _parseSearchPage(Map data) { + return _parseSearchPageForType(data, 'IMAGE'); + } + + static SearchPageResult _parseSearchPageForType( + Map data, + String mediaType, + ) { + final items = _extractAssetItems(data); + + final assets = items + .map((item) => ImmichAsset.fromJson(item as Map)) + .where((asset) => asset.id.isNotEmpty) + .where((asset) => asset.mediaType == mediaType) + .where((asset) => !asset.isTrashed) + .toList(); + + return SearchPageResult( + assets: assets, + nextPage: _extractNextPage(data), + ); + } + + static List _extractAssetItems(Map data) { + if (data['assets'] is Map) { + final a = data['assets'] as Map; + if (a['items'] is List) return a['items'] as List; + } + if (data['items'] is List) return data['items'] as List; + return []; + } + static String? _extractNextPage(Map data) { + final v = data['assets'] is Map ? (data['assets'] as Map)['nextPage'] : data['nextPage']; + return v?.toString(); + } + static String personThumbnailUrl(String id) => '$immichBaseUrl/people/$id/thumbnail'; + static String assetPreviewUrl(String id) => '$immichBaseUrl/assets/$id/thumbnail?size=preview'; + static String assetThumbUrl(String id) => '$immichBaseUrl/assets/$id/thumbnail?size=thumbnail'; + + static Future fetchImageBytes(String url) { + if (!_imageBytesCache.containsKey(url)) { + // La Mi Box n'a pas une RAM infinie, malgré son arrogance HDMI. + // On garde un cache raisonnable pour éviter de remplir la mémoire avec 13 000 miniatures. + if (_imageBytesCache.length > 180) { + _imageBytesCache.remove(_imageBytesCache.keys.first); + } + + _imageBytesCache[url] = _fetchImageBytesNoCache(url); + } + + return _imageBytesCache[url]!; + } + + static Future _fetchImageBytesNoCache(String url) async { + final res = await http.get(Uri.parse(url), headers: headers).timeout(const Duration(seconds: 20)); + + // Les thumbnails peuvent être très nombreux. On ne loggue que les previews et les erreurs. + if (res.statusCode != 200 || url.contains('size=preview')) { + debugPrint('IMMICH_IMAGE_FETCH status=${res.statusCode} bytes=${res.bodyBytes.length} url=$url'); + } + + if (res.statusCode == 200 && res.bodyBytes.isNotEmpty) return res.bodyBytes; + throw Exception('Erreur image ${res.statusCode}'); + } + + static Future fetchAssetPreviewBytes(String id) async { + try { return await fetchImageBytes(assetPreviewUrl(id)); } catch (_) { return fetchImageBytes(assetThumbUrl(id)); } + } + + static Future fetchAssetThumbnailBytes(String id) async { + try { return await fetchImageBytes(assetThumbUrl(id)); } catch (_) { return fetchImageBytes(assetPreviewUrl(id)); } + } + + static Future fetchPersonBytes(String id) => fetchImageBytes(personThumbnailUrl(id)); +} + +class RandomMusicService { + static final AudioPlayer _player = AudioPlayer(); + static final Random _random = Random(); + + static List _musicAssets = []; + static String? currentTrack; + static bool _initialized = false; + static bool _enabled = true; + + static Future initialize() async { + if (_initialized) { + return; + } + + _initialized = true; + + try { + final assetManifest = await AssetManifest.loadFromAssetBundle(rootBundle); + + _musicAssets = assetManifest + .listAssets() + .where((path) => path.toLowerCase().startsWith('music/')) + .where((path) { + final lower = path.toLowerCase(); + return lower.endsWith('.mp3') || + lower.endsWith('.m4a') || + lower.endsWith('.aac') || + lower.endsWith('.wav') || + lower.endsWith('.ogg'); + }) + .toList(); + + debugPrint('IMMICH_MUSIC found ${_musicAssets.length} tracks'); + + _player.playerStateStream.listen((state) { + if (state.processingState == ProcessingState.completed && _enabled) { + playRandomTrack(); + } + }); + } catch (error) { + debugPrint('IMMICH_MUSIC init error: $error'); + _musicAssets = []; + } + } + + static Future startRandomMusic() async { + _enabled = true; + await initialize(); + + if (_musicAssets.isEmpty) { + debugPrint('IMMICH_MUSIC no music files found in Music/'); + return; + } + + if (_player.playing) { + return; + } + + await playRandomTrack(); + } + + static Future playRandomTrack() async { + if (!_enabled || _musicAssets.isEmpty) { + return; + } + + try { + var nextTrack = _musicAssets[_random.nextInt(_musicAssets.length)]; + + if (_musicAssets.length > 1 && nextTrack == currentTrack) { + nextTrack = _musicAssets[_random.nextInt(_musicAssets.length)]; + } + + currentTrack = nextTrack; + + debugPrint('IMMICH_MUSIC play $nextTrack'); + + await _player.setAsset(nextTrack); + await _player.setLoopMode(LoopMode.off); + await _player.play(); + } catch (error) { + debugPrint('IMMICH_MUSIC play error: $error'); + } + } + + static Future stop() async { + _enabled = false; + + try { + await _player.stop(); + } catch (error) { + debugPrint('IMMICH_MUSIC stop error: $error'); + } + } + + static Future dispose() async { + try { + await _player.dispose(); + } catch (_) {} + } +} + +class HomeShell extends StatefulWidget { + const HomeShell({super.key}); + + @override + State createState() => _HomeShellState(); +} + +class _HomeShellState extends State { + AppSection selected = AppSection.photos; + + Future confirmExit() async { + final result = await showDialog( + context: context, + barrierDismissible: true, + builder: (dialogContext) { + return AlertDialog( + backgroundColor: const Color(0xFF111827), + title: const Text( + 'Quitter Imedia Photos ?', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w700, + ), + ), + content: const Text( + 'Tu veux vraiment fermer l’application ?', + style: TextStyle( + color: Colors.white70, + fontSize: 18, + ), + ), + actions: [ + TextButton( + autofocus: true, + onPressed: () => Navigator.of(dialogContext).pop(false), + child: const Text('Annuler'), + ), + FilledButton( + onPressed: () => Navigator.of(dialogContext).pop(true), + child: const Text('Quitter'), + ), + ], + ); + }, + ); + + return result == true; + } + + @override + Widget build(BuildContext context) { + return PopScope( + canPop: false, + onPopInvokedWithResult: (didPop, result) async { + if (didPop) { + return; + } + + if (SettingsBackHandler.run()) { + return; + } + + final shouldExit = await confirmExit(); + + if (shouldExit) { + SystemNavigator.pop(); + } + }, + child: Scaffold( + backgroundColor: AppColors.background, + body: Row( + children: [ + Sidebar( + selectedSection: selected, + onSectionSelected: (s) => setState(() => selected = s), + ), + Expanded( + child: selected == AppSection.photos + ? const PhotosHomeScreen() + : selected == AppSection.videos + ? const VideosHomeScreen() + : selected == AppSection.explorer + ? const ExplorerScreen() + : selected == AppSection.surprise + ? const SurpriseMeScreen() + : const SettingsScreen(), + ), + ], + ), + ), + ); + } +} + + +class Sidebar extends StatelessWidget { + final AppSection selectedSection; + final ValueChanged onSectionSelected; + + const Sidebar({ + super.key, + required this.selectedSection, + required this.onSectionSelected, + }); + + @override + Widget build(BuildContext context) => Container( + width: 178, + decoration: const BoxDecoration( + color: Color(0xFF111827), + border: Border(right: BorderSide(color: Colors.white10)), + ), + child: SafeArea( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 14), + child: Column( + children: [ + Row( + children: const [ + Icon(Icons.auto_awesome, color: Color(0xFFFDE68A), size: 20), + SizedBox(width: 6), + Expanded( + child: Text( + 'Imedia', + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w900, + ), + ), + ), + ], + ), + const SizedBox(height: 22), + SidebarButton( + icon: Icons.photo_library_outlined, + label: 'Photos', + selected: selectedSection == AppSection.photos, + onPressed: () => onSectionSelected(AppSection.photos), + ), + SidebarButton( + icon: Icons.video_library_outlined, + label: 'Vidéos', + selected: selectedSection == AppSection.videos, + onPressed: () => onSectionSelected(AppSection.videos), + ), + SidebarButton( + icon: Icons.manage_search, + label: 'Explorer', + selected: selectedSection == AppSection.explorer, + onPressed: () => onSectionSelected(AppSection.explorer), + ), + SidebarButton( + icon: Icons.shuffle, + label: 'Surprise', + selected: selectedSection == AppSection.surprise, + onPressed: () => onSectionSelected(AppSection.surprise), + ), + SidebarButton( + icon: Icons.settings_outlined, + label: 'Réglages', + selected: selectedSection == AppSection.settings, + onPressed: () => onSectionSelected(AppSection.settings), + ), + const Spacer(), + const Text( + 'Imedia Photos', + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(color: Colors.white38, fontSize: 11), + ), + ], + ), + ), + ), + ); +} + +class SidebarButton extends StatelessWidget { + final IconData icon; + final String label; + final bool selected; + final VoidCallback onPressed; + + const SidebarButton({ + super.key, + required this.icon, + required this.label, + required this.selected, + required this.onPressed, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(bottom: 8), + child: TvCard( + onPressed: onPressed, + backgroundColor: selected ? AppColors.selected : Colors.transparent, + focusedColor: selected ? AppColors.selected : Colors.white10, + borderColor: selected ? AppColors.selectedBorder : Colors.transparent, + scaleOnFocus: 1.02, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), + child: Row( + children: [ + Icon(icon, size: 23), + const SizedBox(width: 9), + Expanded( + child: Text( + label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w700, + ), + ), + ), + ], + ), + ), + ), + ); + } +} + +class PhotosHomeScreen extends StatefulWidget { const PhotosHomeScreen({super.key}); @override State createState()=>_PhotosHomeScreenState(); } +class _PhotosHomeScreenState extends State { + late Future> futurePhotos; + @override void initState(){super.initState(); futurePhotos=ImmichApi.getAllTimelinePhotos();} + void reload()=>setState(()=>futurePhotos=ImmichApi.getAllTimelinePhotos()); + @override Widget build(BuildContext context)=>AppContentScaffold(title:'Photos',subtitle:'Toutes les photos de la bibliothèque Immich',actionLabel:'Rafraîchir',onAction:reload,child:FutureBuilder>(future:futurePhotos,builder:(context,s){ + if(s.connectionState==ConnectionState.waiting)return const LoadingView(message:'Chargement de toutes les photos Immich...'); + if(s.hasError)return ErrorView(message:s.error.toString()); + final photos=s.data??[]; if(photos.isEmpty)return const EmptyView(message:'Aucune photo trouvée'); + return PhotoGrid(photos:photos,title:'${photos.length} photos'); + })); +} + +class ExplorerScreen extends StatefulWidget { const ExplorerScreen({super.key}); @override State createState()=>_ExplorerScreenState(); } +class _ExplorerScreenState extends State { + late Future> futurePeople; String progress=''; + @override void initState(){super.initState(); futurePeople=loadPeople();} + Future> loadPeople()=>ImmichApi.getPeopleWithPhotoCounts(onProgress:(m){if(mounted)setState(()=>progress=m);}); + void reload()=>setState(()=>futurePeople=loadPeople()); + @override Widget build(BuildContext context)=>AppContentScaffold(title:'Explorer',subtitle:'Personnes détectées par Immich',actionLabel:'Rafraîchir',onAction:reload,child:FutureBuilder>(future:futurePeople,builder:(context,s){ + if(s.connectionState==ConnectionState.waiting)return LoadingView(message:progress.isEmpty?'Chargement des personnes...':progress); + if(s.hasError)return ErrorView(message:s.error.toString()); + final people=s.data??[]; if(people.isEmpty)return const EmptyView(message:'Aucune personne avec photos trouvée'); + return PeopleExplorerGrid(people:people); + })); +} + +class VideosHomeScreen extends StatefulWidget { + const VideosHomeScreen({super.key}); + + @override + State createState() => _VideosHomeScreenState(); +} + +class _VideosHomeScreenState extends State { + late Future> futureVideos; + + @override + void initState() { + super.initState(); + futureVideos = ImmichApi.getAllTimelineVideos(); + } + + void reload() { + setState(() { + futureVideos = ImmichApi.getAllTimelineVideos(); + }); + } + + @override + Widget build(BuildContext context) { + return AppContentScaffold( + title: 'Vidéos', + subtitle: 'Toutes les vidéos de la bibliothèque Immich', + actionLabel: 'Rafraîchir', + onAction: reload, + child: FutureBuilder>( + future: futureVideos, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const LoadingView(message: 'Chargement de toutes les vidéos Immich...'); + } + + if (snapshot.hasError) { + return ErrorView(message: snapshot.error.toString()); + } + + final videos = snapshot.data ?? []; + + if (videos.isEmpty) { + return const EmptyView(message: 'Aucune vidéo trouvée'); + } + + return VideoGrid( + videos: videos, + title: '${videos.length} vidéos', + ); + }, + ), + ); + } +} + +class VideoGrid extends StatelessWidget { + final List videos; + final String title; + + const VideoGrid({ + super.key, + required this.videos, + required this.title, + }); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Align( + alignment: Alignment.centerRight, + child: Text( + title, + style: const TextStyle( + fontSize: 20, + color: Colors.white70, + fontWeight: FontWeight.w600, + ), + ), + ), + const SizedBox(height: 20), + Expanded( + child: GridView.builder( + padding: const EdgeInsets.only(bottom: 32), + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 5, + crossAxisSpacing: 16, + mainAxisSpacing: 16, + childAspectRatio: 1.35, + ), + itemCount: videos.length, + itemBuilder: (context, index) { + final asset = videos[index]; + + return TvCard( + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => VideoViewerScreen( + videos: videos, + initialIndex: index, + ), + ), + ); + }, + child: Stack( + fit: StackFit.expand, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(16), + child: ImmichAssetImage( + assetId: asset.id, + fit: BoxFit.cover, + preview: false, + ), + ), + DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + color: Colors.black.withOpacity(0.18), + ), + ), + const Center( + child: Icon( + Icons.play_circle_fill, + size: 58, + color: Colors.white, + ), + ), + ], + ), + ); + }, + ), + ), + ], + ); + } +} + +class VideoViewerScreen extends StatefulWidget { + final List videos; + final int initialIndex; + + const VideoViewerScreen({ + super.key, + required this.videos, + required this.initialIndex, + }); + + @override + State createState() => _VideoViewerScreenState(); +} + +class _VideoViewerScreenState extends State { + late int currentIndex; + late FocusNode focusNode; + + VideoPlayerController? controller; + Timer? skipTimer; + + bool isLoading = true; + bool isSkippingUnsupported = false; + String? errorMessage; + + int loadToken = 0; + + ImmichAsset get currentVideo => widget.videos[currentIndex]; + + @override + void initState() { + super.initState(); + currentIndex = widget.initialIndex; + focusNode = FocusNode(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + focusNode.requestFocus(); + loadCurrentVideo(); + }); + } + + @override + void dispose() { + skipTimer?.cancel(); + controller?.removeListener(videoListener); + controller?.dispose(); + focusNode.dispose(); + super.dispose(); + } + + Future loadCurrentVideo() async { + final token = ++loadToken; + + skipTimer?.cancel(); + + final oldController = controller; + oldController?.removeListener(videoListener); + controller = null; + + await oldController?.dispose(); + + if (!mounted || token != loadToken) { + return; + } + + setState(() { + isLoading = true; + isSkippingUnsupported = false; + errorMessage = null; + }); + + final asset = currentVideo; + final url = ImmichApi.assetVideoPlaybackUrl(asset.id); + + debugPrint('IMMICH_VIDEO play index=${currentIndex + 1}/${widget.videos.length} asset=${asset.id} url=$url'); + + try { + final newController = VideoPlayerController.networkUrl( + Uri.parse(url), + httpHeaders: ImmichApi.headers, + ); + + controller = newController; + + await newController.initialize(); + + if (!mounted || token != loadToken) { + await newController.dispose(); + return; + } + + await newController.setLooping(false); + newController.addListener(videoListener); + + setState(() { + isLoading = false; + isSkippingUnsupported = false; + errorMessage = null; + }); + + await newController.play(); + } catch (error) { + debugPrint('IMMICH_VIDEO unsupported_or_error asset=${asset.id} error=$error'); + + if (!mounted || token != loadToken) { + return; + } + + handleVideoError(error.toString()); + } + } + + void handleVideoError(String message) { + final lower = message.toLowerCase(); + + final looksUnsupported = lower.contains('no_exceeds_capabilities') || + lower.contains('exceeds_capabilities') || + lower.contains('mediacodec') || + lower.contains('format_supported') || + lower.contains('videorenderer'); + + if (looksUnsupported && widget.videos.length > 1) { + setState(() { + isLoading = false; + isSkippingUnsupported = true; + errorMessage = 'Vidéo incompatible Mi Box. Passage à la suivante...'; + }); + + skipTimer?.cancel(); + skipTimer = Timer(const Duration(seconds: 2), () { + if (!mounted) { + return; + } + + nextVideo(loop: true); + }); + + return; + } + + setState(() { + isLoading = false; + isSkippingUnsupported = false; + errorMessage = message; + }); + } + + void videoListener() { + final currentController = controller; + + if (currentController == null || !currentController.value.isInitialized) { + return; + } + + if (currentController.value.hasError) { + final description = currentController.value.errorDescription ?? 'Erreur vidéo'; + debugPrint('IMMICH_VIDEO runtime_error $description'); + handleVideoError(description); + return; + } + + final position = currentController.value.position; + final duration = currentController.value.duration; + + if (duration.inMilliseconds > 0 && + position >= duration - const Duration(milliseconds: 500)) { + nextVideo(loop: true); + } + } + + void previousVideo() { + if (currentIndex > 0) { + setState(() { + currentIndex--; + }); + loadCurrentVideo(); + } + } + + void nextVideo({bool loop = false}) { + if (currentIndex < widget.videos.length - 1) { + setState(() { + currentIndex++; + }); + loadCurrentVideo(); + return; + } + + if (loop && widget.videos.isNotEmpty) { + setState(() { + currentIndex = 0; + }); + loadCurrentVideo(); + } + } + + void togglePlayPause() { + final currentController = controller; + + if (currentController == null || !currentController.value.isInitialized) { + return; + } + + if (currentController.value.isPlaying) { + currentController.pause(); + } else { + currentController.play(); + } + + setState(() {}); + } + + void closeViewer() { + skipTimer?.cancel(); + Navigator.of(context).pop(); + } + + void handleKey(LogicalKeyboardKey key) { + if (key == LogicalKeyboardKey.arrowLeft) { + previousVideo(); + return; + } + + if (key == LogicalKeyboardKey.arrowRight) { + nextVideo(loop: true); + return; + } + + if (key == LogicalKeyboardKey.select || + key == LogicalKeyboardKey.enter || + key == LogicalKeyboardKey.numpadEnter || + key == LogicalKeyboardKey.space) { + togglePlayPause(); + return; + } + + if (key == LogicalKeyboardKey.escape || + key == LogicalKeyboardKey.backspace || + key == LogicalKeyboardKey.goBack) { + closeViewer(); + return; + } + } + + @override + Widget build(BuildContext context) { + final currentController = controller; + + return Scaffold( + backgroundColor: Colors.black, + body: KeyboardListener( + focusNode: focusNode, + onKeyEvent: (event) { + if (event is! KeyDownEvent) { + return; + } + + handleKey(event.logicalKey); + }, + child: Stack( + children: [ + Center( + child: Builder( + builder: (context) { + if (isLoading) { + return const VideoStatusView( + icon: Icons.hourglass_empty, + title: 'Chargement de la vidéo...', + subtitle: '', + ); + } + + if (errorMessage != null) { + return VideoStatusView( + icon: isSkippingUnsupported + ? Icons.skip_next + : Icons.error_outline, + title: isSkippingUnsupported + ? 'Vidéo incompatible Mi Box' + : 'Erreur de lecture vidéo', + subtitle: isSkippingUnsupported + ? 'Passage automatique à la suivante' + : errorMessage!, + ); + } + + if (currentController == null || + !currentController.value.isInitialized) { + return const VideoStatusView( + icon: Icons.videocam_off_outlined, + title: 'Vidéo indisponible', + subtitle: '', + ); + } + + return AspectRatio( + aspectRatio: currentController.value.aspectRatio, + child: VideoPlayer(currentController), + ); + }, + ), + ), + Positioned( + left: 34, + bottom: 34, + child: ClipRRect( + borderRadius: BorderRadius.circular(22), + child: BackdropFilter( + filter: ImageFilter.blur( + sigmaX: 14, + sigmaY: 14, + ), + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 20, + vertical: 14, + ), + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.10), + borderRadius: BorderRadius.circular(22), + border: Border.all( + color: Colors.white.withOpacity(0.28), + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + isSkippingUnsupported + ? Icons.skip_next + : currentController?.value.isPlaying == true + ? Icons.pause_circle_outline + : Icons.play_circle_outline, + color: Colors.white, + size: 28, + ), + const SizedBox(width: 12), + Text( + '${currentIndex + 1} / ${widget.videos.length}', + style: const TextStyle( + color: Colors.white, + fontSize: 19, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox(width: 16), + const Text( + '← / → zapper OK pause', + style: TextStyle( + color: Colors.white70, + fontSize: 15, + ), + ), + ], + ), + ), + ), + ), + ), + ], + ), + ), + ); + } +} + +class VideoStatusView extends StatelessWidget { + final IconData icon; + final String title; + final String subtitle; + + const VideoStatusView({ + super.key, + required this.icon, + required this.title, + required this.subtitle, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(42), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + icon, + color: Colors.white70, + size: 72, + ), + const SizedBox(height: 24), + Text( + title, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + fontSize: 30, + fontWeight: FontWeight.w700, + ), + ), + if (subtitle.trim().isNotEmpty) ...[ + const SizedBox(height: 12), + Text( + subtitle, + textAlign: TextAlign.center, + maxLines: 4, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + color: Colors.white70, + fontSize: 20, + ), + ), + ], + ], + ), + ); + } +} + +class SurpriseMeScreen extends StatefulWidget { + const SurpriseMeScreen({super.key}); + @override State createState()=>_SurpriseMeScreenState(); +} + +class _SurpriseMeScreenState extends State { + late Future> futureRandomPhotos; + + @override + void initState() { + super.initState(); + futureRandomPhotos = ImmichApi.getRandomTimelinePhotos(); + } + + void reload() { + setState(() { + futureRandomPhotos = ImmichApi.getRandomTimelinePhotos(); + }); + } + + void launchSurprise(List photos, {int initialIndex = 0}) { + if (photos.isEmpty) return; + + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => PhotoViewerScreen( + photos: photos, + initialIndex: initialIndex, + initialAutoZapping: true, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return AppContentScaffold( + title:'Surprends-moi', + subtitle:'Zapping aléatoire des photos toutes les ${AppSettings.autoDelaySeconds} secondes', + actionLabel:'Mélanger', + onAction:reload, + child:FutureBuilder>( + future:futureRandomPhotos, + builder:(context,snapshot){ + if(snapshot.connectionState==ConnectionState.waiting){ + return const LoadingView(message:'Préparation du zapping aléatoire avec toutes les photos...'); + } + if(snapshot.hasError){return ErrorView(message:snapshot.error.toString());} + final photos=snapshot.data??[]; + if(photos.isEmpty){return const EmptyView(message:'Aucune photo disponible');} + final previewCount=photos.length>30?30:photos.length; + return Column(crossAxisAlignment:CrossAxisAlignment.start,children:[ + TvCard( + onPressed:()=>launchSurprise(photos), + backgroundColor:AppColors.selected, + focusedColor:AppColors.selected, + borderColor:AppColors.selectedBorder, + scaleOnFocus:1.04, + child:Container( + width:double.infinity, + padding:const EdgeInsets.symmetric(horizontal:28,vertical:24), + child: Row(children:[ + Icon(Icons.shuffle,size:34), + SizedBox(width:18), + Text('Lancer le zapping aléatoire',style:TextStyle(fontSize:26,fontWeight:FontWeight.w700)), + Spacer(), + Text('${AppSettings.autoDelaySeconds} secondes par photo',style:const TextStyle(fontSize:20,color:Colors.white70)), + ]), + ), + ), + const SizedBox(height:28), + Text('${photos.length} photos mélangées',style:const TextStyle(fontSize:20,color:Colors.white70,fontWeight:FontWeight.w600)), + const SizedBox(height:20), + Expanded(child:GridView.builder( + padding:const EdgeInsets.only(bottom:32), + gridDelegate:const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:5,crossAxisSpacing:16,mainAxisSpacing:16,childAspectRatio:1.35), + itemCount:previewCount, + itemBuilder:(context,index){ + final asset=photos[index]; + return TvCard( + onPressed:()=>launchSurprise(photos,initialIndex:index), + child:ClipRRect(borderRadius:BorderRadius.circular(16),child:ImmichAssetImage(assetId:asset.id,fit:BoxFit.cover,preview:false)), + ); + }, + )), + ]); + }, + ), + ); + } +} + +class SettingsScreen extends StatefulWidget { + const SettingsScreen({super.key}); + + @override + State createState() => _SettingsScreenState(); +} + +class _SettingsScreenState extends State { + late final TextEditingController ipController; + late final TextEditingController portController; + late final TextEditingController apiKeyController; + late final TextEditingController delayController; + + late final FocusNode serverTabFocus; + late final FocusNode apiTabFocus; + late final FocusNode zappingTabFocus; + + late final FocusNode ipFocus; + late final FocusNode portFocus; + late final FocusNode apiFocus; + late final FocusNode delayFocus; + + late final FocusNode saveFocus; + late final FocusNode resetFocus; + + int selectedTab = 0; + String statusMessage = ''; + + @override + void initState() { + super.initState(); + + ipController = TextEditingController(text: AppSettings.serverIp); + portController = TextEditingController(text: AppSettings.port); + apiKeyController = TextEditingController(text: AppSettings.apiKey == AppSettings.defaultApiKey ? '' : AppSettings.apiKey); + delayController = TextEditingController(text: AppSettings.autoDelaySeconds.toString()); + + ipController.addListener(() => setState(() {})); + portController.addListener(() => setState(() {})); + + serverTabFocus = FocusNode(debugLabel: 'settings_tab_server'); + apiTabFocus = FocusNode(debugLabel: 'settings_tab_api'); + zappingTabFocus = FocusNode(debugLabel: 'settings_tab_zapping'); + + ipFocus = FocusNode(debugLabel: 'settings_ip'); + portFocus = FocusNode(debugLabel: 'settings_port'); + apiFocus = FocusNode(debugLabel: 'settings_api_key'); + delayFocus = FocusNode(debugLabel: 'settings_delay'); + + saveFocus = FocusNode(debugLabel: 'settings_save'); + resetFocus = FocusNode(debugLabel: 'settings_reset'); + + ipFocus.onKeyEvent = (node, event) => handleTextFieldKey( + event: event, + up: serverTabFocus, + down: portFocus, + ); + + portFocus.onKeyEvent = (node, event) => handleTextFieldKey( + event: event, + up: ipFocus, + down: saveFocus, + ); + + apiFocus.onKeyEvent = (node, event) => handleTextFieldKey( + event: event, + up: apiTabFocus, + down: saveFocus, + ); + + delayFocus.onKeyEvent = (node, event) => handleTextFieldKey( + event: event, + up: zappingTabFocus, + down: saveFocus, + ); + + SettingsBackHandler.handleBack = handleBackFromSettings; + } + + @override + void dispose() { + if (SettingsBackHandler.handleBack == handleBackFromSettings) { + SettingsBackHandler.handleBack = null; + } + + ipController.dispose(); + portController.dispose(); + apiKeyController.dispose(); + delayController.dispose(); + + serverTabFocus.dispose(); + apiTabFocus.dispose(); + zappingTabFocus.dispose(); + + ipFocus.dispose(); + portFocus.dispose(); + apiFocus.dispose(); + delayFocus.dispose(); + + saveFocus.dispose(); + resetFocus.dispose(); + + super.dispose(); + } + + bool isSettingsTextFieldFocused() { + return ipFocus.hasFocus || portFocus.hasFocus || apiFocus.hasFocus || delayFocus.hasFocus; + } + + bool handleBackFromSettings() { + if (!isSettingsTextFieldFocused()) { + return false; + } + + hideKeyboard(); + + if (selectedTab == 0) { + serverTabFocus.requestFocus(); + } else if (selectedTab == 1) { + apiTabFocus.requestFocus(); + } else { + zappingTabFocus.requestFocus(); + } + + return true; + } + + void hideKeyboard() { + SystemChannels.textInput.invokeMethod('TextInput.hide'); + } + + void showKeyboard() { + SystemChannels.textInput.invokeMethod('TextInput.show'); + } + + void focusOnly(FocusNode node) { + hideKeyboard(); + node.requestFocus(); + } + + void selectTab(int index) { + setState(() { + selectedTab = index; + statusMessage = ''; + }); + + hideKeyboard(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (!mounted) { + return; + } + + if (index == 0) { + serverTabFocus.requestFocus(); + } else if (index == 1) { + apiTabFocus.requestFocus(); + } else { + zappingTabFocus.requestFocus(); + } + }); + } + + Future saveSettings() async { + final delay = int.tryParse(delayController.text.trim()) ?? AppSettings.defaultAutoDelaySeconds; + + await AppSettings.save( + newServerIp: ipController.text, + newPort: portController.text, + newApiKey: apiKeyController.text, + newAutoDelaySeconds: delay, + ); + + ImmichApi.clearCaches(); + + if (!mounted) { + return; + } + + setState(() { + ipController.text = AppSettings.serverIp; + portController.text = AppSettings.port; + apiKeyController.text = AppSettings.apiKey == AppSettings.defaultApiKey ? '' : AppSettings.apiKey; + delayController.text = AppSettings.autoDelaySeconds.toString(); + statusMessage = 'Paramètres enregistrés'; + }); + + hideKeyboard(); + saveFocus.requestFocus(); + + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Paramètres enregistrés : ${AppSettings.immichBaseUrl}'), + ), + ); + } + + Future resetDefaults() async { + ipController.text = AppSettings.defaultServerIp; + portController.text = AppSettings.defaultPort; + apiKeyController.text = ''; + delayController.text = AppSettings.defaultAutoDelaySeconds.toString(); + await saveSettings(); + } + + KeyEventResult handleTextFieldKey({ + required KeyEvent event, + required FocusNode up, + required FocusNode down, + }) { + if (event is! KeyDownEvent) { + return KeyEventResult.ignored; + } + + final key = event.logicalKey; + + if (key == LogicalKeyboardKey.arrowUp) { + focusOnly(up); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.arrowDown) { + focusOnly(down); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.goBack || key == LogicalKeyboardKey.escape) { + handleBackFromSettings(); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.select || + key == LogicalKeyboardKey.enter || + key == LogicalKeyboardKey.numpadEnter) { + showKeyboard(); + return KeyEventResult.ignored; + } + + return KeyEventResult.ignored; + } + + Widget buildTabContent() { + if (selectedTab == 0) { + return SettingsCard( + title: 'Serveur Immich', + children: [ + TvSettingsTextField( + controller: ipController, + focusNode: ipFocus, + label: 'Adresse IP', + hint: '192.168.1.29', + icon: Icons.dns_outlined, + keyboardType: TextInputType.number, + ), + const SizedBox(height: 14), + TvSettingsTextField( + controller: portController, + focusNode: portFocus, + label: 'Port', + hint: '2283', + icon: Icons.settings_ethernet, + keyboardType: TextInputType.number, + ), + const SizedBox(height: 14), + Text( + 'URL utilisée : http://${ipController.text.trim().isEmpty ? 'IP' : ipController.text.trim()}:${portController.text.trim().isEmpty ? 'PORT' : portController.text.trim()}/api', + style: const TextStyle( + color: Colors.white54, + fontSize: 15, + ), + ), + ], + ); + } + + if (selectedTab == 1) { + return SettingsCard( + title: 'Clé API Immich', + children: [ + TvSettingsTextField( + controller: apiKeyController, + focusNode: apiFocus, + label: 'Clé API', + hint: 'Colle ici la clé API', + icon: Icons.key, + obscureText: true, + ), + const SizedBox(height: 14), + const Text( + 'L’application utilise uniquement la clé API. Elle ne stocke pas ton mot de passe Immich.', + style: TextStyle( + color: Colors.white54, + fontSize: 15, + ), + ), + ], + ); + } + + return SettingsCard( + title: 'Zapping photo', + children: [ + TvSettingsTextField( + controller: delayController, + focusNode: delayFocus, + label: 'Délai auto', + hint: '10', + icon: Icons.timer_outlined, + keyboardType: TextInputType.number, + ), + const SizedBox(height: 14), + const Text( + 'Valeur autorisée : 3 à 300 secondes.', + style: TextStyle( + color: Colors.white54, + fontSize: 15, + ), + ), + ], + ); + } + + @override + Widget build(BuildContext context) { + return AppContentScaffold( + title: 'Réglages', + subtitle: 'Navigation TV directe : haut / bas entre les champs', + actionLabel: 'Enregistrer', + onAction: saveSettings, + child: Column( + children: [ + Row( + children: [ + SettingsTabButton( + focusNode: serverTabFocus, + label: 'Serveur', + icon: Icons.dns_outlined, + selected: selectedTab == 0, + onPressed: () => selectTab(0), + onDown: () => focusOnly(ipFocus), + onRight: () => selectTab(1), + ), + const SizedBox(width: 10), + SettingsTabButton( + focusNode: apiTabFocus, + label: 'Clé API', + icon: Icons.key, + selected: selectedTab == 1, + onPressed: () => selectTab(1), + onDown: () => focusOnly(apiFocus), + onLeft: () => selectTab(0), + onRight: () => selectTab(2), + ), + const SizedBox(width: 10), + SettingsTabButton( + focusNode: zappingTabFocus, + label: 'Zapping', + icon: Icons.timer_outlined, + selected: selectedTab == 2, + onPressed: () => selectTab(2), + onDown: () => focusOnly(delayFocus), + onLeft: () => selectTab(1), + ), + ], + ), + const SizedBox(height: 16), + Expanded( + child: SingleChildScrollView( + keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, + child: Center( + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 860), + child: buildTabContent(), + ), + ), + ), + ), + const SizedBox(height: 14), + Row( + children: [ + Expanded( + child: TvCard( + focusNode: saveFocus, + onPressed: saveSettings, + backgroundColor: AppColors.selected, + focusedColor: AppColors.selected, + borderColor: AppColors.selectedBorder, + scaleOnFocus: 1.03, + onUp: () { + if (selectedTab == 0) { + focusOnly(portFocus); + } else if (selectedTab == 1) { + focusOnly(apiFocus); + } else { + focusOnly(delayFocus); + } + }, + onRight: () => resetFocus.requestFocus(), + child: const Padding( + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16), + child: Center( + child: Text( + 'Enregistrer', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w800, + ), + ), + ), + ), + ), + ), + const SizedBox(width: 14), + Expanded( + child: TvCard( + focusNode: resetFocus, + onPressed: resetDefaults, + backgroundColor: Colors.white10, + focusedColor: Colors.white24, + scaleOnFocus: 1.03, + onUp: () { + if (selectedTab == 0) { + focusOnly(portFocus); + } else if (selectedTab == 1) { + focusOnly(apiFocus); + } else { + focusOnly(delayFocus); + } + }, + onLeft: () => saveFocus.requestFocus(), + child: const Padding( + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16), + child: Center( + child: Text( + 'Réinitialiser', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w800, + ), + ), + ), + ), + ), + ), + ], + ), + if (statusMessage.isNotEmpty) ...[ + const SizedBox(height: 8), + Text( + statusMessage, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.lightGreenAccent, + fontSize: 14, + ), + ), + ], + ], + ), + ); + } +} + +class SettingsTabButton extends StatelessWidget { + final FocusNode focusNode; + final String label; + final IconData icon; + final bool selected; + final VoidCallback onPressed; + final VoidCallback? onUp; + final VoidCallback? onDown; + final VoidCallback? onLeft; + final VoidCallback? onRight; + + const SettingsTabButton({ + super.key, + required this.focusNode, + required this.label, + required this.icon, + required this.selected, + required this.onPressed, + this.onUp, + this.onDown, + this.onLeft, + this.onRight, + }); + + @override + Widget build(BuildContext context) { + return Expanded( + child: TvCard( + focusNode: focusNode, + onPressed: onPressed, + onUp: onUp, + onDown: onDown, + onLeft: onLeft, + onRight: onRight, + backgroundColor: selected ? AppColors.selected : Colors.white10, + focusedColor: selected ? AppColors.selected : Colors.white24, + borderColor: selected ? AppColors.selectedBorder : Colors.transparent, + scaleOnFocus: 1.02, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(icon, size: 20), + const SizedBox(width: 8), + Text( + label, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ), + ), + ); + } +} + +class TvSettingsTextField extends StatelessWidget { + final TextEditingController controller; + final FocusNode focusNode; + final String label; + final String hint; + final IconData icon; + final bool obscureText; + final TextInputType? keyboardType; + + const TvSettingsTextField({ + super.key, + required this.controller, + required this.focusNode, + required this.label, + required this.hint, + required this.icon, + this.obscureText = false, + this.keyboardType, + }); + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: focusNode, + builder: (context, _) { + final hasFocus = focusNode.hasFocus; + + return DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(18), + border: Border.all( + color: hasFocus ? AppColors.selectedBorder : Colors.white24, + width: hasFocus ? 3 : 1, + ), + ), + child: TextField( + controller: controller, + focusNode: focusNode, + obscureText: obscureText, + keyboardType: keyboardType, + textInputAction: TextInputAction.done, + onTap: () { + focusNode.requestFocus(); + SystemChannels.textInput.invokeMethod('TextInput.show'); + }, + onSubmitted: (_) { + SystemChannels.textInput.invokeMethod('TextInput.hide'); + }, + style: const TextStyle( + color: Colors.white, + fontSize: 19, + ), + decoration: InputDecoration( + prefixIcon: Icon(icon, size: 24), + labelText: label, + hintText: hint, + filled: true, + fillColor: Colors.white10, + contentPadding: const EdgeInsets.symmetric( + vertical: 16, + horizontal: 16, + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(18), + borderSide: BorderSide.none, + ), + ), + ), + ); + }, + ); + } +} + +class SettingsCard extends StatelessWidget { + final String title; + final List children; + + const SettingsCard({ + super.key, + required this.title, + required this.children, + }); + + @override + Widget build(BuildContext context) { + return Card( + color: AppColors.card, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + side: const BorderSide( + color: Colors.white12, + ), + ), + child: Padding( + padding: const EdgeInsets.all(22), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + title, + style: const TextStyle( + fontSize: 22, + fontWeight: FontWeight.w800, + ), + ), + const SizedBox(height: 18), + ...children, + ], + ), + ), + ); + } +} + + +class AppContentScaffold extends StatelessWidget { + final String title, subtitle, actionLabel; + final VoidCallback onAction; + final Widget child; + + const AppContentScaffold({ + super.key, + required this.title, + required this.subtitle, + required this.actionLabel, + required this.onAction, + required this.child, + }); + + @override + Widget build(BuildContext context) => SafeArea( + child: Padding( + padding: const EdgeInsets.fromLTRB(34, 22, 34, 22), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + fontSize: 34, + fontWeight: FontWeight.w800, + ), + ), + const SizedBox(height: 4), + Text( + subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + fontSize: 17, + color: AppColors.mutedText, + ), + ), + ], + ), + ), + TvCard( + onPressed: onAction, + scaleOnFocus: 1.04, + backgroundColor: Colors.white10, + focusedColor: Colors.white24, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12), + child: Text( + actionLabel, + style: const TextStyle(fontSize: 18), + ), + ), + ), + ], + ), + const SizedBox(height: 22), + Expanded(child: child), + ], + ), + ), + ); +} + +class HeaderText extends StatelessWidget{final String title,subtitle; const HeaderText({super.key,required this.title,required this.subtitle}); @override Widget build(BuildContext context)=>Column(crossAxisAlignment:CrossAxisAlignment.start,children:[Text(title,style:const TextStyle(fontSize:36,fontWeight:FontWeight.w700)),const SizedBox(height:6),Text(subtitle,style:const TextStyle(fontSize:18,color:AppColors.mutedText))]);} + +class PeopleExplorerGrid extends StatelessWidget { + final List people; const PeopleExplorerGrid({super.key,required this.people}); + @override Widget build(BuildContext context)=>GridView.builder(padding:const EdgeInsets.only(bottom:32),gridDelegate:const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:5,crossAxisSpacing:22,mainAxisSpacing:22,childAspectRatio:.78),itemCount:people.length,itemBuilder:(context,index){ + final item=people[index]; final person=item.person; + return TvCard(debugLabel:'person ${person.displayName(index)} ${person.id}',onPressed:(){debugPrint('IMMICH_DEBUG selected person ${person.displayName(index)} id=${person.id}'); Navigator.of(context).push(MaterialPageRoute(builder:(_)=>PersonPhotosScreen(person:person,personIndex:index)));},child:PersonCard(item:item,index:index)); + }); +} +class PersonCard extends StatelessWidget { final PersonWithCount item; final int index; const PersonCard({super.key,required this.item,required this.index}); + @override Widget build(BuildContext context){final p=item.person; return Stack(fit:StackFit.expand,children:[ClipRRect(borderRadius:BorderRadius.circular(18),child:ImmichPersonImage(personId:p.id,fit:BoxFit.cover)),DecoratedBox(decoration:BoxDecoration(borderRadius:BorderRadius.circular(18),gradient:const LinearGradient(begin:Alignment.topCenter,end:Alignment.bottomCenter,colors:[Colors.transparent,Color(0xDD000000)]))),Positioned(left:18,right:18,bottom:18,child:Column(crossAxisAlignment:CrossAxisAlignment.start,children:[Text(p.displayName(index),maxLines:1,overflow:TextOverflow.ellipsis,style:const TextStyle(fontSize:22,fontWeight:FontWeight.w700)),const SizedBox(height:6),Text('${item.photoCount} photos',style:const TextStyle(fontSize:18,color:Colors.white70)),const SizedBox(height:4),Text(p.id.substring(0,8),style:const TextStyle(fontSize:13,color:Colors.white38))]))]);} +} + +class PersonPhotosScreen extends StatefulWidget{final ImmichPerson person; final int personIndex; const PersonPhotosScreen({super.key,required this.person,required this.personIndex}); @override State createState()=>_PersonPhotosScreenState();} +class _PersonPhotosScreenState extends State{late Future> futurePhotos; String get personName=>widget.person.displayName(widget.personIndex); @override void initState(){super.initState();futurePhotos=ImmichApi.getPhotosForPerson(widget.person.id);} void reload()=>setState(()=>futurePhotos=ImmichApi.getPhotosForPerson(widget.person.id)); + @override Widget build(BuildContext context)=>Scaffold(backgroundColor:AppColors.background,body:SafeArea(child:Padding(padding:const EdgeInsets.fromLTRB(42,32,42,32),child:Column(children:[Row(children:[TvCard(onPressed:()=>Navigator.of(context).pop(),scaleOnFocus:1.04,backgroundColor:Colors.white10,focusedColor:Colors.white24,child:const Padding(padding:EdgeInsets.all(14),child:Icon(Icons.arrow_back,size:30))),const SizedBox(width:24),Expanded(child:HeaderText(title:'Photos de $personName',subtitle:widget.person.id)),TvCard(onPressed:reload,scaleOnFocus:1.04,backgroundColor:Colors.white10,focusedColor:Colors.white24,child:const Padding(padding:EdgeInsets.symmetric(horizontal:22,vertical:14),child:Text('Rafraîchir',style:TextStyle(fontSize:18))))]),const SizedBox(height:30),Expanded(child:FutureBuilder>(future:futurePhotos,builder:(context,s){if(s.connectionState==ConnectionState.waiting)return LoadingView(message:'Chargement des photos de $personName...'); if(s.hasError)return ErrorView(message:s.error.toString()); final photos=s.data??[]; if(photos.isEmpty)return EmptyView(message:'Aucune photo trouvée pour $personName'); return PhotoGrid(photos:photos,title:'${photos.length} photos');}))]))));} + +class PhotoGrid extends StatelessWidget { final List photos; final String title; const PhotoGrid({super.key,required this.photos,required this.title}); + @override Widget build(BuildContext context)=>Column(children:[Align(alignment:Alignment.centerRight,child:Text(title,style:const TextStyle(fontSize:20,color:Colors.white70,fontWeight:FontWeight.w600))),const SizedBox(height:20),Expanded(child:GridView.builder(padding:const EdgeInsets.only(bottom:32),gridDelegate:const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:5,crossAxisSpacing:16,mainAxisSpacing:16,childAspectRatio:1.35),itemCount:photos.length,itemBuilder:(context,index){final asset=photos[index]; return TvCard(onPressed:()=>Navigator.of(context).push(MaterialPageRoute(builder:(_)=>PhotoViewerScreen(photos:photos,initialIndex:index))),child:ClipRRect(borderRadius:BorderRadius.circular(16),child:ImmichAssetImage(assetId:asset.id,fit:BoxFit.cover,preview:false)));}))]); +} + +class PhotoViewerScreen extends StatefulWidget { + final List photos; + final int initialIndex; + final bool initialAutoZapping; + final bool playMusic; + + const PhotoViewerScreen({ + super.key, + required this.photos, + required this.initialIndex, + this.initialAutoZapping = false, + this.playMusic = true, + }); + + @override + State createState() => _PhotoViewerScreenState(); +} + +class _PhotoViewerScreenState extends State { + late int currentIndex; + late FocusNode focusNode; + + Timer? idleTimer; + Timer? zappingTimer; + Timer? overlayTimer; + + bool autoZapping = false; + bool showInfoOverlay = true; + + static const Duration idleBeforeZapping = Duration(minutes: 1); + Duration get zappingInterval => Duration(seconds: AppSettings.autoDelaySeconds); + static const Duration overlayVisibleDuration = Duration(seconds: 3); + static const Duration overlayFadeDuration = Duration(milliseconds: 900); + + ImmichAsset get currentAsset => widget.photos[currentIndex]; + + @override + void initState() { + super.initState(); + currentIndex = widget.initialIndex; + focusNode = FocusNode(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + focusNode.requestFocus(); + showCurrentPhotoOverlay(); + + if (widget.playMusic) { + RandomMusicService.startRandomMusic(); + } + + if (widget.initialAutoZapping) { + startAutoZapping(); + } else { + resetIdleTimer(); + } + }); + } + + @override + void dispose() { + idleTimer?.cancel(); + zappingTimer?.cancel(); + overlayTimer?.cancel(); + + if (widget.playMusic) { + RandomMusicService.stop(); + } + + focusNode.dispose(); + super.dispose(); + } + + void showCurrentPhotoOverlay() { + overlayTimer?.cancel(); + + if (mounted) { + setState(() { + showInfoOverlay = true; + }); + } + + overlayTimer = Timer(overlayVisibleDuration, () { + if (!mounted) { + return; + } + + setState(() { + showInfoOverlay = false; + }); + }); + } + + void resetIdleTimer() { + idleTimer?.cancel(); + + if (widget.photos.length <= 1) { + return; + } + + idleTimer = Timer(idleBeforeZapping, startAutoZapping); + } + + void stopAutoZappingAndReset() { + zappingTimer?.cancel(); + + if (autoZapping && mounted) { + setState(() { + autoZapping = false; + }); + } + + resetIdleTimer(); + } + + void startAutoZapping() { + if (!mounted || widget.photos.length <= 1) { + return; + } + + idleTimer?.cancel(); + zappingTimer?.cancel(); + + setState(() { + autoZapping = true; + }); + + zappingTimer = Timer.periodic(zappingInterval, (_) { + if (!mounted) { + return; + } + + goToNextPhotoLoop(); + }); + } + + void setPhotoIndex(int newIndex) { + if (newIndex < 0 || newIndex >= widget.photos.length) { + return; + } + + setState(() { + currentIndex = newIndex; + showInfoOverlay = true; + }); + + showCurrentPhotoOverlay(); + } + + void goToNextPhotoLoop() { + final nextIndex = currentIndex < widget.photos.length - 1 ? currentIndex + 1 : 0; + setPhotoIndex(nextIndex); + } + + void previousPhoto() { + stopAutoZappingAndReset(); + + if (currentIndex > 0) { + setPhotoIndex(currentIndex - 1); + } + } + + void nextPhoto() { + stopAutoZappingAndReset(); + + if (currentIndex < widget.photos.length - 1) { + setPhotoIndex(currentIndex + 1); + } + } + + void closeViewer() { + idleTimer?.cancel(); + zappingTimer?.cancel(); + overlayTimer?.cancel(); + + if (widget.playMusic) { + RandomMusicService.stop(); + } + + Navigator.of(context).pop(); + } + + void handleKey(LogicalKeyboardKey key) { + if (key == LogicalKeyboardKey.arrowLeft) { + previousPhoto(); + return; + } + + if (key == LogicalKeyboardKey.arrowRight || + key == LogicalKeyboardKey.select || + key == LogicalKeyboardKey.enter || + key == LogicalKeyboardKey.numpadEnter) { + nextPhoto(); + return; + } + + if (key == LogicalKeyboardKey.escape || + key == LogicalKeyboardKey.backspace || + key == LogicalKeyboardKey.goBack) { + closeViewer(); + return; + } + + stopAutoZappingAndReset(); + showCurrentPhotoOverlay(); + } + + @override + Widget build(BuildContext context) { + final asset = currentAsset; + + return Scaffold( + backgroundColor: Colors.black, + body: KeyboardListener( + focusNode: focusNode, + onKeyEvent: (event) { + if (event is! KeyDownEvent) { + return; + } + + handleKey(event.logicalKey); + }, + child: Stack( + children: [ + Center( + child: AnimatedSwitcher( + duration: const Duration(milliseconds: 450), + child: ImmichAssetImage( + key: ValueKey(asset.id), + assetId: asset.id, + fit: BoxFit.contain, + preview: true, + ), + ), + ), + Positioned( + left: 34, + bottom: 34, + child: PhotoInfoOverlay( + asset: asset, + visible: showInfoOverlay, + fadeDuration: overlayFadeDuration, + ), + ), + ], + ), + ), + ); + } +} + +class PhotoInfoOverlay extends StatelessWidget { + final ImmichAsset asset; + final bool visible; + final Duration fadeDuration; + + const PhotoInfoOverlay({ + super.key, + required this.asset, + required this.visible, + required this.fadeDuration, + }); + + @override + Widget build(BuildContext context) { + return FutureBuilder( + future: ImmichApi.getAssetDetails(asset.id), + builder: (context, snapshot) { + final detailedAsset = snapshot.data ?? asset; + + return IgnorePointer( + child: AnimatedOpacity( + opacity: visible ? 1.0 : 0.0, + duration: fadeDuration, + curve: Curves.easeOut, + child: ClipRRect( + borderRadius: BorderRadius.circular(22), + child: BackdropFilter( + filter: ImageFilter.blur( + sigmaX: 14, + sigmaY: 14, + ), + child: Container( + constraints: const BoxConstraints( + minWidth: 240, + maxWidth: 560, + ), + padding: const EdgeInsets.symmetric( + horizontal: 20, + vertical: 14, + ), + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.10), + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Colors.white.withOpacity(0.24), + Colors.white.withOpacity(0.08), + Colors.black.withOpacity(0.18), + ], + ), + borderRadius: BorderRadius.circular(22), + border: Border.all( + color: Colors.white.withOpacity(0.28), + width: 1, + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.24), + blurRadius: 26, + offset: const Offset(0, 10), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.location_on_outlined, + color: Colors.white.withOpacity(0.86), + size: 24, + ), + const SizedBox(width: 12), + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + detailedAsset.locationLabel, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + color: Colors.white, + fontSize: 19, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox(height: 3), + Text( + detailedAsset.dateLabel, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Colors.white.withOpacity(0.72), + fontSize: 15, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ), + ); + }, + ); + } +} + +class ImmichPersonImage extends StatelessWidget{final String personId; final BoxFit fit; const ImmichPersonImage({super.key,required this.personId,required this.fit}); @override Widget build(BuildContext context)=>FutureBuilder(future:ImmichApi.fetchPersonBytes(personId),builder:(context,s){if(s.connectionState==ConnectionState.waiting)return const ImageLoadingBox(); if(s.hasError||!s.hasData||s.data!.isEmpty)return const Center(child:Icon(Icons.person,size:80)); return Image.memory(s.data!,fit:fit,width:double.infinity,height:double.infinity,gaplessPlayback:true);});} +class ImmichAssetImage extends StatelessWidget{ + final String assetId; + final BoxFit fit; + final bool preview; + + const ImmichAssetImage({ + super.key, + required this.assetId, + required this.fit, + this.preview = true, + }); + + @override + Widget build(BuildContext context)=>FutureBuilder( + future: preview + ? ImmichApi.fetchAssetPreviewBytes(assetId) + : ImmichApi.fetchAssetThumbnailBytes(assetId), + builder:(context,s){ + if(s.connectionState==ConnectionState.waiting)return const ImageLoadingBox(); + if(s.hasError||!s.hasData||s.data!.isEmpty)return ImageErrorBox(assetId:assetId); + return Image.memory( + s.data!, + fit:fit, + width:double.infinity, + height:double.infinity, + gaplessPlayback:true, + filterQuality: preview ? FilterQuality.medium : FilterQuality.low, + ); + }, + ); +} +class ImageLoadingBox extends StatelessWidget{const ImageLoadingBox({super.key}); @override Widget build(BuildContext context)=>Container(color:Colors.white10,child:const Center(child:CircularProgressIndicator()));} +class ImageErrorBox extends StatelessWidget{final String assetId; const ImageErrorBox({super.key,required this.assetId}); @override Widget build(BuildContext context){final short=assetId.length>=8?assetId.substring(0,8):assetId; return Container(color:Colors.white10,child:Center(child:Column(mainAxisSize:MainAxisSize.min,children:[const Icon(Icons.broken_image,size:56,color:Colors.white54),const SizedBox(height:10),Text('Image indisponible\n$short',textAlign:TextAlign.center,style:const TextStyle(color:Colors.white54,fontSize:14))])));}} + +class TvCard extends StatefulWidget { + final Widget child; + final VoidCallback? onPressed; + final FocusNode? focusNode; + final String? debugLabel; + final Color backgroundColor; + final Color focusedColor; + final Color borderColor; + final double scaleOnFocus; + final VoidCallback? onUp; + final VoidCallback? onDown; + final VoidCallback? onLeft; + final VoidCallback? onRight; + + const TvCard({ + super.key, + required this.child, + required this.onPressed, + this.focusNode, + this.debugLabel, + this.backgroundColor = AppColors.card, + this.focusedColor = Colors.white24, + this.borderColor = Colors.transparent, + this.scaleOnFocus = 1.06, + this.onUp, + this.onDown, + this.onLeft, + this.onRight, + }); + + @override + State createState() => _TvCardState(); +} + +class _TvCardState extends State { + bool focused = false; + + bool isActivateKey(LogicalKeyboardKey key) { + final label = key.keyLabel.toLowerCase(); + + return key == LogicalKeyboardKey.select || + key == LogicalKeyboardKey.enter || + key == LogicalKeyboardKey.numpadEnter || + key == LogicalKeyboardKey.space || + key == LogicalKeyboardKey.gameButtonA || + label == 'select' || + label == 'enter' || + label == 'ok' || + label == 'center'; + } + + void activate() { + if (widget.debugLabel != null) { + debugPrint('IMMICH_DEBUG activate ${widget.debugLabel}'); + } + + widget.onPressed?.call(); + } + + KeyEventResult handleKey(FocusNode node, KeyEvent event) { + if (event is! KeyDownEvent) { + return KeyEventResult.ignored; + } + + final key = event.logicalKey; + + if (isActivateKey(key)) { + activate(); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.arrowUp && widget.onUp != null) { + widget.onUp!.call(); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.arrowDown && widget.onDown != null) { + widget.onDown!.call(); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.arrowLeft && widget.onLeft != null) { + widget.onLeft!.call(); + return KeyEventResult.handled; + } + + if (key == LogicalKeyboardKey.arrowRight && widget.onRight != null) { + widget.onRight!.call(); + return KeyEventResult.handled; + } + + return KeyEventResult.ignored; + } + + @override + Widget build(BuildContext context) => Focus( + focusNode: widget.focusNode, + canRequestFocus: true, + descendantsAreFocusable: false, + onFocusChange: (value) { + setState(() => focused = value); + + if (value && widget.debugLabel != null) { + debugPrint('IMMICH_DEBUG focus ${widget.debugLabel}'); + } + }, + onKeyEvent: handleKey, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: activate, + child: AnimatedScale( + duration: const Duration(milliseconds: 120), + scale: focused ? widget.scaleOnFocus : 1.0, + child: Card( + margin: EdgeInsets.zero, + clipBehavior: Clip.antiAlias, + color: focused ? widget.focusedColor : widget.backgroundColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + side: BorderSide( + color: focused ? AppColors.selectedBorder : widget.borderColor, + width: focused ? 3 : 1, + ), + ), + child: widget.child, + ), + ), + ), + ); +} + + +class LoadingView extends StatelessWidget{final String message; const LoadingView({super.key,required this.message}); @override Widget build(BuildContext context)=>Center(child:Padding(padding:const EdgeInsets.all(32),child:Column(mainAxisSize:MainAxisSize.min,children:[const CircularProgressIndicator(),const SizedBox(height:24),Text(message,textAlign:TextAlign.center,style:const TextStyle(fontSize:24))])));} +class EmptyView extends StatelessWidget{final String message; const EmptyView({super.key,required this.message}); @override Widget build(BuildContext context)=>Center(child:Text(message,textAlign:TextAlign.center,style:const TextStyle(color:Colors.white70,fontSize:26)));} +class ErrorView extends StatelessWidget{final String message; const ErrorView({super.key,required this.message}); @override Widget build(BuildContext context)=>Center(child:Padding(padding:const EdgeInsets.all(32),child:Text(message,textAlign:TextAlign.center,style:const TextStyle(color:Colors.redAccent,fontSize:22))));} diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt new file mode 100644 index 0000000..117f13b --- /dev/null +++ b/linux/CMakeLists.txt @@ -0,0 +1,128 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "immich_tv_viewer") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.immich_tv_viewer") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..e71a16d --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..e0f0a47 --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..be1ee3e --- /dev/null +++ b/linux/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/linux/runner/CMakeLists.txt b/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/linux/runner/main.cc b/linux/runner/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/linux/runner/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc new file mode 100644 index 0000000..94fdc4a --- /dev/null +++ b/linux/runner/my_application.cc @@ -0,0 +1,148 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Called when first Flutter frame received. +static void first_frame_cb(MyApplication* self, FlView* view) { + gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); +} + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "immich_tv_viewer"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "immich_tv_viewer"); + } + + gtk_window_set_default_size(window, 1280, 720); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + GdkRGBA background_color; + // Background defaults to black, override it here if necessary, e.g. #00000000 + // for transparent. + gdk_rgba_parse(&background_color, "#000000"); + fl_view_set_background_color(view, &background_color); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + // Show the window when Flutter renders. + // Requires the view to be realized so we can start rendering. + g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), + self); + gtk_widget_realize(GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); +} diff --git a/linux/runner/my_application.h b/linux/runner/my_application.h new file mode 100644 index 0000000..db16367 --- /dev/null +++ b/linux/runner/my_application.h @@ -0,0 +1,21 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, + my_application, + MY, + APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/macos/.gitignore b/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..a34b3f4 --- /dev/null +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,18 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import audio_session +import just_audio +import shared_preferences_foundation +import video_player_avfoundation + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) + JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + VideoPlayerPlugin.register(with: registry.registrar(forPlugin: "VideoPlayerPlugin")) +} diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7f71c9c --- /dev/null +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,729 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* immich_tv_viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "immich_tv_viewer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* immich_tv_viewer.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* immich_tv_viewer.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + ); + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/immich_tv_viewer.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/immich_tv_viewer"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/immich_tv_viewer.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/immich_tv_viewer"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/immich_tv_viewer.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/immich_tv_viewer"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..e933c0c --- /dev/null +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..b3c1761 --- /dev/null +++ b/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..80e867a --- /dev/null +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..8f0f5e8 --- /dev/null +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = immich_tv_viewer + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.immichTvViewer + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2026 com.example. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..3cc05eb --- /dev/null +++ b/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..61f3bd1 --- /dev/null +++ b/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/person_8d3a46fe.jpg b/person_8d3a46fe.jpg new file mode 100644 index 0000000..a5b7e8a Binary files /dev/null and b/person_8d3a46fe.jpg differ diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..1f8b0b8 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,602 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + audio_session: + dependency: transitive + description: + name: audio_session + sha256: "2b7fff16a552486d078bfc09a8cde19f426dc6d6329262b684182597bec5b1ac" + url: "https://pub.dev" + source: hosted + version: "0.1.25" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b + url: "https://pub.dev" + source: hosted + version: "1.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + hooks: + dependency: transitive + description: + name: hooks + sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + html: + dependency: transitive + description: + name: html + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.dev" + source: hosted + version: "0.15.6" + http: + dependency: "direct main" + description: + name: http + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.dev" + source: hosted + version: "1.6.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + jni: + dependency: transitive + description: + name: jni + sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f + url: "https://pub.dev" + source: hosted + version: "1.0.0" + jni_flutter: + dependency: transitive + description: + name: jni_flutter + sha256: "8b59e590786050b1cd866677dddaf76b1ade5e7bc751abe04b86e84d379d3ba6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + just_audio: + dependency: "direct main" + description: + name: just_audio + sha256: f978d5b4ccea08f267dae0232ec5405c1b05d3f3cd63f82097ea46c015d5c09e + url: "https://pub.dev" + source: hosted + version: "0.9.46" + just_audio_platform_interface: + dependency: transitive + description: + name: just_audio_platform_interface + sha256: "2532c8d6702528824445921c5ff10548b518b13f808c2e34c2fd54793b999a6a" + url: "https://pub.dev" + source: hosted + version: "4.6.0" + just_audio_web: + dependency: transitive + description: + name: just_audio_web + sha256: "6ba8a2a7e87d57d32f0f7b42856ade3d6a9fbe0f1a11fabae0a4f00bb73f0663" + url: "https://pub.dev" + source: hosted + version: "0.4.16" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 + url: "https://pub.dev" + source: hosted + version: "0.12.19" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" + url: "https://pub.dev" + source: hosted + version: "0.13.0" + meta: + dependency: transitive + description: + name: meta + sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" + url: "https://pub.dev" + source: hosted + version: "1.18.0" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "6cb691c686fa2838c6deb34980d426145c2a5d537491cb83d463c33cdbc726ed" + url: "https://pub.dev" + source: hosted + version: "9.4.1" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825 + url: "https://pub.dev" + source: hosted + version: "2.1.6" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + url: "https://pub.dev" + source: hosted + version: "2.6.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: "58c2005f147315b11e9b4a7bc889cd5203e250cba8e3f012dae259b4972b5c16" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + record_use: + dependency: transitive + description: + name: record_use + sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: c3025c5534b01739267eb7d76959bbc25a6d10f6988e1c2a3036940133dd10bf + url: "https://pub.dev" + source: hosted + version: "2.5.5" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "93ae5884a9df5d3bb696825bceb3a17590754548b5d740eba51500afc8d088f5" + url: "https://pub.dev" + source: hosted + version: "2.4.26" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f" + url: "https://pub.dev" + source: hosted + version: "2.5.6" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "649dc798a33931919ea356c4305c2d1f81619ea6e92244070b520187b5140ef9" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" + url: "https://pub.dev" + source: hosted + version: "1.10.2" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "93b153dcb6a26dcddee6ca087dd634b53e38c10b5aa163e8e49501a776456153" + url: "https://pub.dev" + source: hosted + version: "3.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" + url: "https://pub.dev" + source: hosted + version: "0.7.11" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489" + url: "https://pub.dev" + source: hosted + version: "4.5.3" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + video_player: + dependency: "direct main" + description: + name: video_player + sha256: "48a7bdaa38a3d50ec10c78627abdbfad863fdf6f0d6e08c7c3c040cfd80ae36f" + url: "https://pub.dev" + source: hosted + version: "2.11.1" + video_player_android: + dependency: transitive + description: + name: video_player_android + sha256: "8401adac6f33e78a0f255a75a7e7c9e2f9713ffcd87ff4e6c00d9bd92b5d99db" + url: "https://pub.dev" + source: hosted + version: "2.9.7" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + sha256: "76097729ef0c976937945afa53f1ca3afa9b50c9a95909ba347bcf93270466fd" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + video_player_platform_interface: + dependency: transitive + description: + name: video_player_platform_interface + sha256: e4ae5bc934b528e5b95c5e47be2812860186260cd3eed3ac62f5ed380fdd1613 + url: "https://pub.dev" + source: hosted + version: "6.8.0" + video_player_web: + dependency: transitive + description: + name: video_player_web + sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" + url: "https://pub.dev" + source: hosted + version: "15.2.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.12.0 <4.0.0" + flutter: ">=3.44.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..151f0ea --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,25 @@ +name: immich_tv_viewer +description: Immich TV Viewer +publish_to: 'none' +version: 1.0.0+1 + +environment: + sdk: ^3.0.0 + +dependencies: + flutter: + sdk: flutter + http: ^1.2.2 + just_audio: ^0.9.42 + video_player: ^2.9.2 + shared_preferences: ^2.3.5 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +flutter: + uses-material-design: true + assets: + - Music/ diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..9952604 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:immich_tv_viewer/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/tools/check_android_manifest.ps1 b/tools/check_android_manifest.ps1 new file mode 100644 index 0000000..1d27468 --- /dev/null +++ b/tools/check_android_manifest.ps1 @@ -0,0 +1,2 @@ +Write-Host "AndroidManifest.xml important lines:" -ForegroundColor Cyan +Select-String -Path ".\android\app\src\main\AndroidManifest.xml" -Pattern "flutterEmbedding|MainActivity|applicationName|app_name|LEANBACK|LAUNCHER|ic_launcher|tv_banner" diff --git a/tools/immich_count_all_photos.ps1 b/tools/immich_count_all_photos.ps1 new file mode 100644 index 0000000..c83f05c --- /dev/null +++ b/tools/immich_count_all_photos.ps1 @@ -0,0 +1,63 @@ +param( + [string]$Server = "http://192.168.1.29:2283", + [int]$Size = 250 +) + +if (-not $env:IMMICH_KEY -and -not $IMMICH_KEY) { + Write-Host "ERREUR: définis d'abord la clé API :" -ForegroundColor Red + Write-Host '$env:IMMICH_KEY = "TA_CLE_API"' + exit 1 +} + +$key = if ($env:IMMICH_KEY) { $env:IMMICH_KEY } else { $IMMICH_KEY } + +$total = 0 +$page = 1 +$nextPage = "1" + +while ($null -ne $nextPage -and $nextPage -ne "") { + Write-Host "Lecture page $page..." -ForegroundColor Yellow + + $body = @{ + type = "IMAGE" + size = $Size + page = $page + order = "desc" + withArchived = $false + withDeleted = $false + withPeople = $false + withStacked = $true + } | ConvertTo-Json + + $result = Invoke-RestMethod ` + -Uri "$Server/api/search/metadata" ` + -Headers @{ "x-api-key" = $key } ` + -Method POST ` + -ContentType "application/json" ` + -Body $body + + $items = @() + if ($result.assets -and $result.assets.items) { + $items = @($result.assets.items) + $nextPage = $result.assets.nextPage + } elseif ($result.items) { + $items = @($result.items) + $nextPage = $result.nextPage + } else { + $nextPage = $null + } + + $imageItems = @($items | Where-Object { $_.type -eq "IMAGE" -and $_.isTrashed -ne $true }) + $total += $imageItems.Count + + Write-Host "Page $page : $($imageItems.Count) photos, total provisoire : $total" -ForegroundColor Cyan + + if ($null -eq $nextPage -or $nextPage -eq "") { + break + } + + $page = [int]$nextPage +} + +Write-Host "" +Write-Host "TOTAL PHOTOS COMPTEES : $total" -ForegroundColor Green diff --git a/tools/immich_debug_people_sample.ps1 b/tools/immich_debug_people_sample.ps1 new file mode 100644 index 0000000..77a75b5 --- /dev/null +++ b/tools/immich_debug_people_sample.ps1 @@ -0,0 +1,84 @@ +param( + [string]$Server = "http://192.168.1.29:2283", + [int]$Pages = 4, + [int]$Size = 100 +) + +if (-not $env:IMMICH_KEY -and -not $IMMICH_KEY) { + Write-Host "ERREUR: définis d'abord la clé API :" -ForegroundColor Red + Write-Host '$env:IMMICH_KEY = "TA_CLE_API"' + exit 1 +} + +$key = if ($env:IMMICH_KEY) { $env:IMMICH_KEY } else { $IMMICH_KEY } + +$rows = @() + +for ($page = 1; $page -le $Pages; $page++) { + Write-Host "Lecture people page $page..." -ForegroundColor Yellow + + $peopleResult = Invoke-RestMethod ` + -Uri "$Server/api/people?page=$page&size=$Size&withHidden=false" ` + -Headers @{ "x-api-key" = $key } ` + -Method GET + + foreach ($p in $peopleResult.people) { + $body = @{ + personIds = @($p.id) + type = "IMAGE" + size = 1 + page = 1 + order = "desc" + withArchived = $true + withDeleted = $false + withPeople = $true + withStacked = $true + } | ConvertTo-Json + + try { + $result = Invoke-RestMethod ` + -Uri "$Server/api/search/metadata" ` + -Headers @{ "x-api-key" = $key } ` + -Method POST ` + -ContentType "application/json" ` + -Body $body + + $items = @() + if ($result.assets -and $result.assets.items) { + $items = @($result.assets.items) + } elseif ($result.items) { + $items = @($result.items) + } + + $rows += [PSCustomObject]@{ + PersonId = $p.id + ShortId = $p.id.Substring(0,8) + Name = if ($p.name) { $p.name } else { "(sans nom)" } + HasImage = $items.Count -gt 0 + FirstAssetId = if ($items.Count -gt 0) { $items[0].id } else { "" } + FirstFile = if ($items.Count -gt 0) { $items[0].originalFileName } else { "" } + } + } catch { + $rows += [PSCustomObject]@{ + PersonId = $p.id + ShortId = $p.id.Substring(0,8) + Name = if ($p.name) { $p.name } else { "(sans nom)" } + HasImage = $false + FirstAssetId = "ERREUR" + FirstFile = $_.Exception.Message + } + } + } + + if ($peopleResult.hasNextPage -ne $true) { + break + } +} + +$rows | Export-Csv -NoTypeInformation -Encoding UTF8 "immich_people_photo_debug.csv" +$rows | Format-Table -AutoSize + +Write-Host "" +Write-Host "CSV créé : immich_people_photo_debug.csv" -ForegroundColor Green +Write-Host "Personnes avec photo : $(@($rows | Where-Object HasImage).Count)" +Write-Host "Personnes sans photo : $(@($rows | Where-Object { -not $_.HasImage }).Count)" diff --git a/tools/immich_debug_person.ps1 b/tools/immich_debug_person.ps1 new file mode 100644 index 0000000..e5a73b0 --- /dev/null +++ b/tools/immich_debug_person.ps1 @@ -0,0 +1,93 @@ +param( + [Parameter(Mandatory=$true)] + [string]$PersonId, + + [string]$Server = "http://192.168.1.29:2283", + + [int]$Size = 20 +) + +if (-not $env:IMMICH_KEY -and -not $IMMICH_KEY) { + Write-Host "ERREUR: définis d'abord la clé API :" -ForegroundColor Red + Write-Host '$env:IMMICH_KEY = "TA_CLE_API"' + exit 1 +} + +$key = if ($env:IMMICH_KEY) { $env:IMMICH_KEY } else { $IMMICH_KEY } + +Write-Host "=== Test personne Immich ===" -ForegroundColor Cyan +Write-Host "Server : $Server" +Write-Host "PersonId : $PersonId" +Write-Host "" + +Write-Host "1) Test miniature personne..." -ForegroundColor Yellow +$personThumb = "person_$($PersonId.Substring(0,8)).jpg" +curl.exe -L -H "x-api-key: $key" -o $personThumb "$Server/api/people/$PersonId/thumbnail" +Write-Host "Miniature personne sauvée : $personThumb" +Write-Host "" + +Write-Host "2) Test search/metadata type IMAGE..." -ForegroundColor Yellow +$body = @{ + personIds = @($PersonId) + type = "IMAGE" + size = $Size + page = 1 + order = "desc" + withArchived = $true + withDeleted = $false + withPeople = $true + withStacked = $true +} | ConvertTo-Json + +$result = Invoke-RestMethod ` + -Uri "$Server/api/search/metadata" ` + -Headers @{ "x-api-key" = $key } ` + -Method POST ` + -ContentType "application/json" ` + -Body $body + +$result | ConvertTo-Json -Depth 10 | Out-File "debug_person_$($PersonId.Substring(0,8)).json" -Encoding utf8 + +$items = @() +if ($result.assets -and $result.assets.items) { + $items = @($result.assets.items) +} elseif ($result.items) { + $items = @($result.items) +} + +Write-Host "Nombre items IMAGE renvoyés : $($items.Count)" -ForegroundColor Green + +if ($result.assets) { + Write-Host "nextPage : $($result.assets.nextPage)" +} elseif ($result.nextPage) { + Write-Host "nextPage : $($result.nextPage)" +} + +if ($items.Count -eq 0) { + Write-Host "" + Write-Host "Aucun asset IMAGE. Cette personne ne devrait pas afficher de grille photo dans l'app." -ForegroundColor Red + exit 0 +} + +Write-Host "" +Write-Host "3) Premiers assets :" -ForegroundColor Yellow +$items | Select-Object -First 5 id,type,originalFileName,localDateTime,isArchived,isTrashed,width,height | Format-Table + +$asset = $items[0] +$assetId = $asset.id + +Write-Host "" +Write-Host "4) Test miniature du premier asset..." -ForegroundColor Yellow +curl.exe -L -H "x-api-key: $key" -o "asset_preview_$($assetId.Substring(0,8)).jpg" "$Server/api/assets/$assetId/thumbnail?size=preview" +curl.exe -L -H "x-api-key: $key" -o "asset_thumb_$($assetId.Substring(0,8)).jpg" "$Server/api/assets/$assetId/thumbnail?size=thumbnail" + +Write-Host "" +Write-Host "Fichiers créés :" -ForegroundColor Green +Write-Host "debug_person_$($PersonId.Substring(0,8)).json" +Write-Host "asset_preview_$($assetId.Substring(0,8)).jpg" +Write-Host "asset_thumb_$($assetId.Substring(0,8)).jpg" + +Write-Host "" +Write-Host "Ouvre les images téléchargées pour vérifier si les miniatures existent :" -ForegroundColor Cyan +Write-Host "start .\asset_preview_$($assetId.Substring(0,8)).jpg" +Write-Host "start .\asset_thumb_$($assetId.Substring(0,8)).jpg" diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..dc21d56 --- /dev/null +++ b/web/index.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + immich_tv_viewer + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..e70cf07 --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "immich_tv_viewer", + "short_name": "immich_tv_viewer", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/windows/.gitignore b/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt new file mode 100644 index 0000000..5509fb2 --- /dev/null +++ b/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(immich_tv_viewer LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "immich_tv_viewer") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..903f489 --- /dev/null +++ b/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..8b6d468 --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..dc139d8 --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..3ad69c6 --- /dev/null +++ b/windows/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..394917c --- /dev/null +++ b/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc new file mode 100644 index 0000000..e8fde16 --- /dev/null +++ b/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "immich_tv_viewer" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "immich_tv_viewer" "\0" + VALUE "LegalCopyright", "Copyright (C) 2026 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "immich_tv_viewer.exe" "\0" + VALUE "ProductName", "immich_tv_viewer" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..955ee30 --- /dev/null +++ b/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp new file mode 100644 index 0000000..5d2e7d8 --- /dev/null +++ b/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"immich_tv_viewer", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/windows/runner/resource.h b/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..c04e20c Binary files /dev/null and b/windows/runner/resources/app_icon.ico differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..153653e --- /dev/null +++ b/windows/runner/runner.exe.manifest @@ -0,0 +1,14 @@ + + + + + PerMonitorV2 + + + + + + + + + diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp new file mode 100644 index 0000000..3cb7146 --- /dev/null +++ b/windows/runner/utils.cpp @@ -0,0 +1,69 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + // First, find the length of the string with a safe upper bound (CWE-126). + // UNICODE_STRING_MAX_CHARS (32767) is the maximum length of a UNICODE_STRING. + int input_length = static_cast(wcsnlen(utf16_string, UNICODE_STRING_MAX_CHARS)); + // Now use that bounded length to determine the required buffer size. + // When an explicit length is passed, WideCharToMultiByte does not include + // the null terminator in its returned size. + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, nullptr, 0, nullptr, nullptr); + std::string utf8_string; + if (target_length == 0 || static_cast(target_length) > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/windows/runner/utils.h b/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp new file mode 100644 index 0000000..60608d0 --- /dev/null +++ b/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h new file mode 100644 index 0000000..e901dde --- /dev/null +++ b/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_