mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Add media segments API (#12345)
* Added Media segment manager * Added "HasSegments" to MediaSourceInfo when requesting though baseitem * Fixed ordering of Media Segements * Added media segment API controller * Added .ConfigureAwait(false) on media segments manager * renamed MediaSegmentsController removed empty route * Added Model layer for Media Segments Fixed review comments Media segments * Updated media segment naming refactored api and manager usage * Added mediaSegment type filter * Fixed codesmell * Fixed naming and typos * Added EF Migration * Added Identity Generation for MediaSegments Made mediasegment filter optional * Fixed optional filter parameter * refactored segment namespace * Added SegmentProviderId to MediaSegment * Media segment comment indentation * Added MediaSegmentManager query notracking
This commit is contained in:
@@ -487,6 +487,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public static IMediaSourceManager MediaSourceManager { get; set; }
|
||||
|
||||
public static IMediaSegmentManager MediaSegmentManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the forced sort.
|
||||
/// </summary>
|
||||
@@ -1116,7 +1118,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
RunTimeTicks = item.RunTimeTicks,
|
||||
Container = item.Container,
|
||||
Size = item.Size,
|
||||
Type = type
|
||||
Type = type,
|
||||
HasSegments = MediaSegmentManager.IsTypeSupported(item)
|
||||
&& (protocol is null or MediaProtocol.File)
|
||||
&& MediaSegmentManager.HasSegments(item.Id)
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(info.Path))
|
||||
|
||||
Reference in New Issue
Block a user