Merge pull request #56 from tothf/ratio-limit-block

Fix Ratio Limit column
This commit is contained in:
CJ Ratliff 2024-01-28 22:42:03 -05:00 committed by GitHub
commit 35c7ea5f28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1309,7 +1309,12 @@ window.qBittorrent.DynamicTable = (function() {
this.columns['completed'].updateTd = this.columns['size'].updateTd;
// max_ratio
this.columns['max_ratio'].updateTd = this.columns['ratio'].updateTd;
this.columns['max_ratio'].updateTd = function(td, row) {
const max_ratio = this.getRowValue(row);
const string = (max_ratio === -1) ? '∞' : window.qBittorrent.Misc.toFixedPointString(max_ratio, 2);
td.set('text', string);
td.set('title', string);
};
// seen_complete
this.columns['seen_complete'].updateTd = this.columns['completion_on'].updateTd;