Exclude audio types from gallery list

This commit is contained in:
Hadi Nategh 2021-03-16 14:02:14 +01:00
parent 0f0b6e4154
commit ec18782513
2 changed files with 2 additions and 2 deletions

View File

@ -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]);
}

View File

@ -101,7 +101,7 @@ function expose<TBase extends Constructor>(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]);
}