diff --git a/API.md b/API.md index a51c9992..f2c1fdfe 100644 --- a/API.md +++ b/API.md @@ -85,10 +85,10 @@ Delete all Tautulli history for a specific library. ``` Required parameters: + server_id (str): The Plex server identifier of the library section section_id (str): The id of the Plex library section Optional parameters: - server_id (str): The Plex server identifier of the library section row_ids (str): Comma separated row ids to delete, e.g. "2,3,8" Returns: @@ -159,10 +159,10 @@ Delete a library section from Tautulli. Also erases all history for the library. ``` Required parameters: + server_id (str): The Plex server identifier of the library section section_id (str): The id of the Plex library section Optional parameters: - server_id (str): The Plex server identifier of the library section row_ids (str): Comma separated row ids to delete, e.g. "2,3,8" Returns: diff --git a/data/interfaces/default/edit_library.html b/data/interfaces/default/edit_library.html index 8b36a332..8e6d38b1 100644 --- a/data/interfaces/default/edit_library.html +++ b/data/interfaces/default/edit_library.html @@ -115,21 +115,13 @@ DOCUMENTATION :: END var msg = 'Are you REALLY sure you want to purge all history for the ${data["section_name"]} library?
' + 'This is permanent and cannot be undone!'; var url = 'delete_all_library_history'; - confirmAjaxCall(url, msg, { section_id: '${data["section_id"]}' }, null, function () { location.reload(); }); + confirmAjaxCall(url, msg, { server_id: '${server_id}', section_id: '${data["section_id"]}' }, null, function () { location.reload(); }); }); $('#undelete-library').click(function () { - var msg = 'Are you sure you want to undelete this user?'; + var msg = 'Are you sure you want to undelete this library?'; var url = 'undelete_library'; confirmAjaxCall(url, msg, { section_id: '${data["section_id"]}' }, null, function () { location.reload(); }); }); - - $(document).ready(function() { - // Move #confirm-modal to parent container - if (!($('#edit-library-modal').next().is('#confirm-modal-purge'))) { - $('#confirm-modal-purge').appendTo($('#edit-library-modal').parent()); - } - $('#edit-library-modal > #confirm-modal-purge').remove(); - }); % endif \ No newline at end of file diff --git a/data/interfaces/default/edit_user.html b/data/interfaces/default/edit_user.html index ede4168e..ebb18867 100644 --- a/data/interfaces/default/edit_user.html +++ b/data/interfaces/default/edit_user.html @@ -134,13 +134,5 @@ DOCUMENTATION :: END var url = 'undelete_user'; confirmAjaxCall(url, msg, { user_id: '${data["user_id"]}' }, null, function () { location.reload(); }); }); - - $(document).ready(function() { - // Move #confirm-modal-purge to parent container - if (!($('#edit-user-modal').next().is('#confirm-modal-purge'))) { - $('#confirm-modal-purge').appendTo($('#edit-user-modal').parent()); - } - $('#edit-user-modal > #confirm-modal-purge').remove(); - }); % endif \ No newline at end of file diff --git a/plexpy/webserve.py b/plexpy/webserve.py index b3e0ee34..731a547c 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -628,7 +628,8 @@ class WebInterface(object): result = None status_message = 'An error occured.' - return serve_template(templatename="edit_library.html", title="Edit Library", data=result, status_message=status_message) + return serve_template(templatename="edit_library.html", title="Edit Library", + data=result, server_id=plexpy.CONFIG.PMS_IDENTIFIER, status_message=status_message) @cherrypy.expose @requireAuth(member_of("admin")) @@ -1015,10 +1016,10 @@ class WebInterface(object): ``` Required parameters: + server_id (str): The Plex server identifier of the library section section_id (str): The id of the Plex library section Optional parameters: - server_id (str): The Plex server identifier of the library section row_ids (str): Comma separated row ids to delete, e.g. "2,3,8" Returns: @@ -1044,10 +1045,10 @@ class WebInterface(object): ``` Required parameters: + server_id (str): The Plex server identifier of the library section section_id (str): The id of the Plex library section Optional parameters: - server_id (str): The Plex server identifier of the library section row_ids (str): Comma separated row ids to delete, e.g. "2,3,8" Returns: