From 2037ba432b32daf08347b7c6df6b578ab1cf4ba6 Mon Sep 17 00:00:00 2001 From: Croneter Date: Fri, 15 Jun 2018 14:00:12 +0200 Subject: [PATCH] PEP8 --- default.py | 8 ++++---- resources/lib/entrypoint.py | 15 +++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/default.py b/default.py index 1b6cbd66..6a2ce64c 100644 --- a/default.py +++ b/default.py @@ -73,10 +73,10 @@ class Main(): int(params.get('limit'))) elif mode == 'recentepisodes': - entrypoint.getRecentEpisodes(itemid, - params.get('type'), - params.get('tagname'), - int(params.get('limit'))) + entrypoint.recent_episodes(itemid, + params.get('type'), + params.get('tagname'), + int(params.get('limit'))) elif mode == 'nextup': entrypoint.next_up_episodes(params['tagname'], diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 0b7d7744..734f52bb 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -360,9 +360,10 @@ def in_progress_episodes(tagname, limit): 'field': "inprogress", 'value': ""}, 'properties': ["title", "playcount", "season", "episode", - "showtitle", "plot", "file", "rating", "resume", - "tvshowid", "art", "cast", "streamdetails", "firstaired", - "runtime", "writer", "dateadded", "lastplayed"] + "showtitle", "plot", "file", "rating", "resume", + "tvshowid", "art", "cast", "streamdetails", + "firstaired", "runtime", "writer", "dateadded", + "lastplayed"] } for episode in js.get_episodes(params): xbmcplugin.addDirectoryItem(handle=HANDLE, @@ -373,9 +374,11 @@ def in_progress_episodes(tagname, limit): break xbmcplugin.endOfDirectory(handle=HANDLE) -##### GET RECENT EPISODES FOR TAGNAME ##### -# def getRecentEpisodes(tagname, limit): -def getRecentEpisodes(viewid, mediatype, tagname, limit): + +def recent_episodes(viewid, mediatype, tagname, limit): + """ + List the recently added episodes for tagname + """ count = 0 # if the addon is called with recentepisodes parameter, # we return the recentepisodes list of the given tagname