1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 13:16:53 +00:00

(trunk web) remote shouldn't know the internals of transmission

This commit is contained in:
Kevin Glowacz 2009-07-28 04:53:04 +00:00
parent 2220a40e84
commit 1901c44bf0
2 changed files with 13 additions and 8 deletions

View file

@ -113,12 +113,21 @@ Transmission.prototype =
// Get preferences & torrents from the daemon
var tr = this;
this.remote.loadDaemonPrefs( );
this.loadDaemonPrefs( );
this.initalizeAllTorrents();
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() {
if (iPhone) {
this.loadImages(

View file

@ -87,14 +87,10 @@ TransmissionRemote.prototype =
} );
},
loadDaemonPrefs: function() {
loadDaemonPrefs: function( callback ) {
var tr = this._controller;
var o = { method: 'session-get' };
this.sendRequest( o, function(data) {
var o = data.arguments;
Prefs.getClutchPrefs( o );
tr.updatePrefs( o );
} );
this.sendRequest( o, callback );
},
getInitialDataFor: function(torrent_ids, callback) {
@ -224,7 +220,7 @@ TransmissionRemote.prototype =
arguments: args
};
this.sendRequest( o, function() {
remote.loadDaemonPrefs();
remote._controller.loadDaemonPrefs();
} );
}
};