From eea33961878329cda8cc0aff9b8c76f241717cb8 Mon Sep 17 00:00:00 2001 From: p0ps Date: Fri, 28 Sep 2018 12:01:43 +0200 Subject: [PATCH] Feature/fix anidb release group high mem usage (#5314) * Fix memory overflow when opening editShow on an anime with release groups from anidb. * The real fix. * Created vendors. * Fix xo lint errors. Renamed item to something more descriptive. * Update changelog. * Yarn dev. --- CHANGELOG.md | 2 ++ .../slim/src/components/anidb-release-group-ui.vue | 7 +++++-- themes/dark/assets/js/medusa-runtime.js | 2 +- themes/light/assets/js/medusa-runtime.js | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fadae8caa8..c4e7a726ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ - Fixed Speed.CD provider exception during searches ([#5190](https://github.com/pymedusa/Medusa/pull/5190)) - Fixed adba lib trowing exceptions getting release groups for some anime shows ([#5125](https://github.com/pymedusa/Medusa/pull/5125)) - Fixed trakt icon not showing on the displayShow page, when a trakt id is available ([#5300](https://github.com/pymedusa/Medusa/pull/5300)) +- Fixed editShow page crashing because of a memory overflow ([#5314](https://github.com/pymedusa/Medusa/pull/5314)) + ----- diff --git a/themes-default/slim/src/components/anidb-release-group-ui.vue b/themes-default/slim/src/components/anidb-release-group-ui.vue index 5d25eb85b3..f2a21b84ef 100644 --- a/themes-default/slim/src/components/anidb-release-group-ui.vue +++ b/themes-default/slim/src/components/anidb-release-group-ui.vue @@ -95,8 +95,11 @@ export default { id: this.index, toggled: false, memberOf: list }, release); - this.allReleaseGroups.push(itemAsObject); - this.index += 1; // Increment the counter for our next item. + + if (this.allReleaseGroups.filter(group => group.name === itemAsObject.name && group.memberOf === list).length === 0) { + this.allReleaseGroups.push(itemAsObject); + this.index += 1; // Increment the counter for our next item. + } } }, moveToList(list) { diff --git a/themes/dark/assets/js/medusa-runtime.js b/themes/dark/assets/js/medusa-runtime.js index 03aea24c08..79c000eb7f 100644 --- a/themes/dark/assets/js/medusa-runtime.js +++ b/themes/dark/assets/js/medusa-runtime.js @@ -44,7 +44,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _app /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'anidb-release-group-ui',\n props: {\n blacklist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n whitelist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n allGroups: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n index: 0,\n allReleaseGroups: [],\n newGroup: ''\n };\n },\n mounted: function mounted() {\n this.createIndexedObjects(this.blacklist, 'blacklist');\n this.createIndexedObjects(this.whitelist, 'whitelist');\n this.createIndexedObjects(this.allGroups, 'releasegroups');\n },\n methods: {\n toggleItem: function toggleItem(release) {\n this.allReleaseGroups = this.allReleaseGroups.map(function (x) {\n if (x.id === release.id) {\n x.toggled = !x.toggled;\n }\n\n return x;\n });\n },\n createIndexedObjects: function createIndexedObjects(releaseGroups, list) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = releaseGroups[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var release = _step.value;\n\n // Whitelist and blacklist pass an array of strings not objects.\n if (typeof release === 'string') {\n release = {\n name: release\n };\n } // Merge the passed object with some additional information.\n\n\n var itemAsObject = Object.assign({\n id: this.index,\n toggled: false,\n memberOf: list\n }, release);\n this.allReleaseGroups.push(itemAsObject);\n this.index += 1; // Increment the counter for our next item.\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n },\n moveToList: function moveToList(list) {\n var _this = this;\n\n // Only move items that have been toggled and that are not yet in that list.\n // It's matching them by item.name.\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop = function _loop() {\n var group = _step2.value;\n var inList = _this.allReleaseGroups.find(function (releaseGroup) {\n return releaseGroup.memberOf === list && releaseGroup.name === group.name;\n }) !== undefined;\n\n if (group.toggled && !inList) {\n group.toggled = false;\n group.memberOf = list;\n }\n };\n\n for (var _iterator2 = this.allReleaseGroups[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop();\n }\n /*\n * Check if there is a value in the custom release group input box,\n * and move this to the selected group (whitelist or blacklist)\n */\n\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (this.newGroup && list !== 'releasegroups') {\n this.allReleaseGroups.push({\n id: this.index,\n name: this.newGroup,\n toggled: false,\n memberOf: list\n });\n this.index += 1;\n this.newGroup = '';\n }\n },\n deleteFromList: function deleteFromList(list) {\n this.allReleaseGroups = this.allReleaseGroups.filter(function (x) {\n return x.memberOf !== list || !x.toggled;\n });\n }\n },\n computed: {\n itemsWhitelist: function itemsWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist';\n });\n },\n itemsBlacklist: function itemsBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist';\n });\n },\n itemsReleaseGroups: function itemsReleaseGroups() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'releasegroups';\n });\n },\n showDeleteFromWhitelist: function showDeleteFromWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist' && x.toggled === true;\n }).length !== 0;\n },\n showDeleteFromBlacklist: function showDeleteFromBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist' && x.toggled === true;\n }).length !== 0;\n }\n },\n watch: {\n allReleaseGroups: {\n handler: function handler() {\n this.$emit('change', this.allReleaseGroups);\n },\n deep: true\n },\n allGroups: {\n handler: function handler(newValue) {\n this.createIndexedObjects(newValue, 'releasegroups');\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/anidb-release-group-ui.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'anidb-release-group-ui',\n props: {\n blacklist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n whitelist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n allGroups: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n index: 0,\n allReleaseGroups: [],\n newGroup: ''\n };\n },\n mounted: function mounted() {\n this.createIndexedObjects(this.blacklist, 'blacklist');\n this.createIndexedObjects(this.whitelist, 'whitelist');\n this.createIndexedObjects(this.allGroups, 'releasegroups');\n },\n methods: {\n toggleItem: function toggleItem(release) {\n this.allReleaseGroups = this.allReleaseGroups.map(function (x) {\n if (x.id === release.id) {\n x.toggled = !x.toggled;\n }\n\n return x;\n });\n },\n createIndexedObjects: function createIndexedObjects(releaseGroups, list) {\n var _this = this;\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var release = _step.value;\n\n // Whitelist and blacklist pass an array of strings not objects.\n if (typeof release === 'string') {\n release = {\n name: release\n };\n } // Merge the passed object with some additional information.\n\n\n var itemAsObject = Object.assign({\n id: _this.index,\n toggled: false,\n memberOf: list\n }, release);\n\n if (_this.allReleaseGroups.filter(function (group) {\n return group.name === itemAsObject.name && group.memberOf === list;\n }).length === 0) {\n _this.allReleaseGroups.push(itemAsObject);\n\n _this.index += 1; // Increment the counter for our next item.\n }\n };\n\n for (var _iterator = releaseGroups[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n },\n moveToList: function moveToList(list) {\n var _this2 = this;\n\n // Only move items that have been toggled and that are not yet in that list.\n // It's matching them by item.name.\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var group = _step2.value;\n var inList = _this2.allReleaseGroups.find(function (releaseGroup) {\n return releaseGroup.memberOf === list && releaseGroup.name === group.name;\n }) !== undefined;\n\n if (group.toggled && !inList) {\n group.toggled = false;\n group.memberOf = list;\n }\n };\n\n for (var _iterator2 = this.allReleaseGroups[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n /*\n * Check if there is a value in the custom release group input box,\n * and move this to the selected group (whitelist or blacklist)\n */\n\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (this.newGroup && list !== 'releasegroups') {\n this.allReleaseGroups.push({\n id: this.index,\n name: this.newGroup,\n toggled: false,\n memberOf: list\n });\n this.index += 1;\n this.newGroup = '';\n }\n },\n deleteFromList: function deleteFromList(list) {\n this.allReleaseGroups = this.allReleaseGroups.filter(function (x) {\n return x.memberOf !== list || !x.toggled;\n });\n }\n },\n computed: {\n itemsWhitelist: function itemsWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist';\n });\n },\n itemsBlacklist: function itemsBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist';\n });\n },\n itemsReleaseGroups: function itemsReleaseGroups() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'releasegroups';\n });\n },\n showDeleteFromWhitelist: function showDeleteFromWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist' && x.toggled === true;\n }).length !== 0;\n },\n showDeleteFromBlacklist: function showDeleteFromBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist' && x.toggled === true;\n }).length !== 0;\n }\n },\n watch: {\n allReleaseGroups: {\n handler: function handler() {\n this.$emit('change', this.allReleaseGroups);\n },\n deep: true\n },\n allGroups: {\n handler: function handler(newValue) {\n this.createIndexedObjects(newValue, 'releasegroups');\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/anidb-release-group-ui.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), diff --git a/themes/light/assets/js/medusa-runtime.js b/themes/light/assets/js/medusa-runtime.js index 03aea24c08..79c000eb7f 100644 --- a/themes/light/assets/js/medusa-runtime.js +++ b/themes/light/assets/js/medusa-runtime.js @@ -44,7 +44,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _app /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'anidb-release-group-ui',\n props: {\n blacklist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n whitelist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n allGroups: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n index: 0,\n allReleaseGroups: [],\n newGroup: ''\n };\n },\n mounted: function mounted() {\n this.createIndexedObjects(this.blacklist, 'blacklist');\n this.createIndexedObjects(this.whitelist, 'whitelist');\n this.createIndexedObjects(this.allGroups, 'releasegroups');\n },\n methods: {\n toggleItem: function toggleItem(release) {\n this.allReleaseGroups = this.allReleaseGroups.map(function (x) {\n if (x.id === release.id) {\n x.toggled = !x.toggled;\n }\n\n return x;\n });\n },\n createIndexedObjects: function createIndexedObjects(releaseGroups, list) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = releaseGroups[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var release = _step.value;\n\n // Whitelist and blacklist pass an array of strings not objects.\n if (typeof release === 'string') {\n release = {\n name: release\n };\n } // Merge the passed object with some additional information.\n\n\n var itemAsObject = Object.assign({\n id: this.index,\n toggled: false,\n memberOf: list\n }, release);\n this.allReleaseGroups.push(itemAsObject);\n this.index += 1; // Increment the counter for our next item.\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n },\n moveToList: function moveToList(list) {\n var _this = this;\n\n // Only move items that have been toggled and that are not yet in that list.\n // It's matching them by item.name.\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop = function _loop() {\n var group = _step2.value;\n var inList = _this.allReleaseGroups.find(function (releaseGroup) {\n return releaseGroup.memberOf === list && releaseGroup.name === group.name;\n }) !== undefined;\n\n if (group.toggled && !inList) {\n group.toggled = false;\n group.memberOf = list;\n }\n };\n\n for (var _iterator2 = this.allReleaseGroups[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop();\n }\n /*\n * Check if there is a value in the custom release group input box,\n * and move this to the selected group (whitelist or blacklist)\n */\n\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (this.newGroup && list !== 'releasegroups') {\n this.allReleaseGroups.push({\n id: this.index,\n name: this.newGroup,\n toggled: false,\n memberOf: list\n });\n this.index += 1;\n this.newGroup = '';\n }\n },\n deleteFromList: function deleteFromList(list) {\n this.allReleaseGroups = this.allReleaseGroups.filter(function (x) {\n return x.memberOf !== list || !x.toggled;\n });\n }\n },\n computed: {\n itemsWhitelist: function itemsWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist';\n });\n },\n itemsBlacklist: function itemsBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist';\n });\n },\n itemsReleaseGroups: function itemsReleaseGroups() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'releasegroups';\n });\n },\n showDeleteFromWhitelist: function showDeleteFromWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist' && x.toggled === true;\n }).length !== 0;\n },\n showDeleteFromBlacklist: function showDeleteFromBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist' && x.toggled === true;\n }).length !== 0;\n }\n },\n watch: {\n allReleaseGroups: {\n handler: function handler() {\n this.$emit('change', this.allReleaseGroups);\n },\n deep: true\n },\n allGroups: {\n handler: function handler(newValue) {\n this.createIndexedObjects(newValue, 'releasegroups');\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/anidb-release-group-ui.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'anidb-release-group-ui',\n props: {\n blacklist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n whitelist: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n allGroups: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n index: 0,\n allReleaseGroups: [],\n newGroup: ''\n };\n },\n mounted: function mounted() {\n this.createIndexedObjects(this.blacklist, 'blacklist');\n this.createIndexedObjects(this.whitelist, 'whitelist');\n this.createIndexedObjects(this.allGroups, 'releasegroups');\n },\n methods: {\n toggleItem: function toggleItem(release) {\n this.allReleaseGroups = this.allReleaseGroups.map(function (x) {\n if (x.id === release.id) {\n x.toggled = !x.toggled;\n }\n\n return x;\n });\n },\n createIndexedObjects: function createIndexedObjects(releaseGroups, list) {\n var _this = this;\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var release = _step.value;\n\n // Whitelist and blacklist pass an array of strings not objects.\n if (typeof release === 'string') {\n release = {\n name: release\n };\n } // Merge the passed object with some additional information.\n\n\n var itemAsObject = Object.assign({\n id: _this.index,\n toggled: false,\n memberOf: list\n }, release);\n\n if (_this.allReleaseGroups.filter(function (group) {\n return group.name === itemAsObject.name && group.memberOf === list;\n }).length === 0) {\n _this.allReleaseGroups.push(itemAsObject);\n\n _this.index += 1; // Increment the counter for our next item.\n }\n };\n\n for (var _iterator = releaseGroups[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n },\n moveToList: function moveToList(list) {\n var _this2 = this;\n\n // Only move items that have been toggled and that are not yet in that list.\n // It's matching them by item.name.\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var group = _step2.value;\n var inList = _this2.allReleaseGroups.find(function (releaseGroup) {\n return releaseGroup.memberOf === list && releaseGroup.name === group.name;\n }) !== undefined;\n\n if (group.toggled && !inList) {\n group.toggled = false;\n group.memberOf = list;\n }\n };\n\n for (var _iterator2 = this.allReleaseGroups[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n /*\n * Check if there is a value in the custom release group input box,\n * and move this to the selected group (whitelist or blacklist)\n */\n\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (this.newGroup && list !== 'releasegroups') {\n this.allReleaseGroups.push({\n id: this.index,\n name: this.newGroup,\n toggled: false,\n memberOf: list\n });\n this.index += 1;\n this.newGroup = '';\n }\n },\n deleteFromList: function deleteFromList(list) {\n this.allReleaseGroups = this.allReleaseGroups.filter(function (x) {\n return x.memberOf !== list || !x.toggled;\n });\n }\n },\n computed: {\n itemsWhitelist: function itemsWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist';\n });\n },\n itemsBlacklist: function itemsBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist';\n });\n },\n itemsReleaseGroups: function itemsReleaseGroups() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'releasegroups';\n });\n },\n showDeleteFromWhitelist: function showDeleteFromWhitelist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'whitelist' && x.toggled === true;\n }).length !== 0;\n },\n showDeleteFromBlacklist: function showDeleteFromBlacklist() {\n return this.allReleaseGroups.filter(function (x) {\n return x.memberOf === 'blacklist' && x.toggled === true;\n }).length !== 0;\n }\n },\n watch: {\n allReleaseGroups: {\n handler: function handler() {\n this.$emit('change', this.allReleaseGroups);\n },\n deep: true\n },\n allGroups: {\n handler: function handler(newValue) {\n this.createIndexedObjects(newValue, 'releasegroups');\n }\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/anidb-release-group-ui.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }),