From 61f3e0f15c12ed02fc2258930280ad29a1e67758 Mon Sep 17 00:00:00 2001 From: Martii Date: Tue, 5 Feb 2019 07:22:38 -0700 Subject: [PATCH] Fix scripts with incorrect counts and only one NOTE: * Don't fully understand sizzle logic here with rating but this fixes `Size` and keeps the `Rating` at last known value until another script is added. `bongacams` has only `1` but never gets updated from `2`. Presume there is more. will have to go through them all again. Applies to #93 --- libs/modelParser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/modelParser.js b/libs/modelParser.js index 61bffc6e4..f312f2528 100644 --- a/libs/modelParser.js +++ b/libs/modelParser.js @@ -575,6 +575,10 @@ var parseGroup = function (aGroup) { group.rating = getRating(aScripts); } + if (aScripts && aScripts.length === 1) { + group.size = aScripts.length; + } + if (aScripts && aScripts.length === 0) { group.remove(function (aErr, aGroup) { if (aErr) {