Version 4 (modified by Cas, 9 years ago) (diff)

dht state removal complete

This is page is to collate the work that is required to bring the next Deluge version up to date with libtorrent

Deluge 1.4.0 milestone and libtorrent 0.16

Tickets requests for new/missing libtorrent features

Handle/Status?

  • #1903 super_seeding (handle/status)
  • #607 completed_time (handle)
  • #2281 total_wanted_done (handle)
  • #1294 seed_mode (add_torrent) flag_seed_mode (status)
  • #1165 add_url_seed, remove_url_seed (handle)

Session

  • #2122 listen_on_flags: listen_reuse_address and listen_no_system_port
  • #2219 set_i2p_proxy() i2p_proxy()

Session_settings

These should be covered by the WiP by gazpachoking to query lt for all available settings.

  • #2195 ssl_listen
  • #1466 send_buffer_watermark, send_buffer_watermark_factor
  • #1903 strict_super_seeding
  • #1384 announce_ip
  • #2257 active_dht_limit, active_tracker_limit and active_lsd_limit
  • #2059 tracker_backoff
  • #1677 apply_ip_filter_to_trackers (for blocklist)

Alerts

  • #1466 performance alert: send_buffer_watermark_too_low
  • #637 storage_moved_alert
  • #2006 storage_moved_failed_alert
  • external_ip_alert

Other potential changes

  • #367 Do not store per-torrent settings that are saved in the resume data
    Could be extended to included deluge torrent settings in resume data removing need for torrents.state
  • Replace add_torrent with the more efficient non-blocking async_add_torrent.
  • lt docs suggestion: If possible, lazy_bdecode() should be preferred over bdecode().

Deprecated Functions

The list was generated from the lt bindings src files.

To test use libtorrent build with TORRENT_NO_DEPRECATE config.

magnet_uri.cpp

torrentmanager.py - session.add_torrent() now supports magnet uris

    def("add_magnet_uri", &_add_magnet_uri);

session.cpp

torrrentmanger.py - verify no change needed, using params already

    torrent_handle add_torrent_depr(session& s, torrent_info const& ti
        , std::string const& save, entry const& resume
        , storage_mode_t storage_mode, bool paused) {
        allow_threading_guard guard;
        return s.add_torrent(ti, save, resume, storage_mode, paused, default_storage_constructor);}

torrrentmanger.py - all params -> add_torrent_params_flags_t

        std::string url;
        if (params.has_key("tracker_url"))
            p.trackers.push_back(extract<std::string>(params["tracker_url"]));
        if (params.has_key("seed_mode"))
            p.seed_mode = params["seed_mode"];
        if (params.has_key("upload_mode"))
            p.upload_mode = params["upload_mode"];
        if (params.has_key("share_mode"))
            p.upload_mode = params["share_mode"];
        if (params.has_key("override_resume_data"))
            p.override_resume_data = params["override_resume_data"];
        if (params.has_key("apply_ip_filter"))
            p.apply_ip_filter = params["apply_ip_filter"];
        if (params.has_key("paused"))
            p.paused = params["paused"];
        if (params.has_key("auto_managed"))
            p.auto_managed = params["auto_managed"];
        if (params.has_key("duplicate_is_error"))
            p.duplicate_is_error = params["duplicate_is_error"];
        if (params.has_key("merge_resume_trackers"))
            p.merge_resume_trackers = params["merge_resume_trackers"];

In progress: #1923

        .value("storage_mode_compact", storage_mode_compact)

torrrentmanger.py - verify no change needed as using params already

        .def( "add_torrent", &add_torrent_depr , (
                arg("resume_data") = entry(),
                arg("storage_mode") = storage_mode_sparse,
                arg("paused") = false          ))

oldstateupgrader.py - *_rate_limit -> session_settings().*_rate_limit

        .def("download_rate_limit", allow_threads(&session::download_rate_limit))    
        .def("upload_rate_limit", allow_threads(&session::upload_rate_limit))

preferencesmanager.py - * -> session.set_settings() for these entries, some have been renamed

        .def("set_local_download_rate_limit", allow_threads(&session::set_local_download_rate_limit))
        .def("set_local_upload_rate_limit", allow_threads(&session::set_local_upload_rate_limit))
        .def("set_download_rate_limit", allow_threads(&session::set_download_rate_limit))
        .def("set_upload_rate_limit", allow_threads(&session::set_upload_rate_limit))
        .def("set_max_uploads", allow_threads(&session::set_max_uploads))
        .def("set_max_connections", allow_threads(&session::set_max_connections))
        .def("set_max_half_open_connections", allow_threads(&session::set_max_half_open_connections))

core.py - session.num_connections() -> session_status.num_peers

        .def("num_connections", allow_threads(&session::num_connections))

core.py, preferencesmanager.py - verify if needs change, see &session_set_settings in session.cpp

        .def("set_settings", &session::set_settings)

core.py, preferencesmanager.py - For the python bindings use session.get_settings()

        .def("settings", &session::settings)

core.py - change lt.bdecode in load_state to lt.lazy_bdecode to use new load_state which expects lazy_entry (lazy_bdecode missing from bindings)

        .def("load_state", load_state1)

preferencesmanager.py (set_%s_proxy -> set_proxy) # Same proxy used for all connections now

        .def("set_peer_proxy", allow_threads(&session::set_peer_proxy))
        .def("set_tracker_proxy", allow_threads(&session::set_tracker_proxy))
        .def("set_web_seed_proxy", allow_threads(&session::set_web_seed_proxy))

torrent_handle.cpp

torrent.py - handle().* -> handle.status().*)

        .def("is_seed", _(&torrent_handle::is_seed))
        .def("is_finished", _(&torrent_handle::is_finished))
        .def("is_paused", _(&torrent_handle::is_paused))
        .def("is_auto_managed", _(&torrent_handle::is_auto_managed))
        .def("has_metadata", _(&torrent_handle::has_metadata))

torrent_info.cpp

oldstateupgrader.py, torrentmanager.py - This probably shouldn't be deprecated

        .def("info_hash", &torrent_info::info_hash, copy)