summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/models
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 18:45:13 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 18:45:13 +0100
commit453c1e55c71a96c9529ecdca1d55278cc41088d6 (patch)
tree7a516a84e5590ce5f1f3def71c24bcb14f209023 /pyload/web/app/scripts/models
parentsmall fixes and improvements for download engine (diff)
downloadpyload-453c1e55c71a96c9529ecdca1d55278cc41088d6.tar.xz
rewritten download scheduling, improved account manager, db version increased all data will be overwritten
Diffstat (limited to 'pyload/web/app/scripts/models')
-rw-r--r--pyload/web/app/scripts/models/Account.js8
-rw-r--r--pyload/web/app/scripts/models/StatusInfo.js (renamed from pyload/web/app/scripts/models/ServerStatus.js)5
2 files changed, 8 insertions, 5 deletions
diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js
index 26241d8e3..b9fc40036 100644
--- a/pyload/web/app/scripts/models/Account.js
+++ b/pyload/web/app/scripts/models/Account.js
@@ -3,9 +3,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
return Backbone.Model.extend({
- idAttribute: 'loginname',
+ idAttribute: 'aid',
defaults: {
+ aid: null,
plugin: null,
loginname: null,
owner: -1,
@@ -53,14 +54,15 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
var refresh = _.has(options, 'refresh') && options.refresh;
options = App.apiRequest('getAccountInfo',
{plugin: this.get('plugin'),
- loginname: this.get('loginname'), refresh: refresh}, options);
+ aid: this.get('aid'), refresh: refresh}, options);
return Backbone.Model.prototype.fetch.call(this, options);
},
setPassword: function(password, options) {
options = App.apiRequest('updateAccount',
- {plugin: this.get('plugin'), loginname: this.get('loginname'), password: password}, options);
+ {aid: this.get('aid'),
+ plugin: this.get('plugin'), loginname: this.get('loginname'), password: password}, options);
return $.ajax(options);
},
diff --git a/pyload/web/app/scripts/models/ServerStatus.js b/pyload/web/app/scripts/models/StatusInfo.js
index 59739b41e..8712defa7 100644
--- a/pyload/web/app/scripts/models/ServerStatus.js
+++ b/pyload/web/app/scripts/models/StatusInfo.js
@@ -13,7 +13,8 @@ define(['jquery', 'backbone', 'underscore'],
notifications: -1,
paused: false,
download: false,
- reconnect: false
+ reconnect: false,
+ quota: -1
},
// Model Constructor
@@ -23,7 +24,7 @@ define(['jquery', 'backbone', 'underscore'],
fetch: function(options) {
options || (options = {});
- options.url = 'api/getServerStatus';
+ options.url = 'api/getStatusInfo';
return Backbone.Model.prototype.fetch.call(this, options);
},