mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Add export modal and buttons to library and info page
This commit is contained in:
parent
621fb95227
commit
43fefcf748
5 changed files with 129 additions and 3 deletions
|
@ -865,7 +865,7 @@ def export(section_id=None, rating_key=None, file_format='json'):
|
|||
plex = Plex(plexpy.CONFIG.PMS_URL, plexpy.CONFIG.PMS_TOKEN)
|
||||
|
||||
if section_id:
|
||||
logger.debug("Tautulli Exporter :: Exporting called with section_id %s", section_id)
|
||||
logger.debug("Tautulli Exporter :: Export called with section_id %s", section_id)
|
||||
|
||||
library = plex.get_library(section_id)
|
||||
media_type = library.type
|
||||
|
@ -875,7 +875,7 @@ def export(section_id=None, rating_key=None, file_format='json'):
|
|||
items = library.all()
|
||||
|
||||
elif rating_key:
|
||||
logger.debug("Tautulli Exporter :: Exporting called with rating_key %s", rating_key)
|
||||
logger.debug("Tautulli Exporter :: Export called with rating_key %s", rating_key)
|
||||
|
||||
item = plex.get_item(helpers.cast_to_int(rating_key))
|
||||
media_type = item.type
|
||||
|
|
|
@ -6478,6 +6478,13 @@ class WebInterface(object):
|
|||
|
||||
return status
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
def export_metadata_modal(self, section_id=None, rating_key=None, **kwargs):
|
||||
|
||||
return serve_template(templatename="export_modal.html", title="Export Metadata",
|
||||
section_id=section_id, rating_key=rating_key)
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue