diff --git a/modules/torrents/client/controllers/torrents.client.controller.js b/modules/torrents/client/controllers/torrents.client.controller.js index 9f6eccd0..148cf0ee 100644 --- a/modules/torrents/client/controllers/torrents.client.controller.js +++ b/modules/torrents/client/controllers/torrents.client.controller.js @@ -426,6 +426,26 @@ vm.torrentBuildPager(); }; + /** + * tagsFilter + * @param item + * @returns {boolean} + */ + vm.tagsFilter = function (item) { + var res = false; + if (vm.torrentType === 'aggregate') { + angular.forEach(vm.torrentTypeConfig.value, function (t) { + if (t.enable && item.cats.includes(t.value)) + res = true; + }); + } else { + if (item.cats.includes(vm.torrentType)) + res = true; + } + + return res; + }; + /** * onMoreTagsClicked */ diff --git a/modules/torrents/client/views/list-torrents.client.view.html b/modules/torrents/client/views/list-torrents.client.view.html index 64058be1..9e00f2c1 100644 --- a/modules/torrents/client/views/list-torrents.client.view.html +++ b/modules/torrents/client/views/list-torrents.client.view.html @@ -154,7 +154,7 @@