Skip to content

Commit

Permalink
WebUI: Add missing columns in transfer list
Browse files Browse the repository at this point in the history
Incomplete Save Path
Info Hash v1
Info Hash v2
  • Loading branch information
thalieht committed Aug 7, 2024
1 parent 7b2886e commit 1ddbe6c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/webui/www/private/scripts/dynamicTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ window.qBittorrent.DynamicTable ??= (() => {
this.newColumn("seen_complete", "", "QBT_TR(Last Seen Complete)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("last_activity", "", "QBT_TR(Last Activity)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("availability", "", "QBT_TR(Availability)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("download_path", "", "QBT_TR(Incomplete Save path)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("infohash_v1", "", "QBT_TR(Info Hash v1)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("infohash_v2", "", "QBT_TR(Info Hash v2)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("reannounce", "", "QBT_TR(Reannounce In)QBT_TR[CONTEXT=TransferListModel]", 100, false);
this.newColumn("private", "", "QBT_TR(Private)QBT_TR[CONTEXT=TransferListModel]", 100, false);

Expand Down Expand Up @@ -1305,6 +1308,22 @@ window.qBittorrent.DynamicTable ??= (() => {
td.title = value;
};

// infohash_v1
this.columns["infohash_v1"].updateTd = function(td, row) {
const sourceInfohashV1 = this.getRowValue(row);
const infohashV1 = (sourceInfohashV1 !== "") ? sourceInfohashV1 : "QBT_TR(N/A)QBT_TR[CONTEXT=TransferListDelegate]";
td.textContent = infohashV1;
td.title = infohashV1;
};

// infohash_v2
this.columns["infohash_v2"].updateTd = function(td, row) {
const sourceInfohashV2 = this.getRowValue(row);
const infohashV2 = (sourceInfohashV2 !== "") ? sourceInfohashV2 : "QBT_TR(N/A)QBT_TR[CONTEXT=TransferListDelegate]";
td.textContent = infohashV2;
td.title = infohashV2;
};

// reannounce
this.columns["reannounce"].updateTd = function(td, row) {
const time = window.qBittorrent.Misc.friendlyDuration(this.getRowValue(row));
Expand Down

0 comments on commit 1ddbe6c

Please sign in to comment.