def unregister_torrent(hash_str): """Unregisters torrent from torrt. That doesn't remove torrent from torrent clients. :param hash_str: str - torrent identifying hash :return: """ LOGGER.info('Unregistering `%s` torrent ...', hash_str) try: cfg = TorrtConfig.load() del cfg['torrents'][hash_str] TorrtConfig.save(cfg) except KeyError: pass # Torrent was not known by torrt
def remove_notifier(alias): """Removes notifier by alias :param alias: str - Notifier alias to remove. :return: """ LOGGER.info('Removing `%s` notifier ...', alias) try: cfg = TorrtConfig.load() del cfg['notifiers'][alias] TorrtConfig.save(cfg) except KeyError: pass
def unregister_torrent(hash_str): """Unregisters torrent from torrt. That doesn't remove torrent from torrent clients. :param hash_str: str - torrent identifying hash :return: """ LOGGER.debug('Unregistering `%s` torrent ...', hash_str) try: cfg = TorrtConfig.load() del cfg['torrents'][hash_str] TorrtConfig.save(cfg) except KeyError: pass # Torrent was not known by torrt