diff --git a/NZBmegasearch/ApiModule.py b/NZBmegasearch/ApiModule.py index 96bf319..a6a6e91 100644 --- a/NZBmegasearch/ApiModule.py +++ b/NZBmegasearch/ApiModule.py @@ -426,7 +426,7 @@ def cleanUpResultsXML(self, results): #~ non CP request generate might errors if no url is found in the permalink if(self.typesearch != 0): - niceResults_row['encodedurl'] = 'http://bogus.gu/bog' + niceResults_row['encodedurl'] = results[i]['url'] niceResults.append( niceResults_row) diff --git a/NZBmegasearch/mega2.py b/NZBmegasearch/mega2.py index 145ff85..4b14fc1 100644 --- a/NZBmegasearch/mega2.py +++ b/NZBmegasearch/mega2.py @@ -256,13 +256,13 @@ def rss(): if(len(cfgsets.cgen['general_apikey'])): if('apikey' in request.args): if(request.args['apikey'] == cfgsets.cgen['general_apikey']): - return apiresp.dosearch_rss(request.args, urlparse(request.url)) + return apiresp.dosearch_rss(request.args, urlparse(request.url)), 200, {'Content-Type':'application/rss+xml'} else: return '[API key protection ACTIVE] Wrong key selected' else: return '[API key protection ACTIVE] API key required' else: - return apiresp.dosearch_rss(request.args, urlparse(request.url)) + return apiresp.dosearch_rss(request.args, urlparse(request.url)), 200, {'Content-Type':'application/rss+xml'} #~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ @@ -336,13 +336,13 @@ def api(): if(len(cfgsets.cgen['general_apikey'])): if('apikey' in request.args): if(request.args['apikey'] == cfgsets.cgen['general_apikey']): - return apiresp.dosearch(request.args, urlparse(request.url)) + return apiresp.dosearch(request.args, urlparse(request.url)), 200, {'Content-Type':'application/rss+xml'} else: return '[API key protection ACTIVE] Wrong key selected' else: return '[API key protection ACTIVE] API key required' else: - return apiresp.dosearch(request.args, urlparse(request.url)) + return apiresp.dosearch(request.args, urlparse(request.url)), 200, {'Content-Type':'application/rss+xml'} #~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~