From 452fdef13634b740af8974ad6ee9891ef02ee8bd Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 4 Jun 2011 21:34:44 +0200 Subject: [PATCH] Only update wanted if it's empty --- couchpotato/static/scripts/page/wanted.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/couchpotato/static/scripts/page/wanted.js b/couchpotato/static/scripts/page/wanted.js index 5cb9f393..eda8a672 100644 --- a/couchpotato/static/scripts/page/wanted.js +++ b/couchpotato/static/scripts/page/wanted.js @@ -8,11 +8,15 @@ Page.Wanted = new Class({ indexAction: function(param){ var self = this; - self.list = new MovieList({ - 'status': 'active', - 'actions': Wanted.Action - }); - $(self.list).inject(self.el); + if(!self.list){ + self.list = new MovieList({ + 'status': 'active', + 'actions': Wanted.Action + }); + $(self.list).inject(self.el); + + App.addEvent('library.update', self.list.update.bind(self.list)) + } } @@ -21,6 +25,7 @@ Page.Wanted = new Class({ var Wanted = { 'Action': { 'IMBD': IMDBAction + //,'releases': ReleaseAction } }