Add playlists support and fix explore older videos
- New playlists router: fetch channel playlists from YouTube, index playlist videos, browse by playlist with pagination - Playlist model gets video_ids column to store ordered video list - Register playlists router in main.py with DB migration - Add Playlists tab to Channel page: grid of playlist cards, click to browse videos, index/re-index per playlist - Fix explore older videos skipping all entries without published_at; flat-playlist entries for older videos rarely include timestamp data Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -155,3 +155,10 @@ export const deleteCollection = (id) => api.delete(`/collections/${id}`);
|
||||
export const getCollectionVideos = (id) => api.get(`/collections/${id}/videos`);
|
||||
export const addToCollection = (collectionId, videoId) => api.post(`/collections/${collectionId}/videos`, { video_id: videoId });
|
||||
export const removeFromCollection = (collectionId, videoId) => api.delete(`/collections/${collectionId}/videos/${videoId}`);
|
||||
|
||||
// Playlists
|
||||
export const getChannelPlaylists = (channelId) => api.get(`/playlists/channel/${channelId}`);
|
||||
export const fetchChannelPlaylists = (channelId) => api.post(`/playlists/channel/${channelId}/fetch`);
|
||||
export const getPlaylistVideos = (playlistId, offset = 0, limit = 60) =>
|
||||
api.get(`/playlists/${playlistId}/videos`, { params: { offset, limit } });
|
||||
export const indexPlaylist = (playlistId) => api.post(`/playlists/${playlistId}/index`);
|
||||
|
||||
Reference in New Issue
Block a user