def start_torrents(self): torrents = [] if os.path.isdir(self._torrent): # walk the dir and start all torrents in there torrents = files_list(self._torrent, [constants.TORRENT_DOWNLOAD_EXT, constants.TORRENT_VOD_EXT]) else: torrents.append(self._torrent) for torrent in torrents: self.start_torrent(torrent)
def start_torrents(self): torrents = [] if os.path.isdir(self._torrent): # walk the dir and start all torrents in there torrents = files_list( self._torrent, [constants.TORRENT_DOWNLOAD_EXT, constants.TORRENT_VOD_EXT]) else: torrents.append(self._torrent) for torrent in torrents: self.start_torrent(torrent)
def _start_downloads(self): torrent_files = [] if self._config.get_single_torrent() is not None: torrent_files.append(self._config.get_single_torrent()) else: torrent_files = files_list(self._config.get_directory(), [constants.TORRENT_DOWNLOAD_EXT, constants.TORRENT_VOD_EXT]) if len(torrent_files) == 0: self._logger.error("No torrents found.") self._on_exit() os._exit(1) for torrent in torrent_files: self._start_download(torrent)
def _start_downloads(self): torrent_files = [] if self._config.get_single_torrent() is not None: torrent_files.append(self._config.get_single_torrent()) else: torrent_files = files_list( self._config.get_directory(), [constants.TORRENT_DOWNLOAD_EXT, constants.TORRENT_VOD_EXT]) if len(torrent_files) == 0: self._logger.error("No torrents found.") self._on_exit() os._exit(1) for torrent in torrent_files: self._start_download(torrent)