Fix possible nullref

This commit is contained in:
MrTimscampi 2020-12-01 19:33:18 +01:00
parent 7ba9ba4780
commit 371092cf62

View File

@ -206,12 +206,14 @@ namespace Emby.Server.Implementations.TV
DtoOptions = dtoOptions
}).Cast<Episode>().FirstOrDefault();
if (!(nextEpisode is null)) {
var userData = _userDataManager.GetUserData(user, nextEpisode);
if (userData.PlaybackPositionTicks > 0)
{
return null;
}
}
return nextEpisode;
};