Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/fa7a8752a9e6e96b7ecf1f82a416695f73fd1f36
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
33 additions and
3 deletions
@ -143,10 +143,31 @@ namespace Emby.Server.Implementations.TV
var allNextUp = seriesKeys
. Select ( i = > GetNextUp ( i , currentUser , dtoOptions ) ) ;
// If viewing all next up for all series, remove first episodes
// But if that returns empty, keep those first episodes (avoid completely empty view)
var alwaysEnableFirstEpisode = ! string . IsNullOrEmpty ( request . SeriesId ) ;
var anyFound = false ;
return allNextUp
. Where ( i = >
{
return i . Item1 ! = DateTime . MinValue ;
if ( request . DisableFirstEpisode )
{
return i . Item1 ! = DateTime . MinValue ;
}
if ( alwaysEnableFirstEpisode | | i . Item1 ! = DateTime . MinValue )
{
anyFound = true ;
return true ;
}
if ( ! anyFound & & i . Item1 = = DateTime . MinValue )
{
return true ;
}
return false ;
} )
. Select ( i = > i . Item2 ( ) )
. Where ( i = > i ! = null ) ;
@ -67,6 +67,7 @@ namespace Jellyfin.Api.Controllers
/// <param name="enableImageTypes">Optional. The image types to include in the output.</param>
/// <param name="enableUserData">Optional. Include user data.</param>
/// <param name="enableTotalRecordCount">Whether to enable the total records count. Defaults to true.</param>
/// <param name="disableFirstEpisode">Whether to disable sending the first episode in a series as next up.</param>
/// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the next up episodes.</returns>
[HttpGet("NextUp")]
[ProducesResponseType(StatusCodes.Status200OK)]
@ -81,7 +82,8 @@ namespace Jellyfin.Api.Controllers
[FromQuery] int? imageTypeLimit ,
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType [ ] enableImageTypes ,
[FromQuery] bool? enableUserData ,
[FromQuery] bool enableTotalRecordCount = true )
[FromQuery] bool enableTotalRecordCount = true ,
[FromQuery] bool disableFirstEpisode = false )
{
var options = new DtoOptions { Fields = fields }
. AddClientFields ( Request )
@ -95,7 +97,8 @@ namespace Jellyfin.Api.Controllers
SeriesId = seriesId ,
StartIndex = startIndex ,
UserId = userId ? ? Guid . Empty ,
EnableTotalRecordCount = enableTotalRecordCount
EnableTotalRecordCount = enableTotalRecordCount ,
DisableFirstEpisode = disableFirstEpisode
} ,
options ) ;
@ -64,10 +64,16 @@ namespace MediaBrowser.Model.Querying
public bool EnableTotalRecordCount { get ; set ; }
/// <summary>
/// Gets or sets a value indicating whether do disable sending first episode as next up.
/// </summary>
public bool DisableFirstEpisode { get ; set ; }
public NextUpQuery ( )
{
EnableImageTypes = Array . Empty < ImageType > ( ) ;
EnableTotalRecordCount = true ;
DisableFirstEpisode = false ;
}
}
}