diff --git a/modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml b/modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml index de86538f098eded7e03d6927244bbf39af7e9947..20cd5707f7b17a3c3d7f97bb2bc14b4bb46efa9b 100644 --- a/modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml +++ b/modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml @@ -23,6 +23,7 @@ import QtQuick 2.11 import org.videolan.medialib 0.1 import "qrc:///widgets/" as Widgets +import "qrc:///util/" as Util import "qrc:///style/" VideoAll { @@ -53,7 +54,7 @@ VideoAll { parentId: initialId } - contextMenu: VideoContextMenu { model: modelVideo } + contextMenu: Util.MLContextMenu { model: modelVideo; showPlayAsAudioAction: true } header: Column { width: root.width diff --git a/modules/gui/qt/medialibrary/qml/VideoAll.qml b/modules/gui/qt/medialibrary/qml/VideoAll.qml index 43c632f74d9c5e1ef27d894dbc0a7a79cc6ac115..a4a7fa2747cd1e71ae1933a7b97e0ee1990ab2f5 100644 --- a/modules/gui/qt/medialibrary/qml/VideoAll.qml +++ b/modules/gui/qt/medialibrary/qml/VideoAll.qml @@ -27,6 +27,7 @@ import org.videolan.vlc 0.1 import "qrc:///widgets/" as Widgets import "qrc:///main/" as MainInterface import "qrc:///util/" as Util +import "qrc:///util/Helpers.js" as Helpers import "qrc:///style/" FocusScope { @@ -282,8 +283,11 @@ FocusScope { onContextMenuButtonClicked: { gridView.rightClickOnItem(index); - root.contextMenu.popup(modelSelect.selectedIndexes, globalMousePos, - { "information" : index }); + var options = {} + if (Helpers.get(model, "isVideo", true)) + options["information"] = index + + root.contextMenu.popup(modelSelect.selectedIndexes, globalMousePos, options); } // Animations diff --git a/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml index 04b292de781aa693d65ea2168b7d839df05c5f48..000b204a191c8ed5f5545ce30c73ae28372d4318 100644 --- a/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml +++ b/modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml @@ -24,6 +24,7 @@ import org.videolan.vlc 0.1 import org.videolan.medialib 0.1 import "qrc:///widgets/" as Widgets +import "qrc:///util/" as Util import "qrc:///style/" VideoAll { @@ -52,7 +53,7 @@ VideoAll { model: !!_meta ? _meta.model : null - contextMenu: !!_meta ? _meta.contextMenu : null + contextMenu: Util.MLContextMenu { model: _meta ? _meta.model : null; showPlayAsAudioAction: true } // Functions @@ -119,8 +120,6 @@ VideoAll { property var model: MLVideoModel { ml: MediaLib } - property var contextMenu: VideoContextMenu { model: metaVideo.model } - function onAction(indexes) { g_mainDisplay.showPlayer() @@ -142,8 +141,6 @@ VideoAll { property var model: MLVideoGroupsModel { ml: MediaLib } - property var contextMenu: VideoGroupsContextMenu { model: metaGroup.model } - function onAction(indexes) { var index = indexes[0] @@ -188,8 +185,6 @@ VideoAll { property var model: MLVideoFoldersModel { ml: MediaLib } - property var contextMenu: VideoFoldersContextMenu { model: metaFolder.model } - function onAction(indexes) { var index = indexes[0]