bittorrenttorque / btapp

Btapp.js is a backbone library that provides easy access to Torque/BitTorrent/uTorrent clients.
http://documentup.com/bittorrenttorque/btapp
783 stars 73 forks source link

add.torrent() arguments validation error #7

Closed arestov closed 12 years ago

arestov commented 12 years ago
add.torrent({
    url: test_link,
    callback: function(trt){
        var colln = btapp.get('torrent');
        var array = colln.models;
    //  array.length
    //  .models[]
        var torrent = array[array.length - 1];//.models
        setTimeout(function(){
            btapp.get('torrent').each(function(t){
                t.get('file').each(function(file){
                    console.log(file.get('properties').get('name'));
                })
            })
        });
    },
    priority: Btapp.TORRENT.PRIORITY.METADATA_ONLY
});

throw 'arguments do not match any of the function signatures exposed by the client'

because did not match

[nf](string)(string,string)
pwmckenna commented 12 years ago

ah...i need to get a new version of the mac client built...doing that right now. i'll shoot you a tweet when its live

arestov commented 12 years ago

if it must be ok right now - it is still problem on windows :)

arestov commented 12 years ago

maybe order change will solve this problem?

 if(!TorrentClient.prototype.validateArguments.call(this, signatures, args)) {
    throw 'arguments do not match any of the function signatures exposed by the client';
}

this.convertCallbackFunctionArgs(args);

:)


this.convertCallbackFunctionArgs(args);

if(!TorrentClient.prototype.validateArguments.call(this, signatures, args)) {
    throw 'arguments do not match any of the function signatures exposed by the client';
}
arestov commented 12 years ago

on mac and wnidows I have different signuture on mac

"[nf](string)(string,string)(dispatch)"

on windows

"[nf](string)(string,string)"

I must update Torque plugin?