Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NZBmegasearch/ApiModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions NZBmegasearch/mega2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}


#~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Expand Down Expand Up @@ -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'}

#~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Expand Down