fix(channel): titre/URL Dailymotion + playlists et pagination YouTube
- channel-registry DM: retire le champ invalide avatar_url (400 sur toute la requete -> titre null), URL officielle /user/<username> - channel-content YT: ne plus envoyer pageToken=undefined (400 -> playlists vides); cache de pageTokens opaques pour la pagination videos/shorts/live/playlists - channel-content.service: stoppe l'infinite scroll quand une page n'apporte rien de nouveau
This commit is contained in:
@@ -85,7 +85,10 @@ export class ChannelContentService {
|
||||
const id = (item as any)?.id ?? (item as any)?.title;
|
||||
if (!seen.has(id)) { seen.add(id); merged.push(item); }
|
||||
}
|
||||
this.patch(key, { items: merged, nextPage: page.nextPage, total: page.total ?? current.total, fetchedAt: Date.now() });
|
||||
// Si la page ne rapporte rien de nouveau (ex. provider sans vrai
|
||||
// curseur), on stoppe la pagination au lieu de boucler à l'infini.
|
||||
const nextPage = merged.length === current.items.length ? null : page.nextPage;
|
||||
this.patch(key, { items: merged, nextPage, total: page.total ?? current.total, fetchedAt: Date.now() });
|
||||
}),
|
||||
map(() => true),
|
||||
catchError(() => {
|
||||
|
||||
Reference in New Issue
Block a user