mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Fix friendlyDuration function
This commit is contained in:
@@ -38,11 +38,11 @@ function friendlyDuration(seconds) {
|
||||
if (minutes < 60)
|
||||
return "QBT_TR(%1m)QBT_TR".replace("%1", parseInt(minutes));
|
||||
var hours = minutes / 60;
|
||||
minutes = minutes - hours * 60;
|
||||
minutes = minutes % 60;
|
||||
if (hours < 24)
|
||||
return "QBT_TR(%1h %2m)QBT_TR".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes))
|
||||
var days = hours / 24;
|
||||
hours = hours - days * 24;
|
||||
hours = hours % 24;
|
||||
if (days < 100)
|
||||
return "QBT_TR(%1d %2h)QBT_TR".replace("%1", parseInt(days)).replace("%2", parseInt(hours))
|
||||
return "∞";
|
||||
|
||||
Reference in New Issue
Block a user