feat(sync): sélecteur de chaîne YouTube (multi-chaînes/marque) via PageId
This commit is contained in:
@@ -11,6 +11,15 @@ export interface OAuthConnection {
|
||||
expiresAt: number | null;
|
||||
connectedAt: number | null;
|
||||
updatedAt: number | null;
|
||||
ytChannelId?: string | null;
|
||||
ytPageId?: string | null;
|
||||
}
|
||||
|
||||
export interface YtChannel {
|
||||
channelId: string | null;
|
||||
title: string;
|
||||
handle: string | null;
|
||||
selected: boolean;
|
||||
}
|
||||
|
||||
export interface OAuthPreview {
|
||||
@@ -82,6 +91,16 @@ export class OAuthImportService {
|
||||
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}`);
|
||||
}
|
||||
|
||||
/** Chaînes YouTube du compte (sélecteur multi-chaînes / marque). */
|
||||
ytChannels(): Observable<{ channels: YtChannel[]; selected: { channelId: string | null; pageId: string | null } }> {
|
||||
return this.http.get<any>(`/api/oauth/google/yt-channels`);
|
||||
}
|
||||
|
||||
/** Mémorise la chaîne à cibler pour l'historique et Regarder plus tard. */
|
||||
saveYtChannel(channelId: string | null, pageId: string | null): Observable<{ selected: { channelId: string | null; pageId: string | null } }> {
|
||||
return this.http.put<any>(`/api/oauth/google/yt-channel`, { channelId, pageId });
|
||||
}
|
||||
}
|
||||
|
||||
/** Parse local du `watch-history.json` de Google Takeout (confidentiel : rien n'est uploadé tel quel). */
|
||||
|
||||
Reference in New Issue
Block a user