mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
WIP porting new Repository structure
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -1044,7 +1045,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return PlayAccess.Full;
|
||||
}
|
||||
|
||||
public virtual List<MediaStream> GetMediaStreams()
|
||||
public virtual IReadOnlyList<MediaStream> GetMediaStreams()
|
||||
{
|
||||
return MediaSourceManager.GetMediaStreams(new MediaStreamQuery
|
||||
{
|
||||
@@ -1057,7 +1058,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual List<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
|
||||
public virtual IReadOnlyList<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
|
||||
{
|
||||
if (SourceType == SourceType.Channel)
|
||||
{
|
||||
@@ -1091,7 +1092,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return 1;
|
||||
}).ThenBy(i => i.Video3DFormat.HasValue ? 1 : 0)
|
||||
.ThenByDescending(i => i, new MediaSourceWidthComparator())
|
||||
.ToList();
|
||||
.ToImmutableList();
|
||||
}
|
||||
|
||||
protected virtual IEnumerable<(BaseItem Item, MediaSourceType MediaSourceType)> GetAllItemsForMediaSources()
|
||||
@@ -2527,7 +2528,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="children">Media children.</param>
|
||||
/// <returns><c>true</c> if the rating was updated; otherwise <c>false</c>.</returns>
|
||||
public bool UpdateRatingToItems(IList<BaseItem> children)
|
||||
public bool UpdateRatingToItems(IReadOnlyList<BaseItem> children)
|
||||
{
|
||||
var currentOfficialRating = OfficialRating;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user