From ec18782513539eb5b5b221d5a3136987720d5ea0 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 16 Mar 2021 14:02:14 +0100 Subject: [PATCH] Exclude audio types from gallery list --- api/js/etemplate/expose.js | 2 +- api/js/etemplate/expose.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/expose.js b/api/js/etemplate/expose.js index 25015fd2ce..b7ebcfa38e 100644 --- a/api/js/etemplate/expose.js +++ b/api/js/etemplate/expose.js @@ -103,7 +103,7 @@ function expose(Base) { if (!uid) continue; var data = egw.dataGetUIDdata(uid); - if (data && data.data && data.data.mime && MIME_REGEX.test(data.data.mime)) { + if (data && data.data && data.data.mime && MIME_REGEX.test(data.data.mime) && !MIME_AUDIO_REGEX.test(data.data.mime)) { var media = this.getMedia(data.data); images[image_index++] = jQuery.extend({}, data.data, media[0]); } diff --git a/api/js/etemplate/expose.ts b/api/js/etemplate/expose.ts index b5ba1d492f..963f608ea6 100644 --- a/api/js/etemplate/expose.ts +++ b/api/js/etemplate/expose.ts @@ -101,7 +101,7 @@ function expose(Base: TBase) { let uid = nm.controller._indexMap[i].uid; if (!uid) continue; let data = egw.dataGetUIDdata(uid); - if (data && data.data && data.data.mime && MIME_REGEX.test(data.data.mime)) { + if (data && data.data && data.data.mime && MIME_REGEX.test(data.data.mime) && !MIME_AUDIO_REGEX.test(data.data.mime)) { let media = this.getMedia(data.data); images[image_index++] = jQuery.extend({}, data.data, media[0]); }