diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html index 9406c3f5a..7fa2220f1 100644 --- a/src/webui/www/private/rename_files.html +++ b/src/webui/www/private/rename_files.html @@ -256,9 +256,7 @@ document.getElementById("renameOptions").disabled = false; // Recreate table - let selectedRows = bulkRenameFilesTable.getSelectedRows().map(row => row.rowId.toString()); - for (const renamedRow of rows) - selectedRows = selectedRows.filter(selectedRow => selectedRow !== renamedRow.rowId.toString()); + const selectedRows = bulkRenameFilesTable.getSelectedRows().map(row => row.rowId.toString()); bulkRenameFilesTable.clear(); // Adjust file enumeration count by 1 when replacing single files to prevent naming conflicts @@ -379,7 +377,7 @@ url.search = new URLSearchParams({ hash: data.hash }); - fetch(url, { + return fetch(url, { method: "GET", cache: "no-store" }) @@ -394,7 +392,11 @@ handleTorrentFiles(files, selectedRows); }); }; - setupTable(data.selectedRows); + setupTable(data.selectedRows).then(() => { + document.getElementById("rootMultiRename_cb").click(); + }).catch((error) => { + console.error("Error setting up the table:", error); + }); })();