Skip to content

Commit

Permalink
Adding missing keys in history for API
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Apr 1, 2016
1 parent 990dd96 commit a077942
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sickbeard/webapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def __init__(self, args, kwargs):
# required
# optional
self.limit, args = self.check_params(args, kwargs, "limit", 100, False, "int", [])
self.type, args = self.check_params(args, kwargs, "type", None, False, "string", [None, "downloaded", "snatched"])
self.type, args = self.check_params(args, kwargs, "type", None, False, "string", ["downloaded", "snatched"])
self.type = self.type.lower() if isinstance(self.type, str) else None

# super, missing, help
Expand Down Expand Up @@ -1056,12 +1056,16 @@ def convert_date(history_date):
composite = Quality.splitCompositeStatus(cur_item.action)
if cur_type in (statusStrings[composite.status].lower(), None):
return {
'status': statusStrings[composite.status],
'quality': get_quality_string(composite.quality),
'date': convert_date(cur_item.date),
'episode': cur_item.episode,
'indexerid': cur_item.show_id,
'provider': cur_item.provider,
'quality': get_quality_string(composite.quality),
'resource': ek(os.path.basename, cur_item.resource),
'resource_path': ek(os.path.dirname, cur_item.resource),
'season': cur_item.season,
'show_name': cur_item.show_name,
'status': statusStrings[composite.status],
# Add tvdbid for backward compatibility
# TODO: Make this actual tvdb id for other indexers
'tvdbid': cur_item.show_id,
Expand Down

0 comments on commit a077942

Please sign in to comment.