summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/views/linkgrabber/collectorView.js
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/web/app/scripts/views/linkgrabber/collectorView.js')
-rw-r--r--pyload/web/app/scripts/views/linkgrabber/collectorView.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/pyload/web/app/scripts/views/linkgrabber/collectorView.js b/pyload/web/app/scripts/views/linkgrabber/collectorView.js
index a02023a30..08b426aff 100644
--- a/pyload/web/app/scripts/views/linkgrabber/collectorView.js
+++ b/pyload/web/app/scripts/views/linkgrabber/collectorView.js
@@ -21,7 +21,14 @@ define(['jquery', 'underscore', 'backbone', 'app', './packageView'],
self.collection.add(pack);
}
- // TODO: remove links from all other packages than pack
+ // Remove links from other packages and delete empty ones
+ self.collection.each(function(pack2) {
+ console.log(pack2, links);
+ if (pack2 !== pack)
+ if (pack2.removeLinks(links))
+ self.collection.remove(pack2);
+ });
+
pack.updateLinks(links);
});
}