mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Allow to copy content paths of selected torrents
Closes #23227. PR #23239. --------- Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
@@ -153,6 +153,7 @@ let copyInfohashFN = (policy) => {};
|
||||
let copyMagnetLinkFN = () => {};
|
||||
let copyIdFN = () => {};
|
||||
let copyCommentFN = () => {};
|
||||
let copyContentPathFN = () => {};
|
||||
let setQueuePositionFN = () => {};
|
||||
let exportTorrentFN = () => {};
|
||||
|
||||
@@ -1219,6 +1220,20 @@ const initializeWindows = () => {
|
||||
return comments.join("\n---------\n");
|
||||
};
|
||||
|
||||
copyContentPathFN = () => {
|
||||
const selectedRows = torrentsTable.selectedRowsIds();
|
||||
const contentPaths = [];
|
||||
if (selectedRows.length > 0) {
|
||||
const rows = torrentsTable.getFilteredAndSortedRows();
|
||||
for (const hash of selectedRows) {
|
||||
const contentPath = rows[hash].full_data.content_path;
|
||||
if ((contentPath !== null) && (contentPath.length > 0))
|
||||
contentPaths.push(contentPath);
|
||||
}
|
||||
}
|
||||
return contentPaths.join("\n");
|
||||
};
|
||||
|
||||
exportTorrentFN = async () => {
|
||||
const hashes = torrentsTable.selectedRowsIds();
|
||||
for (const hash of hashes) {
|
||||
|
||||
Reference in New Issue
Block a user