mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 15:04:36 +00:00
Fix friendlyDuration function
This commit is contained in:
parent
ba86d16e78
commit
1d5e52fc55
@ -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 "∞";
|
||||
|
Loading…
x
Reference in New Issue
Block a user