add web url to our bindings and core
This commit is contained in:
parent
b26575e920
commit
8b4d40664e
|
@ -1026,3 +1026,6 @@ class Manager:
|
|||
if speed != -1:
|
||||
speed = speed * 1024
|
||||
return deluge_core.set_per_download_rate_limit(unique_ID, speed)
|
||||
|
||||
def add_url_seed(self, unique_ID, address):
|
||||
return deluge_core.add_url_seed(unique_ID, address)
|
||||
|
|
|
@ -1891,12 +1891,30 @@ static PyObject *torrent_set_max_upload_slots_per_torrent(PyObject *self, PyObje
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
static PyObject *torrent_add_url_seed(PyObject *self, PyObject *args)
|
||||
{
|
||||
python_long unique_ID;
|
||||
std::string address;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "is", &unique_ID, &address))
|
||||
return NULL;
|
||||
long index = get_index_from_unique_ID(unique_ID);
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
torrent_t &t = M_torrents->at(index);
|
||||
t.handle.add_url_seed(address);
|
||||
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
//====================
|
||||
// Python Module data
|
||||
//====================
|
||||
|
||||
static PyMethodDef deluge_core_methods[] =
|
||||
{
|
||||
{"add_url_seed", torrent_pe_settings, METH_VARARGS, "."},
|
||||
{"pe_settings", torrent_pe_settings, METH_VARARGS, "."},
|
||||
{"pre_init", torrent_pre_init, METH_VARARGS, "."},
|
||||
{"init", torrent_init, METH_VARARGS, "."},
|
||||
|
|
Loading…
Reference in New Issue