mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Prevent GetUpNext from returning episodes in progress
This commit is contained in:
parent
0a35f35311
commit
21a67a66d2
@ -192,7 +192,7 @@ namespace Emby.Server.Implementations.TV
|
||||
|
||||
Func<Episode> getEpisode = () =>
|
||||
{
|
||||
return _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
var nextEpsiode = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
AncestorWithPresentationUniqueKey = null,
|
||||
SeriesPresentationUniqueKey = seriesKey,
|
||||
@ -205,6 +205,15 @@ namespace Emby.Server.Implementations.TV
|
||||
MinSortName = lastWatchedEpisode?.SortName,
|
||||
DtoOptions = dtoOptions
|
||||
}).Cast<Episode>().FirstOrDefault();
|
||||
|
||||
var userData = _userDataManager.GetUserData(user, nextEpsiode);
|
||||
|
||||
if (userData.PlaybackPositionTicks > 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return nextEpsiode;
|
||||
};
|
||||
|
||||
if (lastWatchedEpisode != null)
|
||||
|
Loading…
Reference in New Issue
Block a user