Skip to content

Commit

Permalink
Added a getbanner command to the API
Browse files Browse the repository at this point in the history
  • Loading branch information
midgetspy committed Dec 13, 2011
1 parent ed5e8cc commit 73e30e8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sickbeard/webapi.py
Expand Up @@ -1896,6 +1896,24 @@ def run(self):
return {'outputType': 'image', 'image': webserve.WebInterface().showPoster(self.tvdbid, 'poster')}


class CMD_ShowGetBanner(ApiCall):
_help = {"desc": "get the banner stored for a show in sickbeard",
"requiredParameters": {"tvdbid": {"desc": "thetvdb.com unique id of a show"}
}
}

def __init__(self, args, kwargs):
# required
self.tvdbid, args = self.check_params(args, kwargs, "tvdbid", None, True, "int", [])
# optional
# super, missing, help
ApiCall.__init__(self, args, kwargs)

def run(self):
""" get the banner for a show in sickbeard """
return {'outputType': 'image', 'image': webserve.WebInterface().showPoster(self.tvdbid, 'banner')}


class CMD_ShowRefresh(ApiCall):
_help = {"desc": "refresh a show in sickbeard",
"requiredParameters": {"tvdbid": {"desc": "thetvdb.com unique id of a show"},
Expand Down Expand Up @@ -2334,6 +2352,7 @@ def run(self):
"show.delete": CMD_ShowDelete,
"show.getquality": CMD_ShowGetQuality,
"show.getposter": CMD_ShowGetPoster,
"show.getbanner": CMD_ShowGetBanner,
"show.refresh": CMD_ShowRefresh,
"show.seasonlist": CMD_ShowSeasonList,
"show.seasons": CMD_ShowSeasons,
Expand Down

0 comments on commit 73e30e8

Please sign in to comment.