mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04: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 = () =>
|
Func<Episode> getEpisode = () =>
|
||||||
{
|
{
|
||||||
return _libraryManager.GetItemList(new InternalItemsQuery(user)
|
var nextEpsiode = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
AncestorWithPresentationUniqueKey = null,
|
AncestorWithPresentationUniqueKey = null,
|
||||||
SeriesPresentationUniqueKey = seriesKey,
|
SeriesPresentationUniqueKey = seriesKey,
|
||||||
@ -205,6 +205,15 @@ namespace Emby.Server.Implementations.TV
|
|||||||
MinSortName = lastWatchedEpisode?.SortName,
|
MinSortName = lastWatchedEpisode?.SortName,
|
||||||
DtoOptions = dtoOptions
|
DtoOptions = dtoOptions
|
||||||
}).Cast<Episode>().FirstOrDefault();
|
}).Cast<Episode>().FirstOrDefault();
|
||||||
|
|
||||||
|
var userData = _userDataManager.GetUserData(user, nextEpsiode);
|
||||||
|
|
||||||
|
if (userData.PlaybackPositionTicks > 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nextEpsiode;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (lastWatchedEpisode != null)
|
if (lastWatchedEpisode != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user