Add video playlists support
Closed this issue · 0 comments
A forgotten-about PeerTube feature is the video Playlists. We should treat this as a (possible) top-level organizer of video material, alongside Channels and Categories. As PeerTube Categories are static and cannot be changed, a video distributor that wants to place things in buckets would turn to Playlists as the tool available.
Here are (our) different views on how things are organized:
- Channels:
- Channel 1
- Name & description
- Thumbnail picture
- Videos:
- Video 1
- Video 2 in Playlist A & B
- ...
- Channel 2
- Name & description
- Thumbnail picture
- Videos:
- Video 3 in Playlist B
- Video 4
- ...
- ...
- Channel 1
- Playlists:
- Playlist A
- Name & description
- Thumbnail picture
- Videos:
- Video 2 from Channel 1
- ...
- Playlist B
- Name & description
- Thumbnail picture
- Videos
- Video 2 from Channel 1
- Video 3 from Channel 2
- ...
- ...
- Playlist A
- Categories:
- Category 1
- Name
- Videos:
- Video 1 from Channel 1
- Video 2 from Channel 1 and in Playlist A & B
- Video 3 from Channel 2 and in Playlist B
- Video 4 from Channel 2
- ...
- Category 2
- ...
- Category 1
To accommodate this, we should have a new "Playlists" thing in the sidebar from #135 (Home, History, Playlists, Channels, Categories) and a new section on the landing page from #137 (Latest videos, Recently watched, Playlists, Channels, Categories). In the future, featured playlists should be possible to order & highlight via a site-specific configuration (as we've talked about with respect to Channels and Categories), e.g. adding a "featuredPlaylists: ['Mike\'s best', '2024 highlights', ...]
" property.
@mkl-adsn Can you please review and join standup to discuss if/when/how these changes can be incorporated in the designs?
@mykhailodanilenko Please add a draft implementation using the /api/v1/video-playlists
API. We should sort based on updated time and filter them on 1) local and 2) not empty. On a big site like the Swedish "Swebbtube" it's still a moderate amount, 50 or less.
Check it out!
# Devol
curl -s 'https://peertube.devol.it/api/v1/video-playlists?count=100&start=0&sort=-updatedAt' | jq '.data.[] | select(.isLocal) | select(.videosLength > 0) | "Playlist: \(.displayName) / Videos count: \(.videosLength) / Channel: \(.videoChannel.displayName)"'
"Playlist: Studi biblici online su Geremia / Videos count: 24 / Channel: il canale del Pastore "
"Playlist: Big Tech / Videos count: 1 / Channel: Veb Systems"
"Playlist: Premeno 2019 / Videos count: 2 / Channel: PianoAlfred"
# Swebbtube
curl -s 'https://swebbtube.se/api/v1/video-playlists?count=100&start=0&sort=-updatedAt' | jq '.data.[] | select(.isLocal) | select(.videosLength > 0) | "Playlist: \(.displayName) / Videos count: \(.videosLength) / Channel: \(.videoChannel.displayName)"'