diff --git a/data/interfaces/default/comicdetails.html b/data/interfaces/default/comicdetails.html index 41d1be64..a21b942d 100644 --- a/data/interfaces/default/comicdetails.html +++ b/data/interfaces/default/comicdetails.html @@ -371,24 +371,15 @@ %elif (issue['Status'] == 'Downloaded'): - - %if issue['inCacheDIR']: - <% - try: - with open(os.path.join(mylar.CACHE_DIR,issue['Location'])) as f: - linky = issue['Location'] - except IOError as e: - linky = None - %> - %if linky: - - %else: - - %endif - %else: - - %endif - + <% + linky = os.path.join(comic['ComicLocation'],issue['Location']) + if not os.path.isfile(linky): + linky = None + %> + %if linky: + + %endif + %else: diff --git a/mylar/webserve.py b/mylar/webserve.py index b7d6f04a..9b8f8df9 100755 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -2948,3 +2948,9 @@ class WebInterface(object): api.exposed = True + def downloadthis(self,pathfile=None): + logger.fdebug('filepath to retrieve file from is : ' + str(pathfile)) + from cherrypy.lib.static import serve_download + return serve_download(pathfile) + + downloadthis.exposed = True