Initial upload: immich-tv-viewer

This commit is contained in:
Abderrahim-Mouhcine
2026-08-16 19:57:59 +01:00
commit 613017c870
180 changed files with 11728 additions and 0 deletions
+2
View File
@@ -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"
+63
View File
@@ -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
+84
View File
@@ -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)"
+93
View File
@@ -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"