fix(sync): WL diagnostic, import-all paginé + totaux, sync auto historique InnerTube
- Watch Later: youtube_no_channel / watchlater_not_found avec hint actionnable + log cles relatedPlaylists (sans PII) - Preview Google: totaux compte (subscriptionTotal/likeTotal), UI 'X / N, l'import prend tout'; import-all paginé (subs<=1000, likes<=500) au lieu de 50/25 - Sync auto historique: GET /oauth/google/yt-history (browse FEhistory authentifie, continuations, <=500), bouton Sync auto dans carte Takeout, import via lots takeout existants
This commit is contained in:
@@ -19,6 +19,9 @@ export interface OAuthPreview {
|
||||
likes: Array<{ provider: string; videoId: string; title: string; thumbnail?: string }>;
|
||||
subscriptionCount: number;
|
||||
likeCount: number;
|
||||
/** Totaux du compte (l'aperçu n'affiche que les premiers, l'import prend tout). */
|
||||
subscriptionTotal?: number;
|
||||
likeTotal?: number;
|
||||
}
|
||||
|
||||
export interface OAuthImportResult {
|
||||
@@ -74,6 +77,11 @@ export class OAuthImportService {
|
||||
importTakeoutBatch(items: Array<{ videoId: string; title?: string; watchedAt?: string }>): Observable<{ imported: number; skipped: number; total: number }> {
|
||||
return this.http.post<any>(`/api/user/history/takeout`, { items });
|
||||
}
|
||||
|
||||
/** Historique YouTube via InnerTube authentifié (sync auto, sans fichier). */
|
||||
ytHistory(max = 200): Observable<{ items: Array<{ videoId: string; title: string; thumbnail?: string; watchedAt?: string }>; count: number; hasMore: boolean }> {
|
||||
return this.http.get<any>(`/api/oauth/google/yt-history?max=${max}`);
|
||||
}
|
||||
}
|
||||
|
||||
/** Parse local du `watch-history.json` de Google Takeout (confidentiel : rien n'est uploadé tel quel). */
|
||||
|
||||
Reference in New Issue
Block a user