mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 13:10:45 +02:00
commit
c2cb9c1a7c
|
@ -3368,9 +3368,9 @@ namespace Emby.Server.Implementations.Data
|
|||
}
|
||||
}
|
||||
|
||||
if (query.SimilarTo != null)
|
||||
if (query.SimilarTo != null && query.MinSimilarityScore > 0)
|
||||
{
|
||||
whereClauses.Add("SimilarityScore > 0");
|
||||
whereClauses.Add("SimilarityScore > " + (query.MinSimilarityScore - 1).ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
if (query.IsFolder.HasValue)
|
||||
|
|
|
@ -100,7 +100,12 @@ namespace Emby.Server.Implementations.Intros
|
|||
|
||||
if (trailerTypes.Count > 0)
|
||||
{
|
||||
var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery
|
||||
if (trailerTypes.Count >= 5)
|
||||
{
|
||||
trailerTypes.Clear();
|
||||
}
|
||||
|
||||
var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
IncludeItemTypes = new[] { typeof(Trailer).Name },
|
||||
TrailerTypes = trailerTypes.ToArray(),
|
||||
|
@ -111,7 +116,8 @@ namespace Emby.Server.Implementations.Intros
|
|||
|
||||
// Account for duplicates by imdb id, since the database doesn't support this yet
|
||||
Limit = config.TrailerLimit * 2,
|
||||
SourceTypes = sourceTypes.ToArray()
|
||||
SourceTypes = sourceTypes.ToArray(),
|
||||
MinSimilarityScore = 0
|
||||
|
||||
}).Where(i => string.IsNullOrWhiteSpace(i.GetProviderId(MetadataProviders.Imdb)) || !string.Equals(i.GetProviderId(MetadataProviders.Imdb), item.GetProviderId(MetadataProviders.Imdb), StringComparison.OrdinalIgnoreCase)).Take(config.TrailerLimit);
|
||||
|
||||
|
|
|
@ -155,7 +155,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
ReadAtNativeFramerate = false,
|
||||
|
||||
Id = channel.Path.GetMD5().ToString("N"),
|
||||
IsInfiniteStream = true
|
||||
IsInfiniteStream = true,
|
||||
SupportsDirectStream = false
|
||||
};
|
||||
|
||||
return new List<MediaSourceInfo> { mediaSource };
|
||||
|
|
|
@ -137,6 +137,7 @@ fon|||Fon|fon
|
|||
fre|fra|fr|French|français
|
||||
frm|||French, Middle (ca.1400-1600)|français moyen (1400-1600)
|
||||
fro|||French, Old (842-ca.1400)|français ancien (842-ca.1400)
|
||||
frc||fr-ca|French (Canada)|french
|
||||
frr|||Northern Frisian|frison septentrional
|
||||
frs|||Eastern Frisian|frison oriental
|
||||
fry||fy|Western Frisian|frison occidental
|
||||
|
|
|
@ -1885,7 +1885,7 @@ namespace MediaBrowser.Api.Playback
|
|||
request.AudioCodec = InferAudioCodec(url);
|
||||
}
|
||||
|
||||
var state = new StreamState(MediaSourceManager, Logger)
|
||||
var state = new StreamState(MediaSourceManager, Logger, TranscodingJobType)
|
||||
{
|
||||
Request = request,
|
||||
RequestedUrl = url,
|
||||
|
|
|
@ -309,13 +309,6 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected bool IsLiveStream(StreamState state)
|
||||
{
|
||||
var isLiveStream = (state.RunTimeTicks ?? 0) == 0;
|
||||
|
||||
return isLiveStream;
|
||||
}
|
||||
|
||||
public BaseHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IAuthorizationContext authorizationContext) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, authorizationContext)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -521,7 +521,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
|
||||
builder.AppendLine("#EXTM3U");
|
||||
|
||||
var isLiveStream = IsLiveStream(state);
|
||||
var isLiveStream = state.IsSegmentedLiveStream;
|
||||
|
||||
var queryStringIndex = Request.RawUrl.IndexOf('?');
|
||||
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);
|
||||
|
|
|
@ -89,17 +89,25 @@ namespace MediaBrowser.Api.Playback
|
|||
return 10;
|
||||
}
|
||||
|
||||
if (!RunTimeTicks.HasValue)
|
||||
if (IsSegmentedLiveStream)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSegmentedLiveStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
|
||||
}
|
||||
}
|
||||
|
||||
public int HlsListSize
|
||||
{
|
||||
get
|
||||
|
@ -119,8 +127,9 @@ namespace MediaBrowser.Api.Playback
|
|||
public List<string> SupportedAudioCodecs { get; set; }
|
||||
public List<string> SupportedVideoCodecs { get; set; }
|
||||
public string UserAgent { get; set; }
|
||||
public TranscodingJobType TranscodingType { get; set; }
|
||||
|
||||
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger)
|
||||
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType)
|
||||
{
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
_logger = logger;
|
||||
|
@ -128,6 +137,7 @@ namespace MediaBrowser.Api.Playback
|
|||
SupportedVideoCodecs = new List<string>();
|
||||
PlayableStreamFileNames = new List<string>();
|
||||
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
TranscodingType = transcodingType;
|
||||
}
|
||||
|
||||
public string InputAudioSync { get; set; }
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace MediaBrowser.Controller.Channels
|
|||
Name = id,
|
||||
Id = id,
|
||||
ReadAtNativeFramerate = ReadAtNativeFramerate,
|
||||
SupportsDirectStream = Protocol == MediaProtocol.File,
|
||||
SupportsDirectStream = false,
|
||||
SupportsDirectPlay = SupportsDirectPlay
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
ImageInfos = new List<ItemImageInfo>();
|
||||
InheritedTags = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
SourceType = SourceType.Library;
|
||||
}
|
||||
|
||||
public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
|
||||
|
|
|
@ -160,6 +160,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
public DateTime? MinDateLastSaved { get; set; }
|
||||
|
||||
public DtoOptions DtoOptions { get; set; }
|
||||
public int MinSimilarityScore { get; set; }
|
||||
|
||||
public bool HasField(ItemFields name)
|
||||
{
|
||||
|
@ -197,6 +198,8 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public InternalItemsQuery()
|
||||
{
|
||||
MinSimilarityScore = 1;
|
||||
|
||||
GroupByPresentationUniqueKey = true;
|
||||
EnableTotalRecordCount = true;
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@ using System;
|
|||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
|
||||
namespace MediaBrowser.Providers.MediaInfo
|
||||
|
@ -35,6 +32,8 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
ICustomMetadataProvider<Trailer>,
|
||||
ICustomMetadataProvider<Video>,
|
||||
ICustomMetadataProvider<Audio>,
|
||||
ICustomMetadataProvider<AudioPodcast>,
|
||||
ICustomMetadataProvider<AudioBook>,
|
||||
IHasItemChangeMonitor,
|
||||
IHasOrder,
|
||||
IForcedProvider,
|
||||
|
@ -100,6 +99,16 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
return FetchAudioInfo(item, cancellationToken);
|
||||
}
|
||||
|
||||
public Task<ItemUpdateType> FetchAsync(AudioPodcast item, MetadataRefreshOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
return FetchAudioInfo(item, cancellationToken);
|
||||
}
|
||||
|
||||
public Task<ItemUpdateType> FetchAsync(AudioBook item, MetadataRefreshOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
return FetchAudioInfo(item, cancellationToken);
|
||||
}
|
||||
|
||||
public FFProbeProvider(ILogger logger, IIsoManager isoManager, IMediaEncoder mediaEncoder, IItemRepository itemRepo, IBlurayExaminer blurayExaminer, ILocalizationManager localization, IApplicationPaths appPaths, IJsonSerializer json, IEncodingManager encodingManager, IFileSystem fileSystem, IServerConfigurationManager config, ISubtitleManager subtitleManager, IChapterManager chapterManager, ILibraryManager libraryManager)
|
||||
{
|
||||
_logger = logger;
|
||||
|
|
|
@ -849,9 +849,6 @@
|
|||
<Content Include="dashboard-ui\dashboard\autoorganizelog.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\externalplayer.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\favorites.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
Loading…
Reference in a new issue