Add Popular tab to channel page

- YouTube sort=p fetch: indexes top 100 most-viewed videos from a channel,
  storing view_count in the DB
- Popular tab on channel page shows videos sorted by view_count DESC
- Videos/Popular tab switcher with context-appropriate fetch buttons
- Expose view_count in VideoOut; add 'popular' sort to channel videos endpoint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 22:22:10 +02:00
parent aa91156bbc
commit d31fc1ef7f
3 changed files with 146 additions and 27 deletions

View File

@@ -49,6 +49,7 @@ export const unfollowChannel = (id) => api.delete(`/channels/${id}/follow`);
export const indexChannel = (id) => api.post(`/channels/${id}/index`);
export const indexChannelFull = (id) => api.post(`/channels/${id}/index-full`);
export const exploreChannelOlder = (id, page) => api.post(`/channels/${id}/explore`, null, { params: { page } });
export const fetchPopularVideos = (id) => api.post(`/channels/${id}/fetch-popular`);
export const followChannelByUrl = (data) => api.post("/channels/follow-by-url", data);
export const setChannelAutoDownload = (id, value) => api.patch(`/channels/${id}/auto-download`, { auto_download: value });
export const markChannelsSeen = () => api.post("/channels/mark-seen");