mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
support autoplay with dlna
This commit is contained in:
parent
612986e4ae
commit
5caa63367a
@ -983,6 +983,26 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user != null && command.ItemIds.Length == 1 && user.Configuration.EnableNextEpisodeAutoPlay)
|
||||||
|
{
|
||||||
|
var episode = _libraryManager.GetItemById(command.ItemIds[0]) as Episode;
|
||||||
|
if (episode != null)
|
||||||
|
{
|
||||||
|
var series = episode.Series;
|
||||||
|
if (series != null)
|
||||||
|
{
|
||||||
|
var episodes = series.GetEpisodes(user, false, false)
|
||||||
|
.SkipWhile(i => i.Id != episode.Id)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (episodes.Count > 0)
|
||||||
|
{
|
||||||
|
command.ItemIds = episodes.Select(i => i.Id.ToString("N")).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var controllingSession = GetSession(controllingSessionId);
|
var controllingSession = GetSession(controllingSessionId);
|
||||||
AssertCanControl(session, controllingSession);
|
AssertCanControl(session, controllingSession);
|
||||||
if (controllingSession.UserId.HasValue)
|
if (controllingSession.UserId.HasValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user