run_tribler
Attributes
Classes
The possible command-line arguments to the core process. |
Functions
|
Create a native pop-up without any third party dependency. |
|
Parse the command-line arguments. |
|
Get the default application state directory. |
|
Start a download by calling the REST API. |
|
Add environment variables to the configuration. |
|
Loads the torrent URI. |
|
Consume Mac events on the asyncio main thread. |
|
Open a webbrowser tab with the given URL. |
|
Use the given RGB code to recolor the image. |
|
Create the tray icon. |
|
The main script entry point. |
Module Contents
- run_tribler.show_error(exc: Exception, shutdown: Literal[True] = True) NoReturn
- run_tribler.show_error(exc: Exception, shutdown: Literal[False] = True) None
Create a native pop-up without any third party dependency.
- Parameters:
exc – the error to show to the user
shutdown – whether to shut down after showing the error
- run_tribler.logger
- class run_tribler.Arguments
Bases:
TypedDictThe possible command-line arguments to the core process.
- run_tribler.get_root_state_directory(requested_path: os.PathLike | None) pathlib.Path
Get the default application state directory.
- async run_tribler.start_download(config: tribler.tribler_config.TriblerConfigManager, server_url: str, torrent_uri: str) None
Start a download by calling the REST API.
- run_tribler.init_config(parsed_args: Arguments) tribler.tribler_config.TriblerConfigManager
Add environment variables to the configuration.
- async run_tribler.mac_event_loop() None
Consume Mac events on the asyncio main thread.
WARNING:
sendEvent_can block on some events. In particular, while the tray menu is open.
- run_tribler.recolor_tray_icon(pil_icon: PIL.Image, rgb_code: str) PIL.Image
Use the given RGB code to recolor the image.
- run_tribler.spawn_tray_icon(session: tribler.core.session.Session, config: tribler.tribler_config.TriblerConfigManager) pystray.Icon
Create the tray icon.
- async run_tribler.main() bool
The main script entry point.
- Returns:
Whether we wish to restart the process.
- run_tribler.__restart = True