From 68cbc58b7590caa5bcaf4f37e659da79fac1e2d8 Mon Sep 17 00:00:00 2001 From: Jonathan Baecker Date: Thu, 30 Apr 2020 17:11:15 +0200 Subject: [PATCH] add global filter --- ffplayout/frontend/plugins/filters.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ffplayout/frontend/plugins/filters.js b/ffplayout/frontend/plugins/filters.js index b4ad2dcc..4b813ce3 100644 --- a/ffplayout/frontend/plugins/filters.js +++ b/ffplayout/frontend/plugins/filters.js @@ -9,3 +9,12 @@ Vue.filter('toMin', function (sec) { return '' } }) + +Vue.filter('filename', function (path) { + if (path) { + const pathArr = path.split('/') + return pathArr[pathArr.length - 1] + } else { + return '' + } +})