torrent_download.entities package¶
Submodules¶
torrent_download.entities.TorrentDownload module¶
-
class
torrent_download.entities.TorrentDownload.
TorrentDownload
(torrent_info: torrent_download.entities.TorrentInfo.TorrentInfo, destination_dir: str, destination_filename: Optional[str] = None)¶ Bases:
object
Class used to store all information required for downloading a torrent
-
__init__
(torrent_info: torrent_download.entities.TorrentInfo.TorrentInfo, destination_dir: str, destination_filename: Optional[str] = None)¶ Initializes the TorrentDownload object :param torrent_info: The torrent information :param destination_dir: The destination directory :param destination_filename: Optional filename, if not provided will
be automatically inferred
-
add_extension
(ext: str)¶ Adds an extension to the destination filename :param ext: The extension to add :return: None
-
torrent_download.entities.TorrentInfo module¶
-
class
torrent_download.entities.TorrentInfo.
TorrentInfo
(filename: Optional[str], torrent_file: Optional[str], magnet_link: Optional[str], size: Optional[int])¶ Bases:
object
Class that stores information for a torrent
-
__init__
(filename: Optional[str], torrent_file: Optional[str], magnet_link: Optional[str], size: Optional[int])¶ Initializes the torrent info object :param filename: The name of the file for the torrent :param torrent_file: The link to the torrent file :param magnet_link: A magnet link to the torrent :param size: The size of the file in bytes
-