mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
(trunk web) remote shouldn't know the internals of transmission
This commit is contained in:
parent
2220a40e84
commit
1901c44bf0
2 changed files with 13 additions and 8 deletions
|
@ -113,12 +113,21 @@ Transmission.prototype =
|
||||||
|
|
||||||
// Get preferences & torrents from the daemon
|
// Get preferences & torrents from the daemon
|
||||||
var tr = this;
|
var tr = this;
|
||||||
this.remote.loadDaemonPrefs( );
|
this.loadDaemonPrefs( );
|
||||||
this.initalizeAllTorrents();
|
this.initalizeAllTorrents();
|
||||||
|
|
||||||
this.togglePeriodicRefresh( true );
|
this.togglePeriodicRefresh( true );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
loadDaemonPrefs: function(){
|
||||||
|
var tr = this;
|
||||||
|
this.remote.loadDaemonPrefs( function(data){
|
||||||
|
var o = data.arguments;
|
||||||
|
Prefs.getClutchPrefs( o );
|
||||||
|
tr.updatePrefs( o );
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
preloadImages: function() {
|
preloadImages: function() {
|
||||||
if (iPhone) {
|
if (iPhone) {
|
||||||
this.loadImages(
|
this.loadImages(
|
||||||
|
|
|
@ -87,14 +87,10 @@ TransmissionRemote.prototype =
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
loadDaemonPrefs: function() {
|
loadDaemonPrefs: function( callback ) {
|
||||||
var tr = this._controller;
|
var tr = this._controller;
|
||||||
var o = { method: 'session-get' };
|
var o = { method: 'session-get' };
|
||||||
this.sendRequest( o, function(data) {
|
this.sendRequest( o, callback );
|
||||||
var o = data.arguments;
|
|
||||||
Prefs.getClutchPrefs( o );
|
|
||||||
tr.updatePrefs( o );
|
|
||||||
} );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialDataFor: function(torrent_ids, callback) {
|
getInitialDataFor: function(torrent_ids, callback) {
|
||||||
|
@ -224,7 +220,7 @@ TransmissionRemote.prototype =
|
||||||
arguments: args
|
arguments: args
|
||||||
};
|
};
|
||||||
this.sendRequest( o, function() {
|
this.sendRequest( o, function() {
|
||||||
remote.loadDaemonPrefs();
|
remote._controller.loadDaemonPrefs();
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue