Use guid for seriesId API parameter
This commit is contained in:
parent
c7edf8b565
commit
bef4256d47
|
@ -43,9 +43,9 @@ namespace Emby.Server.Implementations.TV
|
|||
}
|
||||
|
||||
string presentationUniqueKey = null;
|
||||
if (!string.IsNullOrEmpty(query.SeriesId))
|
||||
if (query.SeriesId.HasValue && !query.SeriesId.Value.Equals(default))
|
||||
{
|
||||
if (_libraryManager.GetItemById(query.SeriesId) is Series series)
|
||||
if (_libraryManager.GetItemById(query.SeriesId.Value) is Series series)
|
||||
{
|
||||
presentationUniqueKey = GetUniqueSeriesKey(series);
|
||||
}
|
||||
|
@ -93,9 +93,9 @@ namespace Emby.Server.Implementations.TV
|
|||
|
||||
string presentationUniqueKey = null;
|
||||
int? limit = null;
|
||||
if (!string.IsNullOrEmpty(request.SeriesId))
|
||||
if (request.SeriesId.HasValue && !request.SeriesId.Value.Equals(default))
|
||||
{
|
||||
if (_libraryManager.GetItemById(request.SeriesId) is Series series)
|
||||
if (_libraryManager.GetItemById(request.SeriesId.Value) is Series series)
|
||||
{
|
||||
presentationUniqueKey = GetUniqueSeriesKey(series);
|
||||
limit = 1;
|
||||
|
@ -153,7 +153,7 @@ namespace Emby.Server.Implementations.TV
|
|||
|
||||
// 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 alwaysEnableFirstEpisode = request.SeriesId.HasValue && !request.SeriesId.Value.Equals(default);
|
||||
var anyFound = false;
|
||||
|
||||
return allNextUp
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Jellyfin.Api.Controllers
|
|||
[FromQuery] int? startIndex,
|
||||
[FromQuery] int? limit,
|
||||
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
||||
[FromQuery] string? seriesId,
|
||||
[FromQuery] Guid? seriesId,
|
||||
[FromQuery] Guid? parentId,
|
||||
[FromQuery] bool? enableImages,
|
||||
[FromQuery] int? imageTypeLimit,
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace MediaBrowser.Model.Querying
|
|||
/// Gets or sets the series id.
|
||||
/// </summary>
|
||||
/// <value>The series id.</value>
|
||||
public string SeriesId { get; set; }
|
||||
public Guid? SeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start index. Use for paging.
|
||||
|
|
Loading…
Reference in New Issue
Block a user