mirror of https://github.com/Jackett/Jackett
Add support for "wk" and "hr" ago format
This commit is contained in:
parent
7d93361839
commit
8612387e39
|
@ -42,11 +42,11 @@ namespace Jackett.Utils
|
|||
timeAgo += TimeSpan.FromSeconds(val);
|
||||
else if (unit.Contains("min"))
|
||||
timeAgo += TimeSpan.FromMinutes(val);
|
||||
else if (unit.Contains("hour"))
|
||||
else if (unit.Contains("hour") || unit.Contains("hr"))
|
||||
timeAgo += TimeSpan.FromHours(val);
|
||||
else if (unit.Contains("day"))
|
||||
timeAgo += TimeSpan.FromDays(val);
|
||||
else if (unit.Contains("week"))
|
||||
else if (unit.Contains("week") || unit.Contains("wk"))
|
||||
timeAgo += TimeSpan.FromDays(val * 7);
|
||||
else if (unit.Contains("month"))
|
||||
timeAgo += TimeSpan.FromDays(val * 30);
|
||||
|
|
Loading…
Reference in New Issue