diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 923af3816..dc085dab9 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1522,6 +1522,10 @@ namespace MediaBrowser.Api.Playback { request.LiveStreamId = val; } + else if (i == 24) + { + // Duplicating ItemId because of MediaMonkey + } } } diff --git a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs index 3d7ae8cc4..246c23462 100644 --- a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs +++ b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs @@ -638,6 +638,17 @@ namespace MediaBrowser.Dlna.ContentDirectory Guid itemId; StubType? stubType = null; + // After using PlayTo, MediaMonkey sends a request to the server trying to get item info + const string paramsSrch = "Params="; + var paramsIndex = id.IndexOf(paramsSrch, StringComparison.OrdinalIgnoreCase); + if (paramsIndex != -1) + { + id = id.Substring(paramsIndex + paramsSrch.Length); + + var parts = id.Split(';'); + id = parts[24]; + } + if (id.StartsWith("folder_", StringComparison.OrdinalIgnoreCase)) { stubType = StubType.Folder; diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index b062bc240..645c1c7d0 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -233,6 +233,11 @@ namespace MediaBrowser.Model.Dlna string liveStreamId = item.MediaSource == null ? null : item.MediaSource.LiveStreamId; list.Add(new NameValuePair("LiveStreamId", liveStreamId ?? string.Empty)); + if (isDlna) + { + list.Add(new NameValuePair("ItemId", item.ItemId)); + } + return list; } diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 334e14850..71bc9c065 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -360,7 +360,7 @@ namespace MediaBrowser.Providers.Manager // If replacing all metadata, run internet providers first if (options.ReplaceAllMetadata) { - var remoteResult = await ExecuteRemoteProviders(item, temp, logName, id, providers.OfType>(), cancellationToken) + var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType>(), cancellationToken) .ConfigureAwait(false); refreshResult.UpdateType = refreshResult.UpdateType | remoteResult.UpdateType; @@ -372,9 +372,8 @@ namespace MediaBrowser.Providers.Manager var hasLocalMetadata = false; var userDataList = new List(); - var localProviders = providers.OfType>().ToList(); - foreach (var provider in localProviders) + foreach (var provider in providers.OfType>().ToList()) { var providerName = provider.GetType().Name; Logger.Debug("Running {0} for {1}", providerName, logName); @@ -433,7 +432,7 @@ namespace MediaBrowser.Providers.Manager // Local metadata is king - if any is found don't run remote providers if (!options.ReplaceAllMetadata && (!hasLocalMetadata || options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh)) { - var remoteResult = await ExecuteRemoteProviders(item, temp, logName, id, providers.OfType>(), cancellationToken) + var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType>(), cancellationToken) .ConfigureAwait(false); refreshResult.UpdateType = refreshResult.UpdateType | remoteResult.UpdateType; @@ -447,17 +446,15 @@ namespace MediaBrowser.Providers.Manager if (providers.Any(i => !(i is ICustomMetadataProvider))) { - // If no local providers and doing a full refresh, take data from item itself - if (options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh && - localProviders.Count == 0 && - refreshResult.UpdateType > ItemUpdateType.None) - { - // TODO: If the new metadata from above has some blank data, this can cause old data to get filled into those empty fields - MergeData(item, temp, new List(), false, true); - } - if (refreshResult.UpdateType > ItemUpdateType.None) { + // If no local metadata, take data from item itself + if (!hasLocalMetadata) + { + // TODO: If the new metadata from above has some blank data, this can cause old data to get filled into those empty fields + MergeData(item, temp, new List(), false, true); + } + MergeData(temp, item, item.LockedFields, true, true); } } @@ -529,7 +526,7 @@ namespace MediaBrowser.Providers.Manager return new TItemType(); } - private async Task ExecuteRemoteProviders(TItemType item, TItemType temp, string logName, TIdType id, IEnumerable> providers, CancellationToken cancellationToken) + private async Task ExecuteRemoteProviders(TItemType temp, string logName, TIdType id, IEnumerable> providers, CancellationToken cancellationToken) { var refreshResult = new RefreshResult(); diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index f464dad4b..009fc1187 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -1432,7 +1432,7 @@ "MyPreferencesWelcomeMessage2": "Would you like to set your preferences now?", "ToAccessPreferencesHelp": "To access your preferences later, click your user icon in the top right header and select My Preferences.", "HeaderViewStyles": "View Styles", - "LabelSelectViewStyles": "Enable rich presentations for:", + "LabelSelectViewStyles": "Enable enhanced presentations for:", "LabelSelectViewStylesHelp": "If enabled, views will be built with metadata to offer categories such as Suggestions, Latest, Genres, and more. If disabled, they'll be displayed with simple folders.", "TabPhotos": "Photos", "TabVideos": "Videos"