|
|
|
@ -51,6 +51,7 @@ class query_data(object): |
|
|
|
self.query_params = {} |
|
|
|
self.query_params = {} |
|
|
|
self.query_type = query_type.UNKNOWN |
|
|
|
self.query_type = query_type.UNKNOWN |
|
|
|
self.raw_query_str = '' |
|
|
|
self.raw_query_str = '' |
|
|
|
|
|
|
|
self.rel_path = '' |
|
|
|
self.tmdb_api_key = '' |
|
|
|
self.tmdb_api_key = '' |
|
|
|
|
|
|
|
|
|
|
|
class response_data(object): |
|
|
|
class response_data(object): |
|
|
|
@ -86,12 +87,13 @@ def query_movie(): |
|
|
|
query.tmdb_api_key = current_app.config['TMDB_API_KEY'] |
|
|
|
query.tmdb_api_key = current_app.config['TMDB_API_KEY'] |
|
|
|
|
|
|
|
|
|
|
|
# NOTE: query string can be submitted from a link or form input |
|
|
|
# NOTE: query string can be submitted from a link or form input |
|
|
|
if 'base_name' in request.form: |
|
|
|
# form input comes from the query.html template and the links |
|
|
|
query.raw_query_str = request.form['base_name'] |
|
|
|
# come from the file_listing/index.html template |
|
|
|
elif 'query' in request.form: |
|
|
|
if 'query' in request.form: |
|
|
|
query.raw_query_str = request.form['query'] |
|
|
|
query.raw_query_str = request.form['query'] |
|
|
|
elif 'query' in request.args: |
|
|
|
elif 'query' in request.args and 'rel_path' in request.args: |
|
|
|
query.raw_query_str = request.args['query'] |
|
|
|
query.raw_query_str = request.args['query'] |
|
|
|
|
|
|
|
query.rel_path = request.args['rel_path'] |
|
|
|
|
|
|
|
|
|
|
|
if query.raw_query_str and parseQueryStr(query): |
|
|
|
if query.raw_query_str and parseQueryStr(query): |
|
|
|
if isQueryCached(query.parsed_query_str): |
|
|
|
if isQueryCached(query.parsed_query_str): |
|
|
|
|