Changeset 2322
- Timestamp:
- 11/26/07 02:20:40 (14 months ago)
- Files:
-
- 2 modified
-
tags/deluge-0.5.6.96/src/deluge_core.cpp (modified) (2 diffs)
-
trunk/src/deluge_core.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/deluge-0.5.6.96/src/deluge_core.cpp
r2321 r2322 253 253 storage_mode = storage_mode_sparse; 254 254 } 255 torrent_handle h = M_ses->add_torrent(t, save_path, resume_data, storage_mode); 256 // h.set_max_connections(60); // at some point we should use this 257 h.set_max_uploads(-1); 258 h.set_ratio(preferred_ratio); 259 h.resolve_countries(true); 260 new_torrent.handle = h; 261 262 new_torrent.unique_ID = M_unique_counter; 263 M_unique_counter++; 264 265 M_torrents->push_back(new_torrent); 266 267 return (new_torrent.unique_ID); 255 try{ 256 torrent_handle h = M_ses->add_torrent(t, save_path, resume_data, storage_mode); 257 // h.set_max_connections(60); // at some point we should use this 258 h.set_max_uploads(-1); 259 h.set_ratio(preferred_ratio); 260 h.resolve_countries(true); 261 new_torrent.handle = h; 262 new_torrent.unique_ID = M_unique_counter; 263 M_unique_counter++; 264 M_torrents->push_back(new_torrent); 265 return (new_torrent.unique_ID); 266 } 267 catch (invalid_encoding&) 268 { 269 printf("invalid encoding...bad torrent\n"); 270 } 271 catch (invalid_handle&) 272 { 273 printf("invalid handle. something bad happened in libtorrent\n"); 274 } 275 catch (...) {} 268 276 } 269 277 … … 1810 1818 } 1811 1819 } 1820 catch (invalid_handle&) 1821 { 1822 printf("invalid handle. something bad happened in libtorrent\n"); 1823 } 1812 1824 catch (...) {} 1813 1825 Py_INCREF(Py_None); return Py_None; -
trunk/src/deluge_core.cpp
r2321 r2322 253 253 storage_mode = storage_mode_sparse; 254 254 } 255 torrent_handle h = M_ses->add_torrent(t, save_path, resume_data, storage_mode); 256 // h.set_max_connections(60); // at some point we should use this 257 h.set_max_uploads(-1); 258 h.set_ratio(preferred_ratio); 259 h.resolve_countries(true); 260 new_torrent.handle = h; 261 262 new_torrent.unique_ID = M_unique_counter; 263 M_unique_counter++; 264 265 M_torrents->push_back(new_torrent); 266 267 return (new_torrent.unique_ID); 255 try{ 256 torrent_handle h = M_ses->add_torrent(t, save_path, resume_data, storage_mode); 257 // h.set_max_connections(60); // at some point we should use this 258 h.set_max_uploads(-1); 259 h.set_ratio(preferred_ratio); 260 h.resolve_countries(true); 261 new_torrent.handle = h; 262 new_torrent.unique_ID = M_unique_counter; 263 M_unique_counter++; 264 M_torrents->push_back(new_torrent); 265 return (new_torrent.unique_ID); 266 } 267 catch (invalid_encoding&) 268 { 269 printf("invalid encoding...bad torrent\n"); 270 } 271 catch (invalid_handle&) 272 { 273 printf("invalid handle. something bad happened in libtorrent\n"); 274 } 275 catch (...) {} 268 276 } 269 277 … … 1810 1818 } 1811 1819 } 1820 catch (invalid_handle&) 1821 { 1822 printf("invalid handle. something bad happened in libtorrent\n"); 1823 } 1812 1824 catch (...) {} 1813 1825 Py_INCREF(Py_None); return Py_None;
