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

just empty line in callback argument of add.torrent({callback: function(ReadToUseTorrent){}} instead of torrent model #6

Closed arestov closed 9 years ago

arestov commented 12 years ago
add.torrent({
    url: test_link,
    callback: function(trt){
        trt === '' //:(((
    }
})

expect torrent model in "trt".

How I can get exactly torrent I've added?

pwmckenna commented 12 years ago

ah yes...i need to improve that field. the most basic thing that I'll try to do asap is make it return an object {hash:XXXXXXX....} so that the hash can be used to lookup the model on the javascript side.

down the line it would be nice if the underlying client returned information indicating to btapp.js that it should fill in that value with an existing backbone model. that would be really nice for add/create calls.

i'll treat the empty return value as a bug, and try to make sure at least there is useful information in the return value.