tobira
tobira copied to clipboard
Add playlists to sync code, DB & API and add playlist direct links
This is the first PR about playlists for Tobira. It requires https://github.com/opencast/opencast/pull/5734 to be useful.
This does mainly two things:
- Tobira now understands the playlist data that Opencast is sending via Harvest API and stores it in Tobira's DB.
- Adds Playlists to Tobira's GraphQL API (without any mutations yet)
- Add the two direct link routes so that playlists can be viewed given their ID. This required making the core "series block" code more generic to also work with playlists.
Two main features are still missing:
- Playlist blocks (that can be placed on pages)
- "My Playlists": management area to create, delete and edit playlists
For these two, I will create separate issues. Therefore:
Closes #937
Screenshots
Unfortunately, there are no playlists on the test deployment yet. So here are some screenshots:
As you can see:
- Currently this looks very very similar to how series are displayed.
- For playlists, there is a new order mode "Playlist order" which shows the videos in the order that the playlist specifies. This is the default of course. But users can still sort by date and title, if they so wish.
- In the "Playlist order" mode, video that are missing or cannot be accessed are shown with a placeholder.
- In any other ordering mode, only a small note is shown at the bottom. (Since we have no information about the missing items, we cannot properly sort them. They would be sorted all at the very end anyway.)
Open questions
- Should the "missing items" note also be shown for series? So far we don't: we simply do not show the videos that the user has no read access to.
- What about the specific formulations for the note and the missing video placeholders? Specifically:
- German:
missing-video: Video nicht gefunden unauthorized: Fehlende Berechtigung hidden-items_one: 'Ein Video wurde nicht gefunden oder Sie haben keinen Zugriff darauf.' hidden-items_other: '{{count}} Videos wurden nicht gefunden oder Sie haben keinen Zugriff darauf.'
- English:
missing-video: Video not found unauthorized: Missing permissions hidden-items_one: 'One video is missing or requires additional permissions to view.' hidden-items_other: '{{count}} videos are missing or require additional permissions to view.'
- German:
- How should we call the "order as specified by the playlist" ordering mode? Currently I called it "Playlist order" (en) / "Wie Playlist" (de). Better ideas appreciated.
Can be reviewed commit by commit.