Add 'get_session_status' to core

This commit is contained in:
Andrew Resch 2008-11-21 09:15:05 +00:00
parent c028b861f8
commit f5ad01a865
1 changed files with 16 additions and 0 deletions

View File

@ -396,6 +396,22 @@ class Core(
}
def export_get_session_status(self, keys):
"""
Gets the session status values for 'keys'
:param keys: list of strings, the keys for which we want values
:returns: a dictionary of {key: value, ...}
:rtype: dict
"""
status = {}
session_status = self.session.status()
for key in keys:
status[key] = getattr(session_status, key)
return status
def export_add_torrent_url(self, url, options):
log.info("Attempting to add url %s", url)