diff --git a/docs/play-store.md b/docs/play-store.md index 597989e..4c0db75 100644 --- a/docs/play-store.md +++ b/docs/play-store.md @@ -99,10 +99,10 @@ Rien d'autre : pas de localisation, pas de contacts, pas d'identifiant publicita - Le mode « Explorer sans compte » permet de voir l'app sans se connecter. - La partie sociale demande un compte : fournir à Google un **compte de test** (e-mail + mot de passe) dédié, sans double authentification. -## Visuels à fournir -- Icône 512 × 512 (déjà dans `public/icons/icon-512.png`). -- Bannière 1024 × 500. -- 2 à 8 captures d'écran de téléphone (format portrait, 16:9 ou 9:16). +## Visuels (prêts dans `docs/store/`) +- Icône 512 × 512 : `public/icons/icon-512.png`. +- Bannière 1024 × 500 : `banniere-fr.png`, `banniere-en.png`. +- Captures 1080 × 1920 : `fr-1…7-*.png` pour la fiche française, `en-1…7-*.png` pour l'anglaise (compte de démo, supprimé depuis). ## Avant publication - Fichier `/.well-known/assetlinks.json` avec l'empreinte SHA-256 de la clé de signature de l'app Android (pour qu'elle s'ouvre sans barre d'adresse). diff --git a/docs/store/banniere-en.png b/docs/store/banniere-en.png new file mode 100644 index 0000000..faf1807 Binary files /dev/null and b/docs/store/banniere-en.png differ diff --git a/docs/store/banniere-fr.png b/docs/store/banniere-fr.png new file mode 100644 index 0000000..69ce1d3 Binary files /dev/null and b/docs/store/banniere-fr.png differ diff --git a/docs/store/en-1-home.png b/docs/store/en-1-home.png new file mode 100644 index 0000000..8094d3e Binary files /dev/null and b/docs/store/en-1-home.png differ diff --git a/docs/store/en-2-catalog.png b/docs/store/en-2-catalog.png new file mode 100644 index 0000000..c187694 Binary files /dev/null and b/docs/store/en-2-catalog.png differ diff --git a/docs/store/en-3-fiche-scroll.png b/docs/store/en-3-fiche-scroll.png new file mode 100644 index 0000000..e81398b Binary files /dev/null and b/docs/store/en-3-fiche-scroll.png differ diff --git a/docs/store/en-4-stats.png b/docs/store/en-4-stats.png new file mode 100644 index 0000000..bcaadb8 Binary files /dev/null and b/docs/store/en-4-stats.png differ diff --git a/docs/store/en-5-calendar.png b/docs/store/en-5-calendar.png new file mode 100644 index 0000000..a3a79e3 Binary files /dev/null and b/docs/store/en-5-calendar.png differ diff --git a/docs/store/en-6-profile.png b/docs/store/en-6-profile.png new file mode 100644 index 0000000..ea50347 Binary files /dev/null and b/docs/store/en-6-profile.png differ diff --git a/docs/store/en-7-home.png b/docs/store/en-7-home.png new file mode 100644 index 0000000..ccf1e89 Binary files /dev/null and b/docs/store/en-7-home.png differ diff --git a/docs/store/fr-1-home.png b/docs/store/fr-1-home.png new file mode 100644 index 0000000..3ad0e8e Binary files /dev/null and b/docs/store/fr-1-home.png differ diff --git a/docs/store/fr-2-catalog.png b/docs/store/fr-2-catalog.png new file mode 100644 index 0000000..1496b62 Binary files /dev/null and b/docs/store/fr-2-catalog.png differ diff --git a/docs/store/fr-3-fiche-scroll.png b/docs/store/fr-3-fiche-scroll.png new file mode 100644 index 0000000..f07e847 Binary files /dev/null and b/docs/store/fr-3-fiche-scroll.png differ diff --git a/docs/store/fr-4-stats.png b/docs/store/fr-4-stats.png new file mode 100644 index 0000000..c7cd5f8 Binary files /dev/null and b/docs/store/fr-4-stats.png differ diff --git a/docs/store/fr-5-calendar.png b/docs/store/fr-5-calendar.png new file mode 100644 index 0000000..f00eccf Binary files /dev/null and b/docs/store/fr-5-calendar.png differ diff --git a/docs/store/fr-6-profile.png b/docs/store/fr-6-profile.png new file mode 100644 index 0000000..267b48a Binary files /dev/null and b/docs/store/fr-6-profile.png differ diff --git a/docs/store/fr-7-home.png b/docs/store/fr-7-home.png new file mode 100644 index 0000000..abbf983 Binary files /dev/null and b/docs/store/fr-7-home.png differ diff --git a/src/components/ImportTextReview.tsx b/src/components/ImportTextReview.tsx index a6b327f..9e8e01c 100644 --- a/src/components/ImportTextReview.tsx +++ b/src/components/ImportTextReview.tsx @@ -99,6 +99,7 @@ export default function ImportTextReview({ {editing === e.key && ( { onChange(e.key, match) @@ -118,7 +119,7 @@ export default function ImportTextReview({ } /** Recherche d'un autre titre pour une ligne. */ -function Picker({ initial, tmdbKey, onPick }: { initial: string; tmdbKey?: string; onPick: (m: Match) => void }) { +function Picker({ initial, progressSeason, tmdbKey, onPick }: { initial: string; progressSeason?: number; tmdbKey?: string; onPick: (m: Match) => void }) { const [q, setQ] = useState(initial) const [results, setResults] = useState() const [busy, setBusy] = useState(false) @@ -141,7 +142,7 @@ function Picker({ initial, tmdbKey, onPick }: { initial: string; tmdbKey?: strin const pick = async (r: SearchResult) => { setBusy(true) try { - onPick(await matchFor(r, tmdbKey?.trim() || undefined)) + onPick(await matchFor(r, tmdbKey?.trim() || undefined, progressSeason)) } finally { setBusy(false) } diff --git a/src/lib/import/resolve.ts b/src/lib/import/resolve.ts index d779a2e..9ed1422 100644 --- a/src/lib/import/resolve.ts +++ b/src/lib/import/resolve.ts @@ -1,5 +1,5 @@ import { t } from '../../i18n' -import { ANILIST, ANILIST_FIELDS, aniToResult, CLOUD_TMDB, getTmdbDetails, sanitizeMeta, searchAll, tmdbFindExternal, tmdbImportSearch, type AniMedia, type SearchResult } from '../catalogApi' +import { ANILIST, ANILIST_FIELDS, aniToResult, CLOUD_TMDB, getTmdbDetails, getTmdbExtras, sanitizeMeta, searchAll, tmdbFindExternal, tmdbImportSearch, type AniMedia, type SearchResult } from '../catalogApi' import type { MediaInput } from '../../types' import { anilistEntries, titleKey, type AniListEntry, type ImportEntry } from './sources' import type { TextEntry } from './textList' @@ -16,6 +16,8 @@ export interface Match { result: SearchResult /** Métadonnées prêtes pour la fiche (titre, type, affiche, saisons…) */ meta: Partial + /** Épisodes par saison quand la fiche n'en garde pas (animes) : sert à convertir « S2E14 » */ + seasonSizes?: number[] } export interface Progress { @@ -418,7 +420,7 @@ export function pickTextMatch(list: SearchResult[], e: Pick { +export async function matchFor(result: SearchResult, key?: string, progressSeason?: number): Promise { let meta: Partial = { title: result.title, originalTitle: result.originalTitle, @@ -435,6 +437,14 @@ export async function matchFor(result: SearchResult, key?: string): Promise 1 && !meta.seasons?.length && result.externalId.startsWith('tmdb:tv:')) { + const extras = await getTmdbExtras(result.externalId, key).catch((err) => { + if (isRateError(err)) throw err + return undefined + }) + if (extras?.seasons?.length) return { result, meta, seasonSizes: extras.seasons } + } return { result, meta } } @@ -472,7 +482,7 @@ export async function resolveTextEntries(entries: TextEntry[], opts: ResolveOpti } } if (!pick.result) return - found.set(e.key, await withRetry(() => matchFor(pick.result!, key), token, onWait)) + found.set(e.key, await withRetry(() => matchFor(pick.result!, key, e.progress?.season), token, onWait)) if (!pick.sure) unsure.add(e.key) } catch (err) { if (err instanceof CancelledError) throw err @@ -488,7 +498,7 @@ export async function resolveTextEntries(entries: TextEntry[], opts: ResolveOpti /** « S3E12 » → épisodes vus, une fois les saisons connues. */ export function withProgress(e: TextEntry, match?: Match): TextEntry { if (!e.progress) return e - const seasons = match?.meta.seasons + const seasons = match?.meta.seasons?.length ? match.meta.seasons : match?.seasonSizes const { season, episode } = e.progress let watched: number | undefined if (seasons?.length) watched = seasons.slice(0, season - 1).reduce((a, b) => a + b, 0) + episode