From 9aab2583509b0a29ff9a6f447179bfcc6fa3cd34 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Mon, 6 Nov 2017 14:17:30 -0500 Subject: [PATCH] Made a few small edits --- actions.py | 2 -- search.py | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/actions.py b/actions.py index 8b2b56c..506ceba 100644 --- a/actions.py +++ b/actions.py @@ -98,8 +98,6 @@ def searchImages(idNum, keyType, authHeaders): # This is getting a list of file quit() def downloadImages(imageType, respObj, idNum): # TODO some images arent grabbed through the api. save the image number and make a try catch to get any missing images - clearFolders() - parsed_respObj = json.loads(respObj.content) saveNameList = download(imageType, parsed_respObj) diff --git a/search.py b/search.py index 94e8aa6..8bb1534 100644 --- a/search.py +++ b/search.py @@ -7,7 +7,7 @@ import urllib.parse from actions import wait - +# TODO Move this to actions def searchRemainder(imageType, saveNameList, idNum):#Finds any images missing from the api call in getImages numbers = [] print("Checking for missing images...") # TODO implement this method @@ -135,6 +135,7 @@ def search(): poster = searchImages(idNum, POS_KEY_TYPE, authHeaders) banner = searchImages(idNum, BAN_KEY_TYPE, authHeaders) + clearFolders() downloadImages("fanart", fanart, idNum) # TODO find a better way to pass these variables. Constructor? downloadImages("poster", poster, idNum) downloadImages("banner", banner, idNum)