From f3f308a81225429ba7758c5bae0aafe7e355995f Mon Sep 17 00:00:00 2001 From: "Chris A. Bunt" Date: Mon, 5 Jun 2017 21:30:36 -0500 Subject: [PATCH] Propogating new variable throughout all function calls --- Branch_Scope.txt | 1 + getvideotype.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Branch_Scope.txt b/Branch_Scope.txt index 3840cb9..a056053 100644 --- a/Branch_Scope.txt +++ b/Branch_Scope.txt @@ -19,6 +19,7 @@ KEY: 38d39b96 Generated URL: http://www.omdbapi.com/?t={0}&y={1}&plot=short&r=json&apikey={omdb_api_key http://www.omdbapi.com/?t="true grit"&plot=short&4=json&apikey=38d39b96 +video name example "Raising Arizona (1999)" Files affected: diff --git a/getvideotype.py b/getvideotype.py index 91b21cb..cc35f10 100755 --- a/getvideotype.py +++ b/getvideotype.py @@ -48,7 +48,7 @@ def getdvdtype(): if (dvd_type == "fail"): # first try submitting without the year - dvd_type = callwebservice(dvd_title_clean, "") + dvd_type = callwebservice(omdb_api_key, dvd_title_clean, "") # print (dvd_type) if (dvd_type != "fail"): @@ -60,12 +60,12 @@ def getdvdtype(): if (dvd_title.find("-") > -1): dvd_title_slice = dvd_title[:dvd_title.find("-")] dvd_title_slice =cleanupstring(dvd_title_slice) - dvd_type = callwebservice(dvd_title_slice) + dvd_type = callwebservice(omdb_api_key, dvd_title_slice) # if still fail, then try slicing off the last word in a loop while dvd_type == "fail" and dvd_title_clean.count('+') > 0: dvd_title_clean = dvd_title_clean.rsplit('+', 1)[0] - dvd_type = callwebservice(dvd_title_clean) + dvd_type = callwebservice(omdb_api_key, dvd_title_clean) if needs_new_year == "true": #pass the new year back to bash to handle