Package Tribler :: Package Core :: Module SessionConfig :: Class SessionConfigInterface

Class SessionConfigInterface

Known Subclasses:

(key,value) pair config of global parameters, e.g. PermID keypair, listen port, max upload speed, etc. Use SessionStartupConfig from creating and manipulation configurations before session startup time. This is just a parent class.
Instance Methods
 
__init__(self, sessconfig=None)
Constructor.
 
set_state_dir(self, statedir)
Set the directory to store the Session's state in.
 
get_state_dir(self)
Returns the directory the Session stores its state in.
 
set_install_dir(self, installdir)
Set the directory in which the Tribler Core software is installed.
 
get_install_dir(self)
Returns the directory the Tribler Core software is installed in.
 
set_permid_keypair_filename(self, keypairfilename)
Set the filename containing the Elliptic Curve keypair to use for PermID-based authentication in this Session.
 
get_permid_keypair_filename(self)
Returns the filename of the Session's keypair.
 
set_listen_port(self, port)
Set the UDP and TCP listen port for this Session.
 
get_listen_port(self)
Returns the current UDP/TCP listen port.
 
set_ip_for_tracker(self, value)
IP address to report to the tracker (default = set automatically).
 
get_ip_for_tracker(self)
Returns the IP address being reported to the tracker.
 
set_bind_to_addresses(self, value)
Set the list of IP addresses/hostnames to bind to locally.
 
get_bind_to_addresses(self)
Returns the list of IP addresses bound to.
 
set_upnp_mode(self, value)
Use to autoconfigure a UPnP router to forward the UDP/TCP listen port to this host:
 * UPNPMODE_DISABLED: Autoconfigure turned off.
 
get_upnp_mode(self)
Returns the UPnP mode set.
 
set_autoclose_timeout(self, value)
Time to wait between closing sockets which nothing has been received on.
 
get_autoclose_timeout(self)
Returns the autoclose timeout.
 
set_autoclose_check_interval(self, value)
Time to wait between checking if any connections have timed out.
 
get_autoclose_check_interval(self)
Returns the autoclose check interval.
 
set_megacache(self, value)
Enable megacache databases to cache peers, torrent files and preferences (default = True).
 
get_megacache(self)
Returns whether Megacache is enabled.
 
set_overlay(self, value)
Enable overlay swarm to enable Tribler's special features (default = True).
 
get_overlay(self)
Returns whether overlay-swarm extension is enabled.
 
set_overlay_max_message_length(self, value)
Maximal message length for messages sent over the secure overlay.
 
get_overlay_max_message_length(self)
Returns the maximum overlay-message length.
 
set_buddycast(self, value)
Enable buddycast recommendation system at startup (default = True)
 
get_buddycast(self)
Returns whether buddycast is enabled at startup.
 
set_start_recommender(self, value)
Buddycast can be temporarily disabled via this parameter (default = True).
 
get_start_recommender(self)
Returns whether Buddycast is temporarily enabled.
 
set_buddycast_interval(self, value)
Number of seconds to pause between exchanging preference with a peer in Buddycast.
 
get_buddycast_interval(self)
Returns the number of seconds between Buddycast pref.
 
set_buddycast_collecting_solution(self, value)
Set the Buddycast collecting solution.
 
get_buddycast_collecting_solution(self)
Returns the Buddycast collecting solution.
 
set_buddycast_max_peers(self, value)
Set max number of peers to use for Buddycast recommendations
 
get_buddycast_max_peers(self)
Return the max number of peers to use for Buddycast recommendations.
 
set_download_help(self, value)
Enable download helping/cooperative download (default = True).
 
get_download_help(self)
Returns whether download help is enabled.
 
