Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple entries in a playlist for the same video #965

Open
dennis531 opened this issue Apr 12, 2024 · 1 comment
Open

Support multiple entries in a playlist for the same video #965

dennis531 opened this issue Apr 12, 2024 · 1 comment
Labels
type:enhancement v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x

Comments

@dennis531
Copy link
Collaborator

The plugin currently only supports one entry for one video per playlist. This restriction is implemented in the database. On the other hand, Opencast playlists can contain multiple entires of the same video in one playlist. As we do not have a specific use case for this, we should not provide this function in the UI. Nevertheless, the plugin should be able to handle multiple entries of the same video in the database and display them to the user in order to avoid incompatibilities.

Related #955

@dennis531 dennis531 added type:enhancement v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x labels Apr 12, 2024
@dennis531 dennis531 self-assigned this Nov 18, 2024
@dennis531
Copy link
Collaborator Author

I think this shouldn't be a problem or necessary at all. In

$playlist_video = PlaylistVideos::findOneBySQL('video_id = ? AND playlist_id = ?', [$db_video->id, $this->id]);
if (is_null($playlist_video)) {
$playlist_video = PlaylistVideos::create([
'video_id' => $db_video->id,
'playlist_id' => $this->id,
'service_entry_id' => $entry->id ?? null,
]);
}
multiple entries of the same video are ignored. Still, if the user saves the playlist, the multiple entries will be lost.

@dennis531 dennis531 removed their assignment Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x
Projects
Status: No status
Development

No branches or pull requests

1 participant