mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update cinema mode trailer selection
This commit is contained in:
parent
b293211628
commit
f308a41cab
@ -21,11 +21,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
Taglines = new List<string>();
|
Taglines = new List<string>();
|
||||||
Keywords = new List<string>();
|
Keywords = new List<string>();
|
||||||
ProductionLocations = new List<string>();
|
ProductionLocations = new List<string>();
|
||||||
TrailerTypes = new List<TrailerType>();
|
TrailerTypes = new List<TrailerType> { TrailerType.LocalTrailer };
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TrailerType> TrailerTypes { get; set; }
|
public List<TrailerType> TrailerTypes { get; set; }
|
||||||
|
|
||||||
public float? Metascore { get; set; }
|
public float? Metascore { get; set; }
|
||||||
|
|
||||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||||
@ -86,7 +86,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
var info = GetItemLookupInfo<TrailerInfo>();
|
var info = GetItemLookupInfo<TrailerInfo>();
|
||||||
|
|
||||||
info.IsLocalTrailer = TrailerTypes.Contains(TrailerType.LocalTrailer);
|
info.IsLocalTrailer = TrailerTypes.Contains(TrailerType.LocalTrailer);
|
||||||
|
|
||||||
if (!IsInMixedFolder)
|
if (!IsInMixedFolder)
|
||||||
{
|
{
|
||||||
info.Name = System.IO.Path.GetFileName(ContainingFolderPath);
|
info.Name = System.IO.Path.GetFileName(ContainingFolderPath);
|
||||||
|
@ -102,10 +102,15 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||||||
|
|
||||||
if (trailerTypes.Count > 0)
|
if (trailerTypes.Count > 0)
|
||||||
{
|
{
|
||||||
|
var excludeTrailerTypes = Enum.GetNames(typeof(TrailerType))
|
||||||
|
.Select(i => (TrailerType)Enum.Parse(typeof(TrailerType), i, true))
|
||||||
|
.Except(trailerTypes)
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery
|
var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Trailer).Name },
|
IncludeItemTypes = new[] { typeof(Trailer).Name },
|
||||||
TrailerTypes = trailerTypes.ToArray()
|
ExcludeTrailerTypes = excludeTrailerTypes
|
||||||
});
|
});
|
||||||
|
|
||||||
candidates.AddRange(trailerResult.Select(i => new ItemWithTrailer
|
candidates.AddRange(trailerResult.Select(i => new ItemWithTrailer
|
||||||
|
@ -2361,6 +2361,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
video.ExtraType = ExtraType.Trailer;
|
video.ExtraType = ExtraType.Trailer;
|
||||||
|
video.TrailerTypes = new List<TrailerType> { TrailerType.LocalTrailer };
|
||||||
|
|
||||||
return video;
|
return video;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
|
|
||||||
private IDbCommand _updateInheritedRatingCommand;
|
private IDbCommand _updateInheritedRatingCommand;
|
||||||
|
|
||||||
private const int LatestSchemaVersion = 55;
|
private const int LatestSchemaVersion = 56;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user