Fix: Tdarr widget should use viewable count if exists (#2492)

pull/2499/head
HaveAGitGat 11 months ago committed by GitHub
parent afd49d5327
commit b9f1ddd284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,9 +26,19 @@ export default function Component({ service }) {
);
}
const queue = parseInt(tdarrData.table1Count, 10) + parseInt(tdarrData.table4Count, 10);
const processed = parseInt(tdarrData.table2Count, 10) + parseInt(tdarrData.table5Count, 10);
const errored = parseInt(tdarrData.table3Count, 10) + parseInt(tdarrData.table6Count, 10);
// use viewable count if it exists, which removes file count of any disabled libraries etc
// only shows items which are viewable in the tables in the UI
const table1Count = tdarrData.table1ViewableCount || tdarrData.table1Count;
const table2Count = tdarrData.table2ViewableCount || tdarrData.table2Count;
const table3Count = tdarrData.table3ViewableCount || tdarrData.table3Count;
const table4Count = tdarrData.table4ViewableCount || tdarrData.table4Count;
const table5Count = tdarrData.table5ViewableCount || tdarrData.table5Count;
const table6Count = tdarrData.table6ViewableCount || tdarrData.table6Count;
const queue = parseInt(table1Count, 10) + parseInt(table4Count, 10);
const processed = parseInt(table2Count, 10) + parseInt(table5Count, 10);
const errored = parseInt(table3Count, 10) + parseInt(table6Count, 10);
const saved = parseFloat(tdarrData.sizeDiff, 10) * 1000000000;
return (

Loading…
Cancel
Save