set_download_help_dir(self, value)
Set the directory for storing state and content for download helping (default = Default destination dir (see get_default_dest_dir() +'downloadhelp'.
 
get_download_help_dir(self)
Returns the directory for download helping storage.
 
set_torrent_collecting(self, value)
Automatically collect torrents from peers in the network (default = True).
 
get_torrent_collecting(self)
Returns whether to automatically collect torrents.
 
set_torrent_collecting_max_torrents(self, value)
Set the maximum number of torrents to collect from other peers.
 
get_torrent_collecting_max_torrents(self)
Returns the maximum number of torrents to collect.
 
set_torrent_collecting_dir(self, value)
Where to place collected torrents? (default is state_dir + 'collected_torrent_files')
 
get_torrent_collecting_dir(self)
Returns the directory to save collected torrents.
 
set_torrent_collecting_rate(self, value)
Maximum download rate to use for torrent collecting.
 
get_torrent_collecting_rate(self)
Returns the download rate to use for torrent collecting.
 
set_torrent_checking(self, value)
Whether to automatically check the health of collected torrents by contacting their trackers (default = True).
 
get_torrent_checking(self)
Returns whether to check health of collected torrents.
 
set_torrent_checking_period(self, value)
Interval between automatic torrent health checks.
 
get_torrent_checking_period(self)
Returns the check interval.
 
set_stop_collecting_threshold(self, value)
Stop collecting more torrents if the disk has less than this limit
 
get_stop_collecting_threshold(self)
Returns the disk-space limit when to stop collecting torrents.
 
set_dialback(self, value)
Use other peers to determine external IP address (default = True)
 
get_dialback(self)
Returns whether to use the dialback mechanism.
 
set_social_networking(self, value)
Enable social networking.
 
get_social_networking(self)
Returns whether social network is enabled.
 
set_nickname(self, value)
The nickname you want to show to others.
 
get_nickname(self)
Returns the set nickname.
 
set_mugshot(self, value, mime='image/jpeg')
The picture of yourself you want to show to others.
 
get_mugshot(self)
Returns binary image data and mime-type of your picture.
 
set_peer_icon_path(self, value)
Directory to store received peer icons (Default is statedir + STATEDIR_PEERICON_DIR).
 
get_peer_icon_path(self)
Returns the directory to store peer icons.
 
set_remote_query(self, value)
Enable queries from other peers.
 
get_remote_query(self)
Returns whether remote query is enabled.
 
set_bartercast(self, value)
Exchange upload/download statistics with peers (default = True)
 
get_bartercast(self)
Returns to exchange statistics with peers.
 
set_video_analyser_path(self, value)
Path to video analyser FFMPEG.
 
get_video_analyser_path(self)
Returns the path of the FFMPEG video analyser.
 
set_internal_tracker(self, value)
Enable internal tracker (default = True)
 
get_internal_tracker(self)
Returns whether the internal tracker is enabled.
 
set_internal_tracker_url(self, value)
Set the internal tracker URL (default = determined dynamically...
 
get_internal_tracker_url(self)
Returns the URL of the tracker as set by set_internal_tracker_url().
 
set_mainline_dht(self, value)
Enable mainline DHT support (default = True)
 
get_mainline_dht(self)
Returns whether mainline DHT support is enabled.
 
set_tracker_allowed_dir(self, value)
Only accept tracking requests for torrent in this dir (default is...
 
get_tracker_allowed_dir(self)
Returns the internal tracker's directory of allowed torrents.
 
set_tracker_allowed_list(self, value)
Only allow peers to register for torrents that appear in the specified file.
 
get_tracker_allowed_list(self)
Returns the filename of the list of allowed torrents.
 
set_tracker_allowed_controls(self, value)
Allow special keys in torrents in the allowed_dir to affect tracker access.
 
get_tracker_allowed_controls(self)
Returns whether to allow allowed torrents to control tracker access.
 
set_tracker_allowed_ips(self, value)
Only allow connections from IPs specified in the given file; file contains subnet data in the format: aa.bb.cc.dd/len.
 
get_tracker_allowed_ips(self)
Returns the filename containing allowed IP addresses.
 
set_tracker_banned_ips(self, value)
Don't allow connections from IPs specified in the given file; file...
 
get_tracker_banned_ips(self)
Returns the filename containing banned IP addresses.
 
set_tracker_only_local_override_ip(self, value)
Ignore the 'ip' parameter in the GET announce from machines which aren't on local network IPs.
 
get_tracker_only_local_override_ip(self)
Returns the ignore policy for 'ip' parameters in announces.
 
set_tracker_parse_dir_interval(self, value)
Seconds between reloading of allowed_dir or allowed_file and allowed_ips and banned_ips lists.
 
get_tracker_parse_dir_interval(self)
Returns the number of seconds between refreshes of access control info.
 
set_tracker_scrape_allowed(self, value)
Allow scrape access on the internal tracker (with a scrape request a BitTorrent client can retrieve information about how many peers are downloading the content.
 
get_tracker_scrape_allowed(self)
Returns the scrape access policy.
 
set_tracker_allow_get(self, value)
Setting this parameter adds a /file?hash={hash} links to the overview page that the internal tracker makes available via HTTP at hostname:listenport.
 
get_tracker_allow_get(self)
Returns whether to allow HTTP torrent-file downloads from the internal tracker.
 
set_tracker_favicon(self, value)
File containing image/x-icon data to return when browser requests favicon.ico from the internal tracker.
 
get_tracker_favicon(self)
Returns the filename of the internal tracker favicon.
 
set_tracker_show_infopage(self, value)
Whether to display an info page when the tracker's root dir is requested via HTTP.
 
get_tracker_show_infopage(self)
Returns whether to show an info page on the internal tracker.
 
set_tracker_infopage_redirect(self, value)
A URL to redirect the request for an info page to.
 
get_tracker_infopage_redirect(self)
Returns the URL to redirect request for info pages to.
 
set_tracker_show_names(self, value)
Whether to display names from the 'allowed dir'.
 
get_tracker_show_names(self)
Returns whether the tracker displays names from the 'allowed dir'.
 
set_tracker_keep_dead(self, value)
Keep dead torrents after they expire (so they still show up on your...
 
get_tracker_keep_dead(self)
Returns whether to keep dead torrents for statistics.
 
set_tracker_reannounce_interval(self, value)
Seconds downloaders should wait between reannouncing themselves to the internal tracker.
 
get_tracker_reannounce_interval(self)
Returns the reannounce interval for the internal tracker.
 
set_tracker_response_size(self, value)
Number of peers to send to a peer in a reply to its announce...
 
get_tracker_response_size(self)
Returns the number of peers to send in a tracker reply.
 
set_tracker_nat_check(self, value)
How many times the internal tracker should attempt to check if a downloader is behind a Network Address Translator (NAT) or firewall.
 
get_tracker_nat_check(self)
Returns the number of times to check for a firewall.
 
set_tracker_dfile(self, value)
File to store recent downloader info in (default = Session state ...
 
get_tracker_dfile(self)
Returns the tracker database file.
 
set_tracker_dfile_format(self, value)
Format of the tracker database file.
 
get_tracker_dfile_format(self)
Returns the format of the tracker database file.
 
set_tracker_save_dfile_interval(self, value)
The interval between saving the internal tracker's state to the tracker database (see set_tracker_dfile()).
 
get_tracker_save_dfile_interval(self)
Returns the tracker-database save interval.
 
set_tracker_logfile(self, value)
File to write the tracker logs to (default is NIL: or /dev/null).
 
get_tracker_logfile(self)
Returns the device name to write log messages to.
 
set_tracker_min_time_between_log_flushes(self, value)
Minimum time between flushes of the tracker log.
 
get_tracker_min_time_between_log_flushes(self)
Returns time between tracker log flushes.
 
set_tracker_log_nat_checks(self, value)
Whether to add entries to the tracker log for NAT-check results.
 
get_tracker_log_nat_checks(self)
Returns whether to log NAT-check attempts to the tracker log.
 
set_tracker_hupmonitor(self, value)
Whether to reopen the tracker log file upon receipt of a SIGHUP signal (Mac/UNIX only).
 
get_tracker_hupmonitor(self)
Returns whether to reopen the tracker log file upon receipt of a SIGHUP signal.
 
set_tracker_socket_timeout(self, value)
Set timeout for closing connections to trackers.
 
get_tracker_socket_timeout(self)
Returns the tracker socket timeout.
 
set_tracker_timeout_downloaders_interval(self, value)
Interval between checks for expired downloaders, i.e., peers no longer in the swarm because they did not reannounce themselves.
 
get_tracker_timeout_downloaders_interval(self)
Returns the number of seconds between checks for expired peers.
 
set_tracker_timeout_check_interval(self, value)
Time to wait between checking if any connections to the internal tracker have timed out.
 
get_tracker_timeout_check_interval(self)
Returns timeout for connections to the internal tracker.
 
set_tracker_min_time_between_cache_refreshes(self, value)
Minimum time before a cache is considered stale and is flushed.
 
get_tracker_min_time_between_cache_refreshes(self)
Return the minimum time between cache refreshes.
 
set_tracker_multitracker_enabled(self, value)
Whether to enable multitracker operation in which multiple trackers are used to register the peers for a specific torrent.
 
get_tracker_multitracker_enabled(self)
Returns whether multitracking is enabled.
 
set_tracker_multitracker_allowed(self, value)
Whether to allow incoming tracker announces.
 
get_tracker_multitracker_allowed(self)
Returns the multitracker allow policy of the internal tracker.
 
set_tracker_multitracker_reannounce_interval(self, value)
Seconds between outgoing tracker announces to the other trackers in a multi-tracker setup.
 
get_tracker_multitracker_reannounce_interval(self)
Returns the multitracker reannouce interval.
 
set_tracker_multitracker_maxpeers(self, value)
Number of peers to retrieve from the other trackers in a tracker announce in a multi-tracker setup.
 
get_tracker_multitracker_maxpeers(self)
Returns the number of peers to retrieve from another tracker.
 
set_tracker_aggregate_forward(self, value)
Set an URL to which, if set, all non-multitracker requests are forwarded, with a password added (optional).
 
get_tracker_aggregate_forward(self)
Returns the aggregate forward URL and optional password as a 2-item list.
 
set_tracker_aggregator(self, value)
Whether to act as a data aggregator rather than a tracker.
 
get_tracker_aggregator(self)
Returns the tracker aggregator parameter.
 
set_tracker_multitracker_http_timeout(self, value)
Time to wait before assuming that an HTTP connection to another tracker in a multi-tracker setup has timed out.
 
get_tracker_multitracker_http_timeout(self)
Returns timeout for inter-multi-tracker HTTP connections.
 
set_superpeer(self, value)
Run Session in super peer mode (default = disabled).
 
get_superpeer(self)
Returns whether the Session runs in superpeer mode.
 
set_superpeer_file(self, value)
File with addresses of superpeers (default = install_dir+ Tribler/Core/superpeer.txt).
 
get_superpeer_file(self)
Returns the superpeer file.
 
set_overlay_log(self, value)
File to log message to in super peer mode (default = No logging)
 
get_overlay_log(self)
Returns the file to log messages to or None.
 
set_coopdlconfig(self, dscfg)
Sets the DownloadStartupConfig with which to start Downloads when you are asked to help in a cooperative download.
 
get_coopdlconfig(self)
Return the DownloadStartupConfig that is used when helping others in a cooperative download.
 
set_nat_detect(self, value)
Whether to try to detect the type of Network Address Translator in place.
 
set_puncturing_private_port(self, puncturing_private_port)
The listening port of the puncturing client.
 
set_stun_servers(self, stun_servers)
The addresses of the STUN servers (at least 2)
 
set_pingback_servers(self, pingback_servers)
The addresses of the pingback servers (at least 1)
 
set_puncturing_coordinators(self, puncturing_coordinators)
The address of the puncturing coordinators (at least 1)
 
get_nat_detect(self)
Whether to try to detect the type of Network Address Translator in place.
 
get_puncturing_private_port(self)
Returns the listening port of the puncturing client.
 
get_stun_servers(self)
Returns the addresses of the STUN servers.
 
get_pingback_servers(self)
Returns the addresses of the pingback servers.
 
get_puncturing_coordinators(self)
Returns the address of the puncturing coordinators.
 
set_crawler(self, value)
Handle crawler messages when received (default = True)
 
get_crawler(self)
Whether crawler messages are processed
Method Details

__init__(self, sessconfig=None)
(Constructor)

 
Constructor.
Parameters:
  • sessconfig - Optional dictionary used internally to make this a copy constructor.

set_state_dir(self, statedir)

 
Set the directory to store the Session's state in.
Parameters:
  • statedir - A preferably absolute path name. If the directory does not yet exist it will be created at Session create time.

get_state_dir(self)

 
Returns the directory the Session stores its state in.
Returns:
An absolute path name.

set_install_dir(self, installdir)

 
Set the directory in which the Tribler Core software is installed.
Parameters:
  • installdir - An absolute path name

get_install_dir(self)

 
Returns the directory the Tribler Core software is installed in.
Returns:
An absolute path name.

set_permid_keypair_filename(self, keypairfilename)

 
Set the filename containing the Elliptic Curve keypair to use for PermID-based authentication in this Session. Note: if a Session is started with a SessionStartupConfig that points to an existing state dir and that state dir contains a saved keypair, that keypair will be used unless a different keypair is explicitly configured via this method.

get_permid_keypair_filename(self)

 
Returns the filename of the Session's keypair.
Returns:
An absolute path name.

set_listen_port(self, port)

 
Set the UDP and TCP listen port for this Session.
Parameters:
  • port - A port number.

get_listen_port(self)

 
Returns the current UDP/TCP listen port.
Returns:
Port number.

set_ip_for_tracker(self, value)

 
IP address to report to the tracker (default = set automatically).
Parameters:
  • value - An IP address as string.

get_ip_for_tracker(self)

 
Returns the IP address being reported to the tracker.
Returns:
String

set_bind_to_addresses(self, value)

 
Set the list of IP addresses/hostnames to bind to locally.
Parameters:
  • value - A list of IP addresses as strings.

get_bind_to_addresses(self)

 
Returns the list of IP addresses bound to.
Returns:
list

set_upnp_mode(self, value)

 
Use to autoconfigure a UPnP router to forward the UDP/TCP listen port to this host:
 * UPNPMODE_DISABLED: Autoconfigure turned off.
 * UPNPMODE_WIN32_HNetCfg_NATUPnP: Use Windows COM interface (slow)
 * UPNPMODE_WIN32_UPnP_UPnPDeviceFinder: Use Windows COM interface (faster)
 * UPNPMODE_UNIVERSAL_DIRECT: Talk UPnP directly to the network (best)
Parameters:
  • value - UPNPMODE_*

get_upnp_mode(self)

 
Returns the UPnP mode set.
Returns:
UPNPMODE_*

set_autoclose_timeout(self, value)

 
Time to wait between closing sockets which nothing has been received on.
Parameters:
  • value - A number of seconds.

get_autoclose_timeout(self)

 
Returns the autoclose timeout.
Returns:
A number of seconds.

set_autoclose_check_interval(self, value)

 
Time to wait between checking if any connections have timed out.
Parameters:
  • value - A number of seconds.

get_autoclose_check_interval(self)

 
Returns the autoclose check interval.
Returns:
A number of seconds.

set_megacache(self, value)

 
Enable megacache databases to cache peers, torrent files and preferences (default = True).
Parameters:
  • value - Boolean.

get_megacache(self)

 
Returns whether Megacache is enabled.
Returns:
Boolean.

set_overlay(self, value)

 
Enable overlay swarm to enable Tribler's special features (default = True).
Parameters:
  • value - Boolean.

get_overlay(self)

 
Returns whether overlay-swarm extension is enabled. The overlay swarm allows strong authentication of peers and is used for all Tribler-specific messages.
Returns:
Boolean.

set_overlay_max_message_length(self, value)

 
Maximal message length for messages sent over the secure overlay.
Parameters:
  • value - A number of bytes.

get_overlay_max_message_length(self)

 
Returns the maximum overlay-message length.
Returns:
A number of bytes.

set_buddycast(self, value)

 
Enable buddycast recommendation system at startup (default = True)
Parameters:
  • value - Boolean.

get_buddycast(self)

 
Returns whether buddycast is enabled at startup.
Returns:
Boolean.

set_start_recommender(self, value)

 
Buddycast can be temporarily disabled via this parameter (default = True). Must have been enabled at startup, see set_buddycast().
Parameters:
  • value - Boolean.

get_start_recommender(self)

 
Returns whether Buddycast is temporarily enabled.
Returns:
Boolean.

set_buddycast_interval(self, value)

 
Number of seconds to pause between exchanging preference with a peer in Buddycast.
Parameters:
  • value - A number of seconds.

get_buddycast_interval(self)

 
Returns the number of seconds between Buddycast pref. exchanges.
Returns:
A number of seconds.

set_buddycast_collecting_solution(self, value)

 
Set the Buddycast collecting solution. Only one policy implemented at the moment:
 * BCCOLPOLICY_SIMPLE: Simplest solution: per torrent/buddycasted peer/4 hours,
 
Parameters:
  • value - BCCOLPOLICY_*

get_buddycast_collecting_solution(self)

 
Returns the Buddycast collecting solution.
Returns:
BCOLPOLICY_*

get_buddycast_max_peers(self)

 
Return the max number of peers to use for Buddycast recommendations.
Returns:
A number of peers.

set_download_help(self, value)

 
Enable download helping/cooperative download (default = True).
Parameters:
  • value - Boolean.

get_download_help(self)

 
Returns whether download help is enabled.
Returns:
Boolean.

set_download_help_dir(self, value)

 
Set the directory for storing state and content for download helping (default = Default destination dir (see get_default_dest_dir() +'downloadhelp'.
Parameters:
  • value - An absolute path.

get_download_help_dir(self)

 
Returns the directory for download helping storage.
Returns:
An absolute path name.

set_torrent_collecting(self, value)

 
Automatically collect torrents from peers in the network (default = True).
Parameters:
  • value - Boolean.

get_torrent_collecting(self)

 
Returns whether to automatically collect torrents.
Returns:
Boolean.

set_torrent_collecting_max_torrents(self, value)

 
Set the maximum number of torrents to collect from other peers.
Parameters:
  • value - A number of torrents.

get_torrent_collecting_max_torrents(self)

 
Returns the maximum number of torrents to collect.
Returns:
A number of torrents.

set_torrent_collecting_dir(self, value)

 
Where to place collected torrents? (default is state_dir + 'collected_torrent_files')
Parameters:
  • value - An absolute path.

get_torrent_collecting_dir(self)

 
Returns the directory to save collected torrents.
Returns:
An absolute path name.

set_torrent_collecting_rate(self, value)

 
Maximum download rate to use for torrent collecting.
Parameters:
  • value - A rate in KB/s.

get_torrent_collecting_rate(self)

 
Returns the download rate to use for torrent collecting.
Returns:
A rate in KB/s.

set_torrent_checking(self, value)

 
Whether to automatically check the health of collected torrents by contacting their trackers (default = True).
Parameters:
  • value - Boolean

get_torrent_checking(self)

 
Returns whether to check health of collected torrents.
Returns:
Boolean.

set_torrent_checking_period(self, value)

 
Interval between automatic torrent health checks.
Parameters:
  • value - An interval in seconds.

get_torrent_checking_period(self)

 
Returns the check interval.
Returns:
A number of seconds.

set_stop_collecting_threshold(self, value)

 
Stop collecting more torrents if the disk has less than this limit
Parameters:
  • value - A limit in MB.

get_stop_collecting_threshold(self)

 
Returns the disk-space limit when to stop collecting torrents.
Returns:
A number of megabytes.

set_dialback(self, value)

 
Use other peers to determine external IP address (default = True)
Parameters:
  • value - Boolean

get_dialback(self)

 
Returns whether to use the dialback mechanism.
Returns:
Boolean.

set_social_networking(self, value)

 
Enable social networking. If enabled, a message containing the user's nickname and icon is sent to each Tribler peer met (default = True).
Parameters:
  • value - Boolean

get_social_networking(self)

 
Returns whether social network is enabled.
Returns:
Boolean.

set_nickname(self, value)

 
The nickname you want to show to others.
Parameters:
  • value - A string.

get_nickname(self)

 
Returns the set nickname.
Returns:
String.

set_mugshot(self, value, mime='image/jpeg')

 
The picture of yourself you want to show to others.
Parameters:
  • value - A string of binary data of your image.
  • mime - A string of the mimetype of the data

get_mugshot(self)

 
Returns binary image data and mime-type of your picture.
Returns:
(String, String) value and mimetype.

set_peer_icon_path(self, value)

 
Directory to store received peer icons (Default is statedir + STATEDIR_PEERICON_DIR).
Parameters:
  • value - An absolute path.

get_peer_icon_path(self)

 
Returns the directory to store peer icons.
Returns:
An absolute path name.

set_remote_query(self, value)

 
Enable queries from other peers. At the moment peers can ask whether this Session has collected or opened a torrent that matches a specified keyword query. (default = True)
Parameters:
  • value - Boolean

get_remote_query(self)

 
Returns whether remote query is enabled.
Returns:
Boolean.

set_bartercast(self, value)

 
Exchange upload/download statistics with peers (default = True)
Parameters:
  • value - Boolean

get_bartercast(self)

 
Returns to exchange statistics with peers.
Returns:
Boolean.

set_video_analyser_path(self, value)

 
Path to video analyser FFMPEG. The analyser is used to guess the bitrate of a video if that information is not present in the torrent definition. (default = look for it in $PATH)
Parameters:
  • value - An absolute path name.

get_video_analyser_path(self)

 
Returns the path of the FFMPEG video analyser.
Returns:
An absolute path name.

set_internal_tracker(self, value)

 
Enable internal tracker (default = True)
Parameters:
  • value - Boolean.

get_internal_tracker(self)

 
Returns whether the internal tracker is enabled.
Returns:
Boolean.

set_internal_tracker_url(self, value)

 
Set the internal tracker URL (default = determined dynamically from Session's IP+port)
Parameters:
  • value - URL.

get_internal_tracker_url(self)

 
Returns the URL of the tracker as set by set_internal_tracker_url(). Overridden at runtime by Session class.
Returns:
URL.

set_mainline_dht(self, value)

 
Enable mainline DHT support (default = True)
Parameters:
  • value - Boolean.

get_mainline_dht(self)

 
Returns whether mainline DHT support is enabled.
Returns:
Boolean.

set_tracker_allowed_dir(self, value)

 
Only accept tracking requests for torrent in this dir (default is Session state-dir + STATEDIR_ITRACKER_DIR
Parameters:
  • value - An absolute path name.

get_tracker_allowed_dir(self)

 
Returns the internal tracker's directory of allowed torrents.
Returns:
An absolute path name.

set_tracker_allowed_list(self, value)

 
Only allow peers to register for torrents that appear in the specified file. Cannot be used in combination with set_tracker_allowed_dir()
Parameters:
  • value - An absolute filename containing a list of torrent infohashes in hex format, one per line.

get_tracker_allowed_list(self)

 
Returns the filename of the list of allowed torrents.
Returns:
An absolute path name.

set_tracker_allowed_controls(self, value)

 
Allow special keys in torrents in the allowed_dir to affect tracker access.
Parameters:
  • value - Boolean

get_tracker_allowed_controls(self)

 
Returns whether to allow allowed torrents to control tracker access.
Returns:
Boolean.

set_tracker_allowed_ips(self, value)

 
Only allow connections from IPs specified in the given file; file contains subnet data in the format: aa.bb.cc.dd/len.
Parameters:
  • value - An absolute path name.

get_tracker_allowed_ips(self)

 
Returns the filename containing allowed IP addresses.
Returns:
An absolute path name.

set_tracker_banned_ips(self, value)

 
Don't allow connections from IPs specified in the given file; file contains IP range data in the format: xxx:xxx:ip1-ip2
Parameters:
  • value - An absolute path name.

get_tracker_banned_ips(self)

 
Returns the filename containing banned IP addresses.
Returns:
An absolute path name.

set_tracker_only_local_override_ip(self, value)

 
Ignore the 'ip' parameter in the GET announce from machines which aren't on local network IPs.
 * ITRACK_IGNORE_ANNOUNCEIP_NEVER
 * ITRACK_IGNORE_ANNOUNCEIP_ALWAYS
 * ITRACK_IGNORE_ANNOUNCEIP_IFNONATCHECK
Parameters:
  • value - ITRACK_IGNORE_ANNOUNCEIP*

get_tracker_only_local_override_ip(self)

 
Returns the ignore policy for 'ip' parameters in announces.
Returns:
ITRACK_IGNORE_ANNOUNCEIP_*

set_tracker_parse_dir_interval(self, value)

 
Seconds between reloading of allowed_dir or allowed_file and allowed_ips and banned_ips lists.
Parameters:
  • value - A number of seconds.

get_tracker_parse_dir_interval(self)

 
Returns the number of seconds between refreshes of access control info.
Returns:
A number of seconds.

set_tracker_scrape_allowed(self, value)

 
Allow scrape access on the internal tracker (with a scrape request a BitTorrent client can retrieve information about how many peers are downloading the content.
* ITRACKSCRAPE_ALLOW_NONE: Don't allow scrape requests.
* ITRACKSCRAPE_ALLOW_SPECIFIC: Allow scrape requests for a specific torrent.
* ITRACKSCRAPE_ALLOW_FULL: Allow scrape of all torrents at once.
Parameters:
  • value - ITRACKSCRAPE_*

get_tracker_scrape_allowed(self)

 
Returns the scrape access policy.
Returns:
ITRACKSCRAPE_ALLOW_*

set_tracker_allow_get(self, value)

 
Setting this parameter adds a /file?hash={hash} links to the overview page that the internal tracker makes available via HTTP at hostname:listenport. These links allow users to download the torrent file from the internal tracker. Use with 'allowed_dir' parameter.
Parameters:
  • value - Boolean.

get_tracker_allow_get(self)

 
Returns whether to allow HTTP torrent-file downloads from the internal tracker.
Returns:
Boolean.

set_tracker_favicon(self, value)

 
File containing image/x-icon data to return when browser requests favicon.ico from the internal tracker. (Default = Tribler/Images/tribler.ico)
Parameters:
  • value - An absolute filename.

get_tracker_favicon(self)

 
Returns the filename of the internal tracker favicon.
Returns:
An absolute path name.

set_tracker_show_infopage(self, value)

 
Whether to display an info page when the tracker's root dir is requested via HTTP.
Parameters:
  • value - Boolean

get_tracker_show_infopage(self)

 
Returns whether to show an info page on the internal tracker.
Returns:
Boolean.

set_tracker_infopage_redirect(self, value)

 
A URL to redirect the request for an info page to.
Parameters:
  • value - URL.

get_tracker_infopage_redirect(self)

 
Returns the URL to redirect request for info pages to.
Returns:
URL

set_tracker_show_names(self, value)

 
Whether to display names from the 'allowed dir'.
Parameters:
  • value - Boolean.

get_tracker_show_names(self)

 
Returns whether the tracker displays names from the 'allowed dir'.
Returns:
Boolean.

set_tracker_keep_dead(self, value)

 
Keep dead torrents after they expire (so they still show up on your /scrape and web page)
Parameters:
  • value - Boolean.

get_tracker_keep_dead(self)

 
Returns whether to keep dead torrents for statistics.
Returns:
Boolean.

set_tracker_reannounce_interval(self, value)

 
Seconds downloaders should wait between reannouncing themselves to the internal tracker.
Parameters:
  • value - A number of seconds.

get_tracker_reannounce_interval(self)

 
Returns the reannounce interval for the internal tracker.
Returns:
A number of seconds.

set_tracker_response_size(self, value)

 
Number of peers to send to a peer in a reply to its announce at the internal tracker (i.e., in the info message)
Parameters:
  • value - A number of peers.

get_tracker_response_size(self)

 
Returns the number of peers to send in a tracker reply.
Returns:
A number of peers.

set_tracker_nat_check(self, value)

 
How many times the internal tracker should attempt to check if a downloader is behind a Network Address Translator (NAT) or firewall. If it is, the downloader won't be registered at the tracker, as other peers can probably not contact it.
Parameters:
  • value - A number of times, 0 = don't check.

get_tracker_nat_check(self)

 
Returns the number of times to check for a firewall.
Returns:
A number of times.

set_tracker_dfile(self, value)

 
File to store recent downloader info in (default = Session state dir + STATEDIR_ITRACKER_DIR + tracker.db
Parameters:
  • value - An absolute path name.

get_tracker_dfile(self)

 
Returns the tracker database file.
Returns:
An absolute path name.

set_tracker_dfile_format(self, value)

 
Format of the tracker database file. *_PICKLE is needed when Unicode filenames may appear in the tracker's state (=default).
 * ITRACKDBFORMAT_BENCODE: Use BitTorrent bencoding to store records.
 * ITRACKDBFORMAT_PICKLE: Use Python pickling to store records.
Parameters:
  • value - ITRACKDBFORFMAT_*

get_tracker_dfile_format(self)

 
Returns the format of the tracker database file.
Returns:
ITRACKDBFORMAT_*

set_tracker_save_dfile_interval(self, value)

 
The interval between saving the internal tracker's state to the tracker database (see set_tracker_dfile()).
Parameters:
  • value - A number of seconds.

get_tracker_save_dfile_interval(self)

 
Returns the tracker-database save interval.
Returns:
A number of seconds.

set_tracker_logfile(self, value)

 
File to write the tracker logs to (default is NIL: or /dev/null).
Parameters:
  • value - A device name.

get_tracker_logfile(self)

 
Returns the device name to write log messages to.
Returns:
A device name.

set_tracker_min_time_between_log_flushes(self, value)

 
Minimum time between flushes of the tracker log.
Parameters:
  • value - A number of seconds.

get_tracker_min_time_between_log_flushes(self)

 
Returns time between tracker log flushes.
Returns:
A number of seconds.

set_tracker_log_nat_checks(self, value)

 
Whether to add entries to the tracker log for NAT-check results.
Parameters:
  • value - Boolean

get_tracker_log_nat_checks(self)

 
Returns whether to log NAT-check attempts to the tracker log.
Returns:
Boolean.

set_tracker_hupmonitor(self, value)

 
Whether to reopen the tracker log file upon receipt of a SIGHUP signal (Mac/UNIX only).
Parameters:
  • value - Boolean.

get_tracker_hupmonitor(self)

 
Returns whether to reopen the tracker log file upon receipt of a SIGHUP signal.
Returns:
Boolean.

set_tracker_socket_timeout(self, value)

 
Set timeout for closing connections to trackers.
Parameters:
  • value - A number of seconds.

get_tracker_socket_timeout(self)

 
Returns the tracker socket timeout.
Returns:
A number of seconds.

set_tracker_timeout_downloaders_interval(self, value)

 
Interval between checks for expired downloaders, i.e., peers no longer in the swarm because they did not reannounce themselves.
Parameters:
  • value - A number of seconds.

get_tracker_timeout_downloaders_interval(self)

 
Returns the number of seconds between checks for expired peers.
Returns:
A number of seconds.

set_tracker_timeout_check_interval(self, value)

 
Time to wait between checking if any connections to the internal tracker have timed out.
Parameters:
  • value - A number of seconds.

get_tracker_timeout_check_interval(self)

 
Returns timeout for connections to the internal tracker.
Returns:
A number of seconds.

set_tracker_min_time_between_cache_refreshes(self, value)

 
Minimum time before a cache is considered stale and is flushed.
Parameters:
  • value - A number of seconds.

get_tracker_min_time_between_cache_refreshes(self)

 
Return the minimum time between cache refreshes.
Returns:
A number of seconds.

set_tracker_multitracker_enabled(self, value)

 
Whether to enable multitracker operation in which multiple trackers are used to register the peers for a specific torrent.
Parameters:
  • value - Boolean.

get_tracker_multitracker_enabled(self)

 
Returns whether multitracking is enabled.
Returns:
Boolean.

set_tracker_multitracker_allowed(self, value)

 
Whether to allow incoming tracker announces.
 * ITRACKMULTI_ALLOW_NONE: Don't allow.
 * ITRACKMULTI_ALLOW_AUTODETECT: Allow for allowed torrents (see set_tracker_allowed_dir())
 * ITRACKMULTI_ALLOW_ALL: Allow for all. 
Parameters:
  • value - ITRACKMULTI_ALLOW_*

get_tracker_multitracker_allowed(self)

 
Returns the multitracker allow policy of the internal tracker.
Returns:
ITRACKMULTI_ALLOW_*

set_tracker_multitracker_reannounce_interval(self, value)

 
Seconds between outgoing tracker announces to the other trackers in a multi-tracker setup.
Parameters:
  • value - A number of seconds.

get_tracker_multitracker_reannounce_interval(self)

 
Returns the multitracker reannouce interval.
Returns:
A number of seconds.

set_tracker_multitracker_maxpeers(self, value)

 
Number of peers to retrieve from the other trackers in a tracker announce in a multi-tracker setup.
Parameters:
  • value - A number of peers.

get_tracker_multitracker_maxpeers(self)

 
Returns the number of peers to retrieve from another tracker.
Returns:
A number of peers.

set_tracker_aggregate_forward(self, value)

 
Set an URL to which, if set, all non-multitracker requests are forwarded, with a password added (optional).
Parameters:
  • value - A 2-item list with format: [,|None]

get_tracker_aggregate_forward(self)

 
Returns the aggregate forward URL and optional password as a 2-item list.
Returns:
URL

set_tracker_aggregator(self, value)

 
Whether to act as a data aggregator rather than a tracker. To enable, set to True or ; if password is set, then an incoming password is required for access.
Parameters:
  • value - Boolean or string.

get_tracker_aggregator(self)

 
Returns the tracker aggregator parameter.
Returns:
Boolean or string.

set_tracker_multitracker_http_timeout(self, value)

 
Time to wait before assuming that an HTTP connection to another tracker in a multi-tracker setup has timed out.
Parameters:
  • value - A number of seconds.

get_tracker_multitracker_http_timeout(self)

 
Returns timeout for inter-multi-tracker HTTP connections.
Returns:
A number of seconds.

set_superpeer(self, value)

 
Run Session in super peer mode (default = disabled).
Parameters:
  • value - Boolean.

get_superpeer(self)

 
Returns whether the Session runs in superpeer mode.
Returns:
Boolean.

set_superpeer_file(self, value)

 
File with addresses of superpeers (default = install_dir+ Tribler/Core/superpeer.txt).
Parameters:
  • value - An absolute path name.

get_superpeer_file(self)

 
Returns the superpeer file.
Returns:
An absolute path name.

set_overlay_log(self, value)

 
File to log message to in super peer mode (default = No logging)
Parameters:
  • value - An absolute path name.

get_overlay_log(self)

 
Returns the file to log messages to or None.
Returns:
An absolute path name.

get_coopdlconfig(self)

 
Return the DownloadStartupConfig that is used when helping others in a cooperative download.
Returns:
DownloadStartupConfig

set_nat_detect(self, value)

 
Whether to try to detect the type of Network Address Translator in place.
Parameters:
  • value - Boolean.

set_puncturing_private_port(self, puncturing_private_port)

 
The listening port of the puncturing client.
Parameters:
  • puncturing_private_port - integer.

set_stun_servers(self, stun_servers)

 
The addresses of the STUN servers (at least 2)
Parameters:
  • stun_servers - List of (hostname/ip,port) tuples.

set_pingback_servers(self, pingback_servers)

 
The addresses of the pingback servers (at least 1)
Parameters:
  • pingback_servers - List of (hostname/ip,port) tuples.

set_puncturing_coordinators(self, puncturing_coordinators)

 
The address of the puncturing coordinators (at least 1)
Parameters:
  • puncturing_coordinators - List of (hostname/ip,port) tuples.

get_nat_detect(self)

 
Whether to try to detect the type of Network Address Translator in place.
Returns:
Boolean

get_puncturing_private_port(self)

 
Returns the listening port of the puncturing client.
Returns:
integer.

get_stun_servers(self)

 
Returns the addresses of the STUN servers.
Returns:
List of (hostname/ip,port) tuples.

get_pingback_servers(self)

 
Returns the addresses of the pingback servers.
Returns:
List of (hostname/ip,port) tuples.

get_puncturing_coordinators(self)

 
Returns the address of the puncturing coordinators.
Returns:
List of (hostname/ip,port) tuples.

set_crawler(self, value)

 
Handle crawler messages when received (default = True)
Parameters:
  • value - Boolean

get_crawler(self)

 
Whether crawler messages are processed
Returns:
Boolean.