diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-01-07 15:54:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-07 15:54:56 -0500 |
| commit | c2cb9c1a7ce6d6239ec9335b9cf22c7aecf57b38 (patch) | |
| tree | b9387487e0adab9734322463600f45bd038b99f9 | |
| parent | 16c08af1783baa7ee29833e7e4f50c3e2108f359 (diff) | |
| parent | b738d560bf54577618ccfeeb6d363d789042b68f (diff) | |
Merge pull request #2385 from MediaBrowser/dev
Dev
13 files changed, 45 insertions, 24 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index a6119f155..06704bafa 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -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) diff --git a/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs index 180f6aba7..90bb2f5c0 100644 --- a/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -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); diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs index 8027ce2dd..05d71214e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs @@ -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 }; diff --git a/Emby.Server.Implementations/Localization/iso6392.txt b/Emby.Server.Implementations/Localization/iso6392.txt index 665a5375e..5616d41bc 100644 --- a/Emby.Server.Implementations/Localization/iso6392.txt +++ b/Emby.Server.Implementations/Localization/iso6392.txt @@ -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 diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 0e0a22c39..58046454e 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -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, diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 4c9d6b69d..97072115d 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -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) { } diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index cd8d05996..e922094ad 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -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); diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index e9e3c33c0..ab0bfd502 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -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; } diff --git a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs index 1216ae352..42ba709ab 100644 --- a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs +++ b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs @@ -65,7 +65,7 @@ namespace MediaBrowser.Controller.Channels Name = id, Id = id, ReadAtNativeFramerate = ReadAtNativeFramerate, - SupportsDirectStream = Protocol == MediaProtocol.File, + SupportsDirectStream = false, SupportsDirectPlay = SupportsDirectPlay }; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 9e32fd199..c8f49820f 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -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 = { '?', '/', '&' }; diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index 15af0888d..f5af7d5c6 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -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; diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs index eaffc12d7..15f9853ec 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs @@ -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; diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index ea2b29938..7afb140ac 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -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>
|
