mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
fix(tv-requests): 🐛 Fixed a small bug where an exception can get thrown when attempting to view TV Requests
This commit is contained in:
parent
f2552ef6ed
commit
9840077c5c
1 changed files with 8 additions and 1 deletions
|
@ -929,7 +929,14 @@ namespace Ombi.Core.Engine
|
||||||
|
|
||||||
var playedCount = playedEpisodes.Count();
|
var playedCount = playedEpisodes.Count();
|
||||||
var toWatchCount = requestedEpisodes.Count();
|
var toWatchCount = requestedEpisodes.Count();
|
||||||
|
if (playedCount == 0 || toWatchCount == 0)
|
||||||
|
{
|
||||||
|
request.RequestedUserPlayedProgress = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
request.RequestedUserPlayedProgress = 100 * playedCount / toWatchCount;
|
request.RequestedUserPlayedProgress = 100 * playedCount / toWatchCount;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue