diff --git a/src/widgets/qbittorrent/component.jsx b/src/widgets/qbittorrent/component.jsx index 7a45cf0b..8e9270d9 100644 --- a/src/widgets/qbittorrent/component.jsx +++ b/src/widgets/qbittorrent/component.jsx @@ -9,18 +9,18 @@ import useWidgetAPI from "utils/proxy/use-widget-api"; function formatTimeLeft(inputSeconds) { let seconds = inputSeconds; const years = Math.floor(seconds / (365 * 24 * 60 * 60)); - seconds %= 365 * 24 * 60 * 60; // Remaining seconds after subtracting years + seconds %= 365 * 24 * 60 * 60; // Remaining seconds after subtracting years const days = Math.floor(seconds / (24 * 60 * 60)); - seconds %= 24 * 60 * 60; // Remaining seconds after subtracting days + seconds %= 24 * 60 * 60; // Remaining seconds after subtracting days const hours = Math.floor(seconds / 3600); - seconds %= 3600; // Remaining seconds after subtracting hours + seconds %= 3600; // Remaining seconds after subtracting hours const minutes = Math.floor(seconds / 60); const remainingSeconds = seconds % 60; - let result = ''; + let result = ""; if (years > 0) result = `over ${years}y`; else if (days > 0) result = `over ${days}d`; else if (hours > 0) result = `${hours}h ${minutes}m`; @@ -30,7 +30,6 @@ function formatTimeLeft(inputSeconds) { return result.trim(); } - export default function Component({ service }) { const { t } = useTranslation(); const { widget } = service; @@ -83,7 +82,7 @@ export default function Component({ service }) { {enableLeechProgress && leechTorrents.map((queueEntry) => (