Skip to content
Snippets Groups Projects
Commit 5c27478d authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix play all ctx action on Video groups

Fixes #1390
parent f3f62654
No related branches found
No related tags found
1 merge request!6503.3 fixes
......@@ -437,6 +437,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
CTX_ADD_TO_PLAYLIST -> viewModel.addItemToPlaylist(requireActivity(), position)
}
is VideoGroup -> when (option) {
CTX_PLAY_ALL -> viewModel.play(position)
CTX_PLAY -> viewModel.play(position)
CTX_APPEND -> viewModel.append(position)
CTX_ADD_TO_PLAYLIST -> viewModel.addItemToPlaylist(requireActivity(), position)
......@@ -488,7 +489,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
is VideoCtxClick -> {
when (item) {
is Folder -> showContext(requireActivity(), this@VideoGridFragment, position, item.title, CTX_FOLDER_FLAGS)
is VideoGroup -> showContext(requireActivity(), this@VideoGridFragment, position, item.title, CTX_FOLDER_FLAGS or CTX_RENAME_GROUP or CTX_UNGROUP)
is VideoGroup -> showContext(requireActivity(), this@VideoGridFragment, position, item.title, CTX_FOLDER_FLAGS or CTX_RENAME_GROUP or CTX_UNGROUP or CTX_PLAY_ALL)
is MediaWrapper -> {
val group = item.type == MediaWrapper.TYPE_GROUP
var flags = if (group) CTX_VIDEO_GROUP_FLAGS else CTX_VIDEO_FLAGS
......
......@@ -89,6 +89,7 @@ class VideosViewModel(context: Context, type: VideoGroupingType, val folder: Fol
when (item) {
is Folder -> item.getAll()
is VideoGroup -> item.getAll()
is MediaWrapper -> listOf(item)
else -> null
}
}?.let { MediaUtils.openList(context, it, 0) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment