mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 07:22:37 -07:00
Add error message for failed export download
This commit is contained in:
parent
8b8afacaea
commit
bcc693e4c7
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This file is part of Tautulli.
|
||||
#
|
||||
|
@ -6526,6 +6526,14 @@ class WebInterface(object):
|
|||
result = exporter.get_export(export_id=row_id)
|
||||
if result and result['complete'] and result['exists']:
|
||||
serve_download(path=exporter.get_export_filepath(result['filename']), name=result['filename'])
|
||||
else:
|
||||
if result and not result.get('complete'):
|
||||
msg = 'Export is still being processed.'
|
||||
elif result and not result.get('exists'):
|
||||
msg = 'Export file does not exist.'
|
||||
else:
|
||||
msg = 'Invalid row_id provided.'
|
||||
return {'result': 'error', 'message': msg}
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue