mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -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 toWatchCount = requestedEpisodes.Count();
|
||||
request.RequestedUserPlayedProgress = 100 * playedCount / toWatchCount;
|
||||
if (playedCount == 0 || toWatchCount == 0)
|
||||
{
|
||||
request.RequestedUserPlayedProgress = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
request.RequestedUserPlayedProgress = 100 * playedCount / toWatchCount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue