From 7f26c403e8d01a693aa923dc91e946ba91cfd9cc Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Thu, 3 Oct 2019 13:40:09 +0000 Subject: [PATCH] fileinfo: Add more prefix supports --- app/widgets/fileinfo.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/widgets/fileinfo.js b/app/widgets/fileinfo.js index 79b9ec9..164aa28 100644 --- a/app/widgets/fileinfo.js +++ b/app/widgets/fileinfo.js @@ -12,12 +12,18 @@ const Fileinfo = { if (vnode.attrs.file.filename.indexOf('480 ') >= 0) { return '480p' } - if (vnode.attrs.file.filename.indexOf('FLAC') >= 0) { + if (vnode.attrs.file.filename.toLowerCase().indexOf('flac') >= 0) { return 'FLAC' } - if (vnode.attrs.file.filename.indexOf('MP3') >= 0) { + if (vnode.attrs.file.filename.toLowerCase().indexOf('mp3') >= 0) { return 'MP3' } + if (vnode.attrs.file.filename.toLowerCase().indexOf('psd') >= 0) { + return 'PSD' + } + if (vnode.attrs.file.filename.toLowerCase().indexOf('.zip') >= 0) { + return 'ZIP' + } return 'Other' },