aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-04 00:48:30 -0400
committerGitHub <noreply@github.com>2016-08-04 00:48:30 -0400
commit87d7a7d85adc1f069019f2706aa34d266c22b221 (patch)
treea16199201a02a1e51fff48e0d7a21aba6977708d
parent73729ca2426234e70701c48569d23a7e1eede636 (diff)
parent6af3bf94c027ae6f9c225cd4838589525378a5d0 (diff)
Merge pull request #2018 from MediaBrowser/beta
Beta
-rw-r--r--MediaBrowser.Api/LiveTv/LiveTvService.cs5
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs13
-rw-r--r--MediaBrowser.Api/Playback/Hls/BaseHlsService.cs1
-rw-r--r--MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs2
-rw-r--r--MediaBrowser.Api/UserLibrary/ArtistsService.cs2
-rw-r--r--MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs6
-rw-r--r--MediaBrowser.Api/UserLibrary/GameGenresService.cs2
-rw-r--r--MediaBrowser.Api/UserLibrary/GenresService.cs1
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs3
-rw-r--r--MediaBrowser.Api/UserLibrary/MusicGenresService.cs2
-rw-r--r--MediaBrowser.Controller/Channels/Channel.cs5
-rw-r--r--MediaBrowser.Controller/Channels/ChannelMediaInfo.cs6
-rw-r--r--MediaBrowser.Controller/Dto/IDtoService.cs21
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs6
-rw-r--r--MediaBrowser.Controller/Entities/IHasImages.cs3
-rw-r--r--MediaBrowser.Controller/Entities/IItemByName.cs3
-rw-r--r--MediaBrowser.Controller/Entities/InternalPeopleQuery.cs2
-rw-r--r--MediaBrowser.Controller/Entities/MusicVideo.cs1
-rw-r--r--MediaBrowser.Controller/Entities/TV/Season.cs1
-rw-r--r--MediaBrowser.Controller/Entities/Trailer.cs2
-rw-r--r--MediaBrowser.Controller/Entities/UserRootFolder.cs2
-rw-r--r--MediaBrowser.Controller/Entities/UserViewBuilder.cs3
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs1
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs1
-rw-r--r--MediaBrowser.Controller/LiveTv/TimerEventInfo.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs8
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs3
-rw-r--r--MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs1
-rw-r--r--MediaBrowser.Controller/Sync/ISyncManager.cs2
-rw-r--r--MediaBrowser.Controller/Sync/ISyncRepository.cs5
-rw-r--r--MediaBrowser.Controller/Sync/SyncedItemProgress.cs2
-rw-r--r--MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs18
-rw-r--r--MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs2
-rw-r--r--MediaBrowser.Dlna/DlnaManager.cs110
-rw-r--r--MediaBrowser.Dlna/Main/DlnaEntryPoint.cs10
-rw-r--r--MediaBrowser.Dlna/Profiles/LgTvProfile.cs2
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Default.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml10
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Kodi.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml9
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml7
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml11
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml11
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml8
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml9
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml12
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml12
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml9
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml8
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml8
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml10
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml10
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Vlc.xml6
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml8
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml11
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml12
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml6
-rw-r--r--MediaBrowser.Dlna/Ssdp/SsdpHandler.cs1
-rw-r--r--MediaBrowser.LocalMetadata/BaseXmlProvider.cs1
-rw-r--r--MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs2
-rw-r--r--MediaBrowser.LocalMetadata/Savers/FolderXmlSaver.cs2
-rw-r--r--MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs2
-rw-r--r--MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs2
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs1
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs45
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs10
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs1
-rw-r--r--MediaBrowser.Model/Dto/BaseItemPerson.cs3
-rw-r--r--MediaBrowser.Model/Dto/IHasSyncInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/UserDto.cs1
-rw-r--r--MediaBrowser.Model/Dto/UserItemDataDto.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/ChannelInfoDto.cs1
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs1
-rw-r--r--MediaBrowser.Model/Session/SessionInfoDto.cs1
-rw-r--r--MediaBrowser.Providers/Folders/CollectionFolderMetadataService.cs6
-rw-r--r--MediaBrowser.Providers/Manager/MetadataService.cs8
-rw-r--r--MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs1
-rw-r--r--MediaBrowser.Providers/Movies/MovieDbProvider.cs1
-rw-r--r--MediaBrowser.Providers/Movies/MovieDbTrailerProvider.cs1
-rw-r--r--MediaBrowser.Providers/Music/FanArtAlbumProvider.cs1
-rw-r--r--MediaBrowser.Providers/Omdb/OmdbImageProvider.cs2
-rw-r--r--MediaBrowser.Providers/Omdb/OmdbProvider.cs1
-rw-r--r--MediaBrowser.Providers/TV/MissingEpisodeProvider.cs8
-rw-r--r--MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs1
-rw-r--r--MediaBrowser.Providers/TV/SeriesPostScanTask.cs1
-rw-r--r--MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs1
-rw-r--r--MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelManager.cs4
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs150
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs2
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs3
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs3
-rw-r--r--MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs7
-rw-r--r--MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs3
-rw-r--r--MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserDataManager.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs29
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs29
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs30
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs37
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs7
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs3
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs2
-rw-r--r--MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj8
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs5
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs5
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs3
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncManager.cs5
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncRepository.cs99
-rw-r--r--MediaBrowser.Server.Implementations/packages.config4
-rw-r--r--MediaBrowser.Server.Mono/Native/DbConnector.cs4
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs4
-rw-r--r--MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs2
-rw-r--r--MediaBrowser.Server.Startup.Common/Migrations/CollectionGroupingMigration.cs6
-rw-r--r--MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs6
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs7
-rw-r--r--MediaBrowser.ServerApplication/Native/DbConnector.cs4
-rw-r--r--MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs3
-rw-r--r--MediaBrowser.ServerApplication/Native/WindowsApp.cs1
-rw-r--r--MediaBrowser.ServerApplication/ServerNotifyIcon.cs65
-rw-r--r--MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs1
-rw-r--r--MediaBrowser.Tests/ConsistencyTests/TextIndexing/IndexBuilder.cs2
-rw-r--r--MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordIndex.cs3
-rw-r--r--MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrence.cs8
-rw-r--r--MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrences.cs6
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj12
-rw-r--r--MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs10
-rw-r--r--MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs1
142 files changed, 496 insertions, 699 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index c687758b72..91157cd11f 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -997,10 +997,7 @@ namespace MediaBrowser.Api.LiveTv
public async Task<object> Get(GetRecordingGroup request)
{
- var result = await _liveTvManager.GetRecordingGroups(new RecordingGroupQuery
- {
-
- }, CancellationToken.None).ConfigureAwait(false);
+ var result = await _liveTvManager.GetRecordingGroups(new RecordingGroupQuery(), CancellationToken.None).ConfigureAwait(false);
var group = result.Items.FirstOrDefault(i => string.Equals(i.Id, request.Id, StringComparison.OrdinalIgnoreCase));
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index ce3691095c..ab73aabe43 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1788,6 +1788,19 @@ namespace MediaBrowser.Api.Playback
{
state.OutputAudioCodec = "copy";
}
+ else
+ {
+ // If the user doesn't have access to transcoding, then force stream copy, regardless of whether it will be compatible or not
+ var auth = AuthorizationContext.GetAuthorizationInfo(Request);
+ if (!string.IsNullOrWhiteSpace(auth.UserId))
+ {
+ var user = UserManager.GetUserById(auth.UserId);
+ if (!user.Policy.EnableAudioPlaybackTranscoding)
+ {
+ state.OutputAudioCodec = "copy";
+ }
+ }
+ }
}
private void AttachMediaSourceInfo(StreamState state,
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index 3d8957086d..4ec14c96cb 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -3,7 +3,6 @@ using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.MediaEncoding;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Net;
diff --git a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
index 860e57b32e..2019b73c86 100644
--- a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
+++ b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
@@ -1,7 +1,5 @@
using MediaBrowser.Model.Logging;
-using ServiceStack.Web;
using System;
-using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs
index df73ef720b..ad031f483f 100644
--- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs
@@ -8,8 +8,6 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using ServiceStack;
using System.Collections.Generic;
-using System.Linq;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
index 9465d1fdc5..852a3d59ee 100644
--- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
+++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
@@ -180,9 +180,10 @@ namespace MediaBrowser.Api.UserLibrary
var result = GetItems(request, query);
+ var syncProgess = DtoService.GetSyncedItemProgress(dtoOptions);
var dtos = result.Items.Select(i =>
{
- var dto = DtoService.GetItemByNameDto(i.Item1, dtoOptions, null, user);
+ var dto = DtoService.GetItemByNameDto(i.Item1, dtoOptions, null, syncProgess, user);
if (!string.IsNullOrWhiteSpace(request.IncludeItemTypes))
{
@@ -325,7 +326,8 @@ namespace MediaBrowser.Api.UserLibrary
tuples = ibnItems.Select(i => new Tuple<BaseItem, List<BaseItem>>(i, new List<BaseItem>()));
}
- var dtos = tuples.Select(i => DtoService.GetItemByNameDto(i.Item1, dtoOptions, i.Item2, user));
+ var syncProgess = DtoService.GetSyncedItemProgress(dtoOptions);
+ var dtos = tuples.Select(i => DtoService.GetItemByNameDto(i.Item1, dtoOptions, i.Item2, syncProgess, user));
result.Items = dtos.Where(i => i != null).ToArray();
diff --git a/MediaBrowser.Api/UserLibrary/GameGenresService.cs b/MediaBrowser.Api/UserLibrary/GameGenresService.cs
index a0883f98cc..a0f3855c55 100644
--- a/MediaBrowser.Api/UserLibrary/GameGenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/GameGenresService.cs
@@ -4,11 +4,9 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
using ServiceStack;
using System;
using System.Collections.Generic;
-using System.Linq;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary
diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs
index 57c11a1fad..ec2bc6bda5 100644
--- a/MediaBrowser.Api/UserLibrary/GenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/GenresService.cs
@@ -8,7 +8,6 @@ using MediaBrowser.Model.Entities;
using ServiceStack;
using System;
using System.Collections.Generic;
-using System.Linq;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index b4d88a7f89..97a81b7909 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Controller.Collections;
-using MediaBrowser.Controller.Dto;
+using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization;
diff --git a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs b/MediaBrowser.Api/UserLibrary/MusicGenresService.cs
index 887c999411..b2eba070fc 100644
--- a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/MusicGenresService.cs
@@ -8,8 +8,6 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using ServiceStack;
using System.Collections.Generic;
-using System.Linq;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs
index 718a0d8786..e0b7204b87 100644
--- a/MediaBrowser.Controller/Channels/Channel.cs
+++ b/MediaBrowser.Controller/Channels/Channel.cs
@@ -57,10 +57,7 @@ namespace MediaBrowser.Controller.Channels
catch
{
// Already logged at lower levels
- return new QueryResult<BaseItem>
- {
-
- };
+ return new QueryResult<BaseItem>();
}
}
diff --git a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
index 9424568b45..1216ae3522 100644
--- a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
+++ b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
@@ -83,8 +83,7 @@ namespace MediaBrowser.Controller.Channels
{
var list = new List<MediaStream>();
- if (!string.IsNullOrWhiteSpace(info.VideoCodec) &&
- !string.IsNullOrWhiteSpace(info.AudioCodec))
+ if (!string.IsNullOrWhiteSpace(info.VideoCodec))
{
list.Add(new MediaStream
{
@@ -99,7 +98,10 @@ namespace MediaBrowser.Controller.Channels
BitRate = info.VideoBitrate,
AverageFrameRate = info.Framerate
});
+ }
+ if (!string.IsNullOrWhiteSpace(info.AudioCodec))
+ {
list.Add(new MediaStream
{
Type = MediaStreamType.Audio,
diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs
index e4aa466dfd..a6f807ce9d 100644
--- a/MediaBrowser.Controller/Dto/IDtoService.cs
+++ b/MediaBrowser.Controller/Dto/IDtoService.cs
@@ -1,9 +1,9 @@
-using System;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using System.Collections.Generic;
using System.Threading.Tasks;
+using MediaBrowser.Controller.Sync;
namespace MediaBrowser.Controller.Dto
{
@@ -44,14 +44,6 @@ namespace MediaBrowser.Controller.Dto
BaseItemDto GetBaseItemDto(BaseItem item, List<ItemFields> fields, User user = null, BaseItem owner = null);
/// <summary>
- /// Fills the synchronize information.
- /// </summary>
- /// <param name="tuples">The tuples.</param>
- /// <param name="options">The options.</param>
- /// <param name="user">The user.</param>
- void FillSyncInfo(IEnumerable<Tuple<BaseItem, BaseItemDto>> tuples, DtoOptions options, User user);
-
- /// <summary>
/// Gets the base item dto.
/// </summary>
/// <param name="item">The item.</param>
@@ -89,11 +81,8 @@ namespace MediaBrowser.Controller.Dto
/// <summary>
/// Gets the item by name dto.
/// </summary>
- /// <param name="item">The item.</param>
- /// <param name="options">The options.</param>
- /// <param name="taggedItems">The tagged items.</param>
- /// <param name="user">The user.</param>
- /// <returns>BaseItemDto.</returns>
- BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null);
+ BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, Dictionary<string, SyncedItemProgress> syncProgress, User user = null);
+
+ Dictionary<string, SyncedItemProgress> GetSyncedItemProgress(DtoOptions options);
}
}
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 0397e9a88e..6a7e279be8 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Common.Progress;
-using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto;
@@ -919,10 +918,7 @@ namespace MediaBrowser.Controller.Entities
catch
{
// Already logged at lower levels
- return new QueryResult<BaseItem>
- {
-
- };
+ return new QueryResult<BaseItem>();
}
}
diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs
index 2267480985..a38b7394dd 100644
--- a/MediaBrowser.Controller/Entities/IHasImages.cs
+++ b/MediaBrowser.Controller/Entities/IHasImages.cs
@@ -1,5 +1,4 @@
-using System;
-using MediaBrowser.Controller.Providers;
+using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Controller/Entities/IItemByName.cs b/MediaBrowser.Controller/Entities/IItemByName.cs
index 2ac4af1af7..b69c8bdfcc 100644
--- a/MediaBrowser.Controller/Entities/IItemByName.cs
+++ b/MediaBrowser.Controller/Entities/IItemByName.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities
{
diff --git a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs
index 05d23d9866..2ba6842ca3 100644
--- a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs
@@ -11,11 +11,13 @@ namespace MediaBrowser.Controller.Entities
public int? MaxListOrder { get; set; }
public Guid AppearsInItemId { get; set; }
public string NameContains { get; set; }
+ public SourceType[] SourceTypes { get; set; }
public InternalPeopleQuery()
{
PersonTypes = new List<string>();
ExcludePersonTypes = new List<string>();
+ SourceTypes = new SourceType[] { };
}
}
}
diff --git a/MediaBrowser.Controller/Entities/MusicVideo.cs b/MediaBrowser.Controller/Entities/MusicVideo.cs
index 7119828e26..8b749b7a5d 100644
--- a/MediaBrowser.Controller/Entities/MusicVideo.cs
+++ b/MediaBrowser.Controller/Entities/MusicVideo.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
-using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Runtime.Serialization;
diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs
index ee01c60b1b..f6ca19005b 100644
--- a/MediaBrowser.Controller/Entities/TV/Season.cs
+++ b/MediaBrowser.Controller/Entities/TV/Season.cs
@@ -1,6 +1,5 @@
using System;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Users;
using MoreLinq;
diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs
index eab5ab6794..6604be977d 100644
--- a/MediaBrowser.Controller/Entities/Trailer.cs
+++ b/MediaBrowser.Controller/Entities/Trailer.cs
@@ -2,9 +2,7 @@
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
-using System.Globalization;
using System.Runtime.Serialization;
-using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Entities
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs
index 8e6f11c2ce..4549d0d1df 100644
--- a/MediaBrowser.Controller/Entities/UserRootFolder.cs
+++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs
@@ -1,6 +1,5 @@
using System.Runtime.Serialization;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Library;
using MediaBrowser.Model.Querying;
using System;
@@ -8,7 +7,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Controller.Library;
namespace MediaBrowser.Controller.Entities
{
diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
index e2228bcaf6..11ed269317 100644
--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs
+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Channels;
-using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV;
@@ -14,12 +13,10 @@ using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Querying;
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Model.Configuration;
using MoreLinq;
namespace MediaBrowser.Controller.Entities
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index ad38b9ea5e..70bd3f081c 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -475,12 +475,6 @@ namespace MediaBrowser.Controller.Library
List<Person> GetPeopleItems(InternalPeopleQuery query);
/// <summary>
- /// Gets all people names.
- /// </summary>
- /// <returns>List&lt;System.String&gt;.</returns>
- List<PersonInfo> GetAllPeople();
-
- /// <summary>
/// Updates the people.
/// </summary>
/// <param name="item">The item.</param>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 74c9932480..c7f47b825b 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv;
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index a8c7376734..f4dba070dc 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs b/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs
index 0e1a054754..642dee3af8 100644
--- a/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Controller.LiveTv
+namespace MediaBrowser.Controller.LiveTv
{
public class TimerEventInfo
{
diff --git a/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs b/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs
index da0527eeaf..c1d1c413e8 100644
--- a/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs
+++ b/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Controller.LiveTv
+namespace MediaBrowser.Controller.LiveTv
{
public class TunerChannelMapping
{
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
index 44b7417553..844fafcdec 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
@@ -1,5 +1,4 @@
-using System.Linq;
-using MediaBrowser.Model.Dlna;
+using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Controller.MediaEncoding
{
diff --git a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
index c8a8caa917..05e82a16e7 100644
--- a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
+++ b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using System;
-using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dlna;
diff --git a/MediaBrowser.Controller/Sync/ISyncManager.cs b/MediaBrowser.Controller/Sync/ISyncManager.cs
index 8eb934eaa8..fbcb549ad8 100644
--- a/MediaBrowser.Controller/Sync/ISyncManager.cs
+++ b/MediaBrowser.Controller/Sync/ISyncManager.cs
@@ -151,7 +151,7 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns>
- QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
+ Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
/// <summary>
/// Reports the synchronize job item transfer beginning.
diff --git a/MediaBrowser.Controller/Sync/ISyncRepository.cs b/MediaBrowser.Controller/Sync/ISyncRepository.cs
index 2af09dbaad..8e9b2bf774 100644
--- a/MediaBrowser.Controller/Sync/ISyncRepository.cs
+++ b/MediaBrowser.Controller/Sync/ISyncRepository.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Model.Querying;
+using System.Collections.Generic;
+using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Sync;
using System.Threading.Tasks;
@@ -74,6 +75,6 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns>
- QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
+ Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
}
}
diff --git a/MediaBrowser.Controller/Sync/SyncedItemProgress.cs b/MediaBrowser.Controller/Sync/SyncedItemProgress.cs
index edb42eb0f1..0fd929eb18 100644
--- a/MediaBrowser.Controller/Sync/SyncedItemProgress.cs
+++ b/MediaBrowser.Controller/Sync/SyncedItemProgress.cs
@@ -4,7 +4,7 @@ namespace MediaBrowser.Controller.Sync
{
public class SyncedItemProgress
{
- public string ItemId { get; set; }
+ public double Progress { get; set; }
public SyncJobItemStatus Status { get; set; }
}
}
diff --git a/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs b/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs
index a8e778751d..06856989f3 100644
--- a/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs
+++ b/MediaBrowser.Dlna/Channels/DlnaChannelFactory.cs
@@ -1,20 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using MediaBrowser.Common.Net;
-using MediaBrowser.Controller.Channels;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.Dlna;
-using MediaBrowser.Controller.Providers;
-using MediaBrowser.Dlna.ContentDirectory;
-using MediaBrowser.Dlna.PlayTo;
-using MediaBrowser.Model.Channels;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Logging;
-
-namespace MediaBrowser.Dlna.Channels
+namespace MediaBrowser.Dlna.Channels
{
//public class DlnaChannel : IChannel, IDisposable
//{
diff --git a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
index 233ec9546f..9b5030325a 100644
--- a/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
+++ b/MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs
@@ -602,7 +602,7 @@ namespace MediaBrowser.Dlna.ContentDirectory
id = id.Substring(paramsIndex + paramsSrch.Length);
var parts = id.Split(';');
- id = parts[24];
+ id = parts[23];
}
if (id.StartsWith("folder_", StringComparison.OrdinalIgnoreCase))
diff --git a/MediaBrowser.Dlna/DlnaManager.cs b/MediaBrowser.Dlna/DlnaManager.cs
index b4127a91f1..42e976ce8b 100644
--- a/MediaBrowser.Dlna/DlnaManager.cs
+++ b/MediaBrowser.Dlna/DlnaManager.cs
@@ -29,7 +29,7 @@ namespace MediaBrowser.Dlna
private readonly IJsonSerializer _jsonSerializer;
private readonly IServerApplicationHost _appHost;
- private readonly Dictionary<string, DeviceProfile> _profiles = new Dictionary<string, DeviceProfile>(StringComparer.Ordinal);
+ private readonly Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>> _profiles = new Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>>(StringComparer.Ordinal);
public DlnaManager(IXmlSerializer xmlSerializer,
IFileSystem fileSystem,
@@ -45,50 +45,40 @@ namespace MediaBrowser.Dlna
_appHost = appHost;
}
- public IEnumerable<DeviceProfile> GetProfiles()
+ public void InitProfiles()
{
- ExtractProfilesIfNeeded();
+ try
+ {
+ ExtractSystemProfiles();
+ LoadProfiles();
+ }
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error extracting DLNA profiles.", ex);
+ }
+ }
+ private void LoadProfiles()
+ {
var list = GetProfiles(UserProfilesPath, DeviceProfileType.User)
.OrderBy(i => i.Name)
.ToList();
list.AddRange(GetProfiles(SystemProfilesPath, DeviceProfileType.System)
.OrderBy(i => i.Name));
-
- return list;
}
- private bool _extracted;
- private readonly object _syncLock = new object();
- private void ExtractProfilesIfNeeded()
+ public IEnumerable<DeviceProfile> GetProfiles()
{
- if (!_extracted)
+ lock (_profiles)
{
- lock (_syncLock)
- {
- if (!_extracted)
- {
- try
- {
- ExtractSystemProfiles();
- }
- catch (Exception ex)
- {
- _logger.ErrorException("Error extracting DLNA profiles.", ex);
- }
-
- _extracted = true;
- }
-
- }
+ var list = _profiles.Values.ToList();
+ return list.Select(i => i.Item2).OrderBy(i => i.Name);
}
}
public DeviceProfile GetDefaultProfile()
{
- ExtractProfilesIfNeeded();
-
return new DefaultProfile();
}
@@ -304,20 +294,20 @@ namespace MediaBrowser.Dlna
{
lock (_profiles)
{
- DeviceProfile profile;
- if (_profiles.TryGetValue(path, out profile))
+ Tuple<InternalProfileInfo, DeviceProfile> profileTuple;
+ if (_profiles.TryGetValue(path, out profileTuple))
{
- return profile;
+ return profileTuple.Item2;
}
try
{
- profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
+ var profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
profile.Id = path.ToLower().GetMD5().ToString("N");
profile.ProfileType = type;
- _profiles[path] = profile;
+ _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
return profile;
}
@@ -344,12 +334,14 @@ namespace MediaBrowser.Dlna
private IEnumerable<InternalProfileInfo> GetProfileInfosInternal()
{
- ExtractProfilesIfNeeded();
-
- return GetProfileInfos(UserProfilesPath, DeviceProfileType.User)
- .Concat(GetProfileInfos(SystemProfilesPath, DeviceProfileType.System))
- .OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1)
- .ThenBy(i => i.Info.Name);
+ lock (_profiles)
+ {
+ var list = _profiles.Values.ToList();
+ return list
+ .Select(i => i.Item1)
+ .OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1)
+ .ThenBy(i => i.Info.Name);
+ }
}
public IEnumerable<DeviceProfileInfo> GetProfileInfos()
@@ -363,17 +355,7 @@ namespace MediaBrowser.Dlna
{
return _fileSystem.GetFiles(path)
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
- .Select(i => new InternalProfileInfo
- {
- Path = i.FullName,
-
- Info = new DeviceProfileInfo
- {
- Id = i.FullName.ToLower().GetMD5().ToString("N"),
- Name = _fileSystem.GetFileNameWithoutExtension(i),
- Type = type
- }
- })
+ .Select(i => GetInternalProfileInfo(i, type))
.ToList();
}
catch (DirectoryNotFoundException)
@@ -382,6 +364,21 @@ namespace MediaBrowser.Dlna
}
}
+ private InternalProfileInfo GetInternalProfileInfo(FileSystemMetadata file, DeviceProfileType type)
+ {
+ return new InternalProfileInfo
+ {
+ Path = file.FullName,
+
+ Info = new DeviceProfileInfo
+ {
+ Id = file.FullName.ToLower().GetMD5().ToString("N"),
+ Name = _fileSystem.GetFileNameWithoutExtension(file),
+ Type = type
+ }
+ };
+ }
+
private void ExtractSystemProfiles()
{
var assembly = GetType().Assembly;
@@ -427,6 +424,11 @@ namespace MediaBrowser.Dlna
}
_fileSystem.DeleteFile(info.Path);
+
+ lock (_profiles)
+ {
+ _profiles.Remove(info.Path);
+ }
}
public void CreateProfile(DeviceProfile profile)
@@ -441,7 +443,7 @@ namespace MediaBrowser.Dlna
var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
var path = Path.Combine(UserProfilesPath, newFilename);
- SaveProfile(profile, path);
+ SaveProfile(profile, path, DeviceProfileType.User);
}
public void UpdateProfile(DeviceProfile profile)
@@ -468,14 +470,14 @@ namespace MediaBrowser.Dlna
_fileSystem.DeleteFile(current.Path);
}
- SaveProfile(profile, path);
+ SaveProfile(profile, path, DeviceProfileType.User);
}
- private void SaveProfile(DeviceProfile profile, string path)
+ private void SaveProfile(DeviceProfile profile, string path, DeviceProfileType type)
{
lock (_profiles)
{
- _profiles[path] = profile;
+ _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
}
_xmlSerializer.SerializeToFile(profile, path);
}
diff --git a/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs b/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs
index b9d9944eca..9f2726b315 100644
--- a/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs
+++ b/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs
@@ -14,10 +14,8 @@ using MediaBrowser.Dlna.Ssdp;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Controller.MediaEncoding;
-using MediaBrowser.Dlna.Channels;
namespace MediaBrowser.Dlna.Main
{
@@ -82,6 +80,8 @@ namespace MediaBrowser.Dlna.Main
public void Run()
{
+ ((DlnaManager)_dlnaManager).InitProfiles();
+
ReloadComponents();
_config.ConfigurationUpdated += _config_ConfigurationUpdated;
@@ -242,9 +242,9 @@ namespace MediaBrowser.Dlna.Main
var services = new List<string>
{
- "upnp:rootdevice",
- "urn:schemas-upnp-org:device:MediaServer:1",
- "urn:schemas-upnp-org:service:ContentDirectory:1",
+ "upnp:rootdevice",
+ "urn:schemas-upnp-org:device:MediaServer:1",
+ "urn:schemas-upnp-org:service:ContentDirectory:1",
"urn:schemas-upnp-org:service:ConnectionManager:1",
"urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1",
"uuid:" + udn
diff --git a/MediaBrowser.Dlna/Profiles/LgTvProfile.cs b/MediaBrowser.Dlna/Profiles/LgTvProfile.cs
index 202ea76fbf..ab9a6a51ff 100644
--- a/MediaBrowser.Dlna/Profiles/LgTvProfile.cs
+++ b/MediaBrowser.Dlna/Profiles/LgTvProfile.cs
@@ -38,7 +38,7 @@ namespace MediaBrowser.Dlna.Profiles
new TranscodingProfile
{
Container = "ts",
- AudioCodec = "ac3",
+ AudioCodec = "ac3,aac,mp3",
VideoCodec = "h264",
Type = DlnaProfileType.Video
},
diff --git a/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml b/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml
index 38b7414549..08fec73db2 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml
@@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Default.xml b/MediaBrowser.Dlna/Profiles/Xml/Default.xml
index 9364f464b6..8fae686325 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Default.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Default.xml
@@ -33,9 +33,9 @@
<DirectPlayProfile container="avi,mp4" type="Video" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
index 5b8ff5d684..b15378276b 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
@@ -37,9 +37,9 @@
<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml b/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
index 561abe0e5c..27192847d3 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
@@ -39,8 +39,8 @@
<DirectPlayProfile container="jpeg,jpg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
@@ -51,11 +51,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Audio" codec="mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
index b2d2676575..678c31f80c 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
@@ -43,9 +43,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
@@ -57,6 +57,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video">
<Conditions>
@@ -65,16 +66,19 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,he-aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Kodi.xml b/MediaBrowser.Dlna/Profiles/Xml/Kodi.xml
index d0985e1350..79c0dd3033 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Kodi.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Kodi.xml
@@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
index 1147aa2993..b74ecd1cec 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
@@ -42,9 +42,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -61,6 +61,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="h264">
<Conditions>
@@ -69,11 +70,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,aac,mp3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
index 1e6db99b12..04dc262d89 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
@@ -37,9 +37,9 @@
<DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml b/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml
index 679aa26bd6..7b3aa03e82 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml
@@ -43,9 +43,9 @@
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
index 256443093f..cbc275eb17 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
@@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -69,6 +69,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml b/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml
index 3d50b1724c..bfdeb7cb59 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml
@@ -38,9 +38,9 @@
<DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
@@ -51,6 +51,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video">
<Conditions>
@@ -58,22 +59,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Audio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Audio" codec="mp3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="320000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
index 967538bdf0..c806c1238b 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
@@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -70,6 +70,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="mpeg4">
<Conditions>
@@ -78,6 +79,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="h264">
<Conditions>
@@ -87,6 +89,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions>
@@ -95,11 +98,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,dca,aac,mp3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
index 49f4759b98..e304043625 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
@@ -48,9 +48,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -67,11 +67,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
index 41a996b663..c355057f89 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
@@ -47,9 +47,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -68,16 +68,19 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
index ed66118d32..e045d130bf 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
@@ -45,9 +45,9 @@
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -66,6 +66,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="mpeg2video">
<Conditions>
@@ -74,6 +75,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video">
<Conditions>
@@ -81,22 +83,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
index 88ff6047fd..3ccceeaaab 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
@@ -48,9 +48,9 @@
<DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -69,6 +69,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="mpeg2video">
<Conditions>
@@ -77,6 +78,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video">
<Conditions>
@@ -84,22 +86,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
index fb06ab0acf..a0b992283c 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
@@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -69,16 +69,19 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
index 67526f5f20..52f51c59ed 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
@@ -55,9 +55,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -74,11 +74,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml
index 8502377565..2a6f179df3 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml
@@ -55,9 +55,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -74,11 +74,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
index 11dc332398..9512a61436 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
@@ -45,9 +45,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -66,22 +66,26 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="wmapro">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml
index 5a763006b1..914a6155a6 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml
@@ -45,9 +45,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -66,22 +66,26 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="wmapro">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml b/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml
index a007a4aa32..9dfacdbc63 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml
@@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
index 6f245202d4..ed0ba41944 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
@@ -51,9 +51,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
@@ -70,11 +70,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
index bb937101d3..982a375f65 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
@@ -46,9 +46,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov">
@@ -71,6 +71,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="h264">
<Conditions>
@@ -79,6 +80,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="10240000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions>
@@ -87,17 +89,20 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
index 3816769442..38ca3b2f7e 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
@@ -46,9 +46,9 @@
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov">
@@ -67,6 +67,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="h264">
<Conditions>
@@ -77,6 +78,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions>
@@ -87,23 +89,27 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="Video">
<Conditions>
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="aac">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
</Conditions>
+ <ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
index ebc5e83664..d729d6d547 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
@@ -43,9 +43,9 @@
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs
index 0e791eb981..720ea71a08 100644
--- a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs
+++ b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs
@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Dlna;
using MediaBrowser.Dlna.Server;
using MediaBrowser.Model.Logging;
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
diff --git a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs b/MediaBrowser.LocalMetadata/BaseXmlProvider.cs
index 4b64295ea6..0289ffb083 100644
--- a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs
+++ b/MediaBrowser.LocalMetadata/BaseXmlProvider.cs
@@ -1,6 +1,5 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
-using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs
index 31a2901b72..b307ded972 100644
--- a/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs
+++ b/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs
@@ -65,7 +65,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item);
- XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem);
+ XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
}
/// <summary>
diff --git a/MediaBrowser.LocalMetadata/Savers/FolderXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/FolderXmlSaver.cs
index 056bd49a86..8dad16fc24 100644
--- a/MediaBrowser.LocalMetadata/Savers/FolderXmlSaver.cs
+++ b/MediaBrowser.LocalMetadata/Savers/FolderXmlSaver.cs
@@ -79,7 +79,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item);
- XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem);
+ XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
}
/// <summary>
diff --git a/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs
index dea4721afa..ddfaedba68 100644
--- a/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs
+++ b/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs
@@ -72,7 +72,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item);
- XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem);
+ XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
}
/// <summary>
diff --git a/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs b/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
index b15b8d15dd..e435c00f23 100644
--- a/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
+++ b/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
@@ -40,7 +40,7 @@ namespace MediaBrowser.MediaEncoding.BdInfo
outputStream.RunTimeTicks = TimeSpan.FromSeconds(playlist.TotalLength).Ticks;
- var mediaStreams = new List<MediaStream> { };
+ var mediaStreams = new List<MediaStream>();
foreach (var stream in playlist.SortedStreams)
{
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index 0866bd255a..50df08e66a 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.MediaEncoding.Encoder
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 897684b732..25b80ee92f 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -500,7 +500,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
RedirectStandardOutput = true,
//RedirectStandardError = true,
- RedirectStandardInput = true,
+ RedirectStandardInput = false,
FileName = FFProbePath,
Arguments = string.Format(args,
probeSizeArgument, inputPath).Trim(),
@@ -514,7 +514,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
- using (var processWrapper = new ProcessWrapper(process, this, _logger))
+ using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{
await _ffProbeResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
@@ -630,7 +630,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Must consume both or ffmpeg may hang due to deadlocks. See comments below.
//RedirectStandardOutput = true,
RedirectStandardError = true,
- RedirectStandardInput = true,
+ RedirectStandardInput = false,
FileName = FFMpegPath,
Arguments = string.Format(args, probeSizeArgument, inputPath, videoStream.Index.ToString(CultureInfo.InvariantCulture)).Trim(),
@@ -644,7 +644,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
var idetFoundInterlaced = false;
- using (var processWrapper = new ProcessWrapper(process, this, _logger))
+ using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{
try
{
@@ -898,14 +898,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
FileName = FFMpegPath,
Arguments = args,
WindowStyle = ProcessWindowStyle.Hidden,
- ErrorDialog = false,
- RedirectStandardInput = true
+ ErrorDialog = false
}
};
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
- using (var processWrapper = new ProcessWrapper(process, this, _logger))
+ using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{
await resourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
@@ -1010,7 +1009,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
bool ranToCompletion = false;
- using (var processWrapper = new ProcessWrapper(process, this, _logger))
+ using (var processWrapper = new ProcessWrapper(process, this, _logger, true))
{
try
{
@@ -1118,13 +1117,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
_logger.Info("Killing ffmpeg process");
- try
+ if (process.IsRedirectingStdin)
{
- process.Process.StandardInput.WriteLine("q");
- }
- catch (Exception)
- {
- _logger.Error("Error sending q command to process");
+ try
+ {
+ process.Process.StandardInput.WriteLine("q");
+ }
+ catch (Exception)
+ {
+ _logger.Error("Error sending q command to process");
+ }
}
try
@@ -1201,13 +1203,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
public int? ExitCode;
private readonly MediaEncoder _mediaEncoder;
private readonly ILogger _logger;
+ public bool IsRedirectingStdin { get; private set; }
- public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger)
+ public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger, bool isRedirectingStdin)
{
Process = process;
_mediaEncoder = mediaEncoder;
_logger = logger;
Process.Exited += Process_Exited;
+ IsRedirectingStdin = isRedirectingStdin;
}
void Process_Exited(object sender, EventArgs e)
@@ -1220,7 +1224,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
ExitCode = process.ExitCode;
}
- catch (Exception ex)
+ catch
{
}
@@ -1229,11 +1233,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
_mediaEncoder._runningProcesses.Remove(this);
}
+ DisposeProcess(process);
+ }
+
+ private void DisposeProcess(Process process)
+ {
try
{
process.Dispose();
}
- catch (Exception ex)
+ catch
{
}
}
@@ -1249,7 +1258,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
if (Process != null)
{
Process.Exited -= Process_Exited;
- Process.Dispose();
+ DisposeProcess(Process);
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index c05ca41878..80e81a41a4 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -600,18 +600,22 @@ namespace MediaBrowser.Model.Dlna
{
defaultBitrate = 192000;
}
+ if (!string.IsNullOrEmpty(targetAudioCodec) && audioStream != null && StringHelper.EqualsIgnoreCase(audioStream.Codec, targetAudioCodec))
+ {
+ defaultBitrate = audioStream.BitRate ?? defaultBitrate;
+ }
if (targetAudioChannels.HasValue)
{
- if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 2000000)
+ if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 1500000)
{
if (StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3"))
{
- defaultBitrate = 448000;
+ defaultBitrate = Math.Max(448000, defaultBitrate);
}
else
{
- defaultBitrate = 320000;
+ defaultBitrate = Math.Max(320000, defaultBitrate);
}
}
}
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 8ca1dfcb1e..6edf743fbb 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -7,7 +7,6 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Sync;
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs
index b749129079..7052f1b82c 100644
--- a/MediaBrowser.Model/Dto/BaseItemPerson.cs
+++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs
@@ -1,5 +1,4 @@
-using System.ComponentModel;
-using System.Diagnostics;
+using System.Diagnostics;
using System.Runtime.Serialization;
namespace MediaBrowser.Model.Dto
diff --git a/MediaBrowser.Model/Dto/IHasSyncInfo.cs b/MediaBrowser.Model/Dto/IHasSyncInfo.cs
index d2cf1f8cfe..7471dacdd7 100644
--- a/MediaBrowser.Model/Dto/IHasSyncInfo.cs
+++ b/MediaBrowser.Model/Dto/IHasSyncInfo.cs
@@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Dto
string Id { get; }
bool? SupportsSync { get; set; }
bool? HasSyncJob { get; set; }
+ double? SyncPercent { get; set; }
bool? IsSynced { get; set; }
SyncJobItemStatus? SyncStatus { get; set; }
}
diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs
index 18470466c7..94e4f95a3f 100644
--- a/MediaBrowser.Model/Dto/UserDto.cs
+++ b/MediaBrowser.Model/Dto/UserDto.cs
@@ -2,7 +2,6 @@
using MediaBrowser.Model.Connect;
using MediaBrowser.Model.Users;
using System;
-using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs
index 00491002b4..507dbb06d9 100644
--- a/MediaBrowser.Model/Dto/UserItemDataDto.cs
+++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs
@@ -1,5 +1,4 @@
using System;
-using System.ComponentModel;
namespace MediaBrowser.Model.Dto
{
diff --git a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs
index aa91e3c747..8991aad866 100644
--- a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs
@@ -2,7 +2,6 @@
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Library;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 21f87247ab..0400e374af 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -219,6 +219,7 @@
/// </summary>
Studios,
+ BasicSyncInfo,
/// <summary>
/// The synchronize information
/// </summary>
diff --git a/MediaBrowser.Model/Session/SessionInfoDto.cs b/MediaBrowser.Model/Session/SessionInfoDto.cs
index 5c3c9a79c4..42263c6442 100644
--- a/MediaBrowser.Model/Session/SessionInfoDto.cs
+++ b/MediaBrowser.Model/Session/SessionInfoDto.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Providers/Folders/CollectionFolderMetadataService.cs b/MediaBrowser.Providers/Folders/CollectionFolderMetadataService.cs
index 35c61b5c58..cdaa383667 100644
--- a/MediaBrowser.Providers/Folders/CollectionFolderMetadataService.cs
+++ b/MediaBrowser.Providers/Folders/CollectionFolderMetadataService.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
using CommonIO;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs
index 9776c4e2f5..9c108ac7d3 100644
--- a/MediaBrowser.Providers/Manager/MetadataService.cs
+++ b/MediaBrowser.Providers/Manager/MetadataService.cs
@@ -138,7 +138,7 @@ namespace MediaBrowser.Providers.Manager
}
}
- var isFirstRefresh = GetLastRefreshDate(item) == default(DateTime);
+ var isFirstRefresh = item.DateLastRefreshed == default(DateTime);
var beforeSaveResult = await BeforeSave(itemOfType, isFirstRefresh || refreshOptions.ReplaceAllMetadata || refreshOptions.MetadataRefreshMode == MetadataRefreshMode.FullRefresh || requiresRefresh, updateType).ConfigureAwait(false);
updateType = updateType | beforeSaveResult;
@@ -193,11 +193,6 @@ namespace MediaBrowser.Providers.Manager
lookupInfo.Year = result.ProductionYear;
}
- private DateTime GetLastRefreshDate(IHasMetadata item)
- {
- return item.DateLastRefreshed;
- }
-
protected async Task SaveItem(MetadataResult<TItemType> result, ItemUpdateType reason, CancellationToken cancellationToken)
{
if (result.Item.SupportsPeople && result.People != null)
@@ -652,7 +647,6 @@ namespace MediaBrowser.Providers.Manager
}
else
{
- refreshResult.Failures++;
Logger.Debug("{0} returned no metadata for {1}", providerName, logName);
}
}
diff --git a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
index 5fc3630627..fb08f00c19 100644
--- a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
@@ -10,7 +10,6 @@ using MediaBrowser.Model.Logging;
using MediaBrowser.Model.MediaInfo;
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs
index 27b61225bd..b0d119ff98 100644
--- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs
+++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs
@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Providers;
diff --git a/MediaBrowser.Providers/Movies/MovieDbTrailerProvider.cs b/MediaBrowser.Providers/Movies/MovieDbTrailerProvider.cs
index 1d8691ab8e..81df7b805c 100644
--- a/MediaBrowser.Providers/Movies/MovieDbTrailerProvider.cs
+++ b/MediaBrowser.Providers/Movies/MovieDbTrailerProvider.cs
@@ -2,7 +2,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Providers;
-using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs
index a14c7123a0..2f09d64af0 100644
--- a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs
@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers;
-using MediaBrowser.Providers.TV;
using System;
using System.Collections.Generic;
using System.Globalization;
diff --git a/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs b/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs
index 5631189403..90d172bc2c 100644
--- a/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs
+++ b/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs
@@ -10,8 +10,6 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using System.Collections.Generic;
-using System.IO;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
index 0379313005..f3766f007b 100644
--- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs
+++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
@@ -1,5 +1,4 @@
using CommonIO;
-using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
index 22e1267952..afa1abbbb9 100644
--- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
+++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
@@ -135,9 +135,7 @@ namespace MediaBrowser.Providers.TV
{
var directoryService = new DirectoryService(_fileSystem);
- await series.RefreshMetadata(new MetadataRefreshOptions(directoryService)
- {
- }, cancellationToken).ConfigureAwait(false);
+ await series.RefreshMetadata(new MetadataRefreshOptions(directoryService), cancellationToken).ConfigureAwait(false);
await series.ValidateChildren(new Progress<double>(), cancellationToken, new MetadataRefreshOptions(directoryService), true)
.ConfigureAwait(false);
@@ -438,9 +436,7 @@ namespace MediaBrowser.Providers.TV
await season.AddChild(episode, cancellationToken).ConfigureAwait(false);
- await episode.RefreshMetadata(new MetadataRefreshOptions(_fileSystem)
- {
- }, cancellationToken).ConfigureAwait(false);
+ await episode.RefreshMetadata(new MetadataRefreshOptions(_fileSystem), cancellationToken).ConfigureAwait(false);
}
/// <summary>
diff --git a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
index 64e30f47f8..621f665146 100644
--- a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
+++ b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
@@ -10,7 +10,6 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Omdb;
using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Providers/TV/SeriesPostScanTask.cs b/MediaBrowser.Providers/TV/SeriesPostScanTask.cs
index d044c828ff..d6ae84b91b 100644
--- a/MediaBrowser.Providers/TV/SeriesPostScanTask.cs
+++ b/MediaBrowser.Providers/TV/SeriesPostScanTask.cs
@@ -14,7 +14,6 @@ using CommonIO;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Plugins;
-using MediaBrowser.Model.Tasks;
namespace MediaBrowser.Providers.TV
{
diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs
index 8815132864..a0280cf409 100644
--- a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs
+++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs
@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers;
-using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs
index b6cc8777d8..66a02eba21 100644
--- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs
+++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs
@@ -5,7 +5,6 @@ using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
-using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index 41592865c0..bb7e142b68 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -657,7 +657,7 @@ namespace MediaBrowser.Server.Implementations.Channels
_logger.ErrorException("Error getting all media from {0}", ex, i.Name);
}
}
- return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { });
+ return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult());
});
var results = await Task.WhenAll(tasks).ConfigureAwait(false);
@@ -811,7 +811,7 @@ namespace MediaBrowser.Server.Implementations.Channels
_logger.ErrorException("Error getting all media from {0}", ex, i.Name);
}
}
- return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { });
+ return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult());
});
var results = await Task.WhenAll(tasks).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 616625bc9c..779afdcf27 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -11,7 +11,6 @@ using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence;
-using MediaBrowser.Controller.Playlists;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Sync;
using MediaBrowser.Model.Drawing;
@@ -98,16 +97,15 @@ namespace MediaBrowser.Server.Implementations.Dto
throw new ArgumentNullException("options");
}
- var syncJobItems = GetSyncedItemProgress(options);
- var syncDictionary = GetSyncedItemProgressDictionary(syncJobItems);
+ var syncDictionary = GetSyncedItemProgress(options);
var list = new List<BaseItemDto>();
- var programTuples = new List<Tuple<BaseItem, BaseItemDto>> { };
- var channelTuples = new List<Tuple<BaseItemDto, LiveTvChannel>> { };
+ var programTuples = new List<Tuple<BaseItem, BaseItemDto>>();
+ var channelTuples = new List<Tuple<BaseItemDto, LiveTvChannel>>();
foreach (var item in items)
{
- var dto = await GetBaseItemDtoInternal(item, options, syncDictionary, user, owner).ConfigureAwait(false);
+ var dto = await GetBaseItemDtoInternal(item, options, user, owner).ConfigureAwait(false);
var tvChannel = item as LiveTvChannel;
if (tvChannel != null)
@@ -134,7 +132,7 @@ namespace MediaBrowser.Server.Implementations.Dto
}
}
- FillSyncInfo(dto, item, syncJobItems, options, user);
+ FillSyncInfo(dto, item, options, user, syncDictionary);
list.Add(dto);
}
@@ -152,23 +150,11 @@ namespace MediaBrowser.Server.Implementations.Dto
return list;
}
- private Dictionary<string, SyncedItemProgress> GetSyncedItemProgressDictionary(IEnumerable<SyncedItemProgress> items)
- {
- var dict = new Dictionary<string, SyncedItemProgress>();
-
- foreach (var item in items)
- {
- dict[item.ItemId] = item;
- }
-
- return dict;
- }
-
public BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
{
- var syncProgress = GetSyncedItemProgress(options);
+ var syncDictionary = GetSyncedItemProgress(options);
- var dto = GetBaseItemDtoInternal(item, options, GetSyncedItemProgressDictionary(syncProgress), user, owner).Result;
+ var dto = GetBaseItemDtoInternal(item, options, user, owner).Result;
var tvChannel = item as LiveTvChannel;
if (tvChannel != null)
{
@@ -191,11 +177,11 @@ namespace MediaBrowser.Server.Implementations.Dto
SetItemByNameInfo(item, dto, GetTaggedItems(byName, user), user);
}
- FillSyncInfo(dto, item, options, user, syncProgress);
+ FillSyncInfo(dto, item, options, user, syncDictionary);
return dto;
}
- FillSyncInfo(dto, item, options, user, syncProgress);
+ FillSyncInfo(dto, item, options, user, syncDictionary);
return dto;
}
@@ -211,23 +197,24 @@ namespace MediaBrowser.Server.Implementations.Dto
return items;
}
- private SyncedItemProgress[] GetSyncedItemProgress(DtoOptions options)
+ public Dictionary<string, SyncedItemProgress> GetSyncedItemProgress(DtoOptions options)
{
- if (!options.Fields.Contains(ItemFields.SyncInfo))
+ if (!options.Fields.Contains(ItemFields.BasicSyncInfo) &&
+ !options.Fields.Contains(ItemFields.SyncInfo))
{
- return new SyncedItemProgress[] { };
+ return new Dictionary<string, SyncedItemProgress>();
}
var deviceId = options.DeviceId;
if (string.IsNullOrWhiteSpace(deviceId))
{
- return new SyncedItemProgress[] { };
+ return new Dictionary<string, SyncedItemProgress>();
}
var caps = _deviceManager().GetCapabilities(deviceId);
if (caps == null || !caps.SupportsSync)
{
- return new SyncedItemProgress[] { };
+ return new Dictionary<string, SyncedItemProgress>();
}
return _syncManager.GetSyncedItemProgresses(new SyncJobItemQuery
@@ -241,12 +228,13 @@ namespace MediaBrowser.Server.Implementations.Dto
SyncJobItemStatus.ReadyToTransfer,
SyncJobItemStatus.Synced
}
- }).Items;
+ });
}
public void FillSyncInfo(IEnumerable<Tuple<BaseItem, BaseItemDto>> tuples, DtoOptions options, User user)
{
- if (options.Fields.Contains(ItemFields.SyncInfo))
+ if (options.Fields.Contains(ItemFields.BasicSyncInfo) ||
+ options.Fields.Contains(ItemFields.SyncInfo))
{
var syncProgress = GetSyncedItemProgress(options);
@@ -254,62 +242,45 @@ namespace MediaBrowser.Server.Implementations.Dto
{
var item = tuple.Item1;
- FillSyncInfo(tuple.Item2, item, syncProgress, options, user);
+ FillSyncInfo(tuple.Item2, item, options, user, syncProgress);
}
}
}
- private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, DtoOptions options, User user, SyncedItemProgress[] syncProgress)
+ private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, DtoOptions options, User user, Dictionary<string, SyncedItemProgress> syncProgress)
{
- if (options.Fields.Contains(ItemFields.SyncInfo))
- {
- var userCanSync = user != null && user.Policy.EnableSync;
- dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
- }
+ var hasFullSyncInfo = options.Fields.Contains(ItemFields.SyncInfo);
- if (dto.SupportsSync ?? false)
+ if (!options.Fields.Contains(ItemFields.BasicSyncInfo) &&
+ !hasFullSyncInfo)
{
- dto.HasSyncJob = syncProgress.Any(i => i.Status != SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
- dto.IsSynced = syncProgress.Any(i => i.Status == SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
-
- if (dto.IsSynced.Value)
- {
- dto.SyncStatus = SyncJobItemStatus.Synced;
- }
-
- else if (dto.HasSyncJob.Value)
- {
- dto.SyncStatus = syncProgress.Where(i => string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)).Select(i => i.Status).Max();
- }
- }
- }
-
- private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, SyncedItemProgress[] syncProgress, DtoOptions options, User user)
- {
- if (options.Fields.Contains(ItemFields.SyncInfo))
- {
- var userCanSync = user != null && user.Policy.EnableSync;
- dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
+ return;
}
if (dto.SupportsSync ?? false)
{
- dto.HasSyncJob = syncProgress.Any(i => i.Status != SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
- dto.IsSynced = syncProgress.Any(i => i.Status == SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
-
- if (dto.IsSynced.Value)
+ SyncedItemProgress syncStatus;
+ if (syncProgress.TryGetValue(dto.Id, out syncStatus))
{
- dto.SyncStatus = SyncJobItemStatus.Synced;
- }
+ if (syncStatus.Status == SyncJobItemStatus.Synced)
+ {
+ dto.SyncPercent = 100;
+ }
+ else
+ {
+ dto.SyncPercent = syncStatus.Progress;
+ }
- else if (dto.HasSyncJob.Value)
- {
- dto.SyncStatus = syncProgress.Where(i => string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)).Select(i => i.Status).Max();
+ if (hasFullSyncInfo)
+ {
+ dto.HasSyncJob = true;
+ dto.SyncStatus = syncStatus.Status;
+ }
}
}
}
- private async Task<BaseItemDto> GetBaseItemDtoInternal(BaseItem item, DtoOptions options, Dictionary<string, SyncedItemProgress> syncProgress, User user = null, BaseItem owner = null)
+ private async Task<BaseItemDto> GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
{
var fields = options.Fields;
@@ -358,7 +329,7 @@ namespace MediaBrowser.Server.Implementations.Dto
if (user != null)
{
- await AttachUserSpecificInfo(dto, item, user, fields, syncProgress).ConfigureAwait(false);
+ await AttachUserSpecificInfo(dto, item, user, fields).ConfigureAwait(false);
}
var hasMediaSources = item as IHasMediaSources;
@@ -421,11 +392,9 @@ namespace MediaBrowser.Server.Implementations.Dto
return dto;
}
- public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null)
+ public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, Dictionary<string, SyncedItemProgress> syncProgress, User user = null)
{
- var syncProgress = GetSyncedItemProgress(options);
-
- var dto = GetBaseItemDtoInternal(item, options, GetSyncedItemProgressDictionary(syncProgress), user).Result;
+ var dto = GetBaseItemDtoInternal(item, options, user).Result;
if (taggedItems != null && options.Fields.Contains(ItemFields.ItemCounts))
{
@@ -473,28 +442,13 @@ namespace MediaBrowser.Server.Implementations.Dto
/// <param name="item">The item.</param>
/// <param name="user">The user.</param>
/// <param name="fields">The fields.</param>
- /// <param name="syncProgress">The synchronize progress.</param>
- private async Task AttachUserSpecificInfo(BaseItemDto dto, BaseItem item, User user, List<ItemFields> fields, Dictionary<string, SyncedItemProgress> syncProgress)
+ private async Task AttachUserSpecificInfo(BaseItemDto dto, BaseItem item, User user, List<ItemFields> fields)
{
if (item.IsFolder)
{
var folder = (Folder)item;
- if (item.SourceType == SourceType.Library && folder.SupportsUserDataFromChildren && fields.Contains(ItemFields.SyncInfo))
- {
- // Skip the user data manager because we've already looped through the recursive tree and don't want to do it twice
- // TODO: Improve in future
- dto.UserData = GetUserItemDataDto(_userDataRepository.GetUserData(user, item));
-
- await SetSpecialCounts(folder, user, dto, fields, syncProgress).ConfigureAwait(false);
-
- dto.UserData.Played = dto.UserData.PlayedPercentage.HasValue &&
- dto.UserData.PlayedPercentage.Value >= 100;
- }
- else
- {
- dto.UserData = await _userDataRepository.GetUserDataDto(item, dto, user).ConfigureAwait(false);
- }
+ dto.UserData = await _userDataRepository.GetUserDataDto(item, dto, user).ConfigureAwait(false);
if (item.SourceType == SourceType.Library)
{
@@ -519,6 +473,12 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.PlayAccess = item.GetPlayAccess(user);
+ if (fields.Contains(ItemFields.BasicSyncInfo) || fields.Contains(ItemFields.SyncInfo))
+ {
+ var userCanSync = user != null && user.Policy.EnableSync;
+ dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
+ }
+
if (fields.Contains(ItemFields.SeasonUserData))
{
var episode = item as Episode;
@@ -1445,7 +1405,7 @@ namespace MediaBrowser.Server.Implementations.Dto
BaseItem parent = null;
var isFirst = true;
- while (((!dto.HasLogo && logoLimit > 0) || (!dto.HasArtImage && artLimit > 0) || (!dto.HasThumb && thumbLimit > 0) || parent is Series) &&
+ while (((!dto.HasLogo && logoLimit > 0) || (!dto.HasArtImage && artLimit > 0) || (!dto.HasThumb && thumbLimit > 0) || parent is Series) &&
(parent = parent ?? (isFirst ? item.GetParent() ?? owner : parent)) != null)
{
if (parent == null)
@@ -1552,7 +1512,7 @@ namespace MediaBrowser.Server.Implementations.Dto
/// <param name="fields">The fields.</param>
/// <param name="syncProgress">The synchronize progress.</param>
/// <returns>Task.</returns>
- private async Task SetSpecialCounts(Folder folder, User user, BaseItemDto dto, List<ItemFields> fields, Dictionary<string, SyncedItemProgress> syncProgress)
+ private async Task SetSpecialCounts(Folder folder, User user, BaseItemDto dto, List<ItemFields> fields, Dictionary<string, SyncJobItemStatus> syncProgress)
{
var recursiveItemCount = 0;
var unplayed = 0;
@@ -1601,10 +1561,10 @@ namespace MediaBrowser.Server.Implementations.Dto
}
double percent = 0;
- SyncedItemProgress syncItemProgress;
+ SyncJobItemStatus syncItemProgress;
if (syncProgress.TryGetValue(child.Id.ToString("N"), out syncItemProgress))
{
- switch (syncItemProgress.Status)
+ switch (syncItemProgress)
{
case SyncJobItemStatus.Synced:
percent = 100;
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index 50ad3cfbc6..64e3c56a63 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -7,9 +7,7 @@ using Mono.Nat;
using System;
using System.Collections.Generic;
using System.Globalization;
-using System.IO;
using System.Net;
-using System.Text;
using MediaBrowser.Common.Threading;
namespace MediaBrowser.Server.Implementations.EntryPoints
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs
index cc4ef1972e..620eea774e 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs
@@ -1,9 +1,6 @@
using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Threading;
-using System.Threading.Tasks;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Plugins;
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
index 17e4793cb5..4121c5e5e6 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -67,6 +67,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
public override void Configure(Container container)
{
HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath;
+ HostConfig.Instance.LogUnobservedTaskExceptions = false;
HostConfig.Instance.MapExceptionToStatusCode = new Dictionary<Type, int>
{
@@ -80,7 +81,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{typeof (ApplicationException), 500}
};
- HostConfig.Instance.DebugMode = true;
+ HostConfig.Instance.DebugMode = false;
HostConfig.Instance.LogFactory = LogManager.LogFactory;
diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
index 99cb80cb25..8c2b927e3a 100644
--- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
+++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
@@ -5,14 +5,12 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Logging;
-using MediaBrowser.Server.Implementations.ScheduledTasks;
using Microsoft.Win32;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
using CommonIO;
using MediaBrowser.Controller;
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 712ea4ef30..015fc3778f 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -2605,13 +2605,6 @@ namespace MediaBrowser.Server.Implementations.Library
return ItemRepository.GetPeopleNames(query);
}
- public List<PersonInfo> GetAllPeople()
- {
- return GetPeople(new InternalPeopleQuery())
- .DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
- .ToList();
- }
-
public Task UpdatePeople(BaseItem item, List<PersonInfo> people)
{
if (!item.SupportsPeople)
diff --git a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
index 696bd0f4dc..4a533ff93c 100644
--- a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
@@ -278,8 +278,7 @@ namespace MediaBrowser.Server.Implementations.Library
}
var preferredSubs = string.IsNullOrEmpty(user.Configuration.SubtitleLanguagePreference)
- ? new List<string> { }
- : new List<string> { user.Configuration.SubtitleLanguagePreference };
+ ? new List<string>() : new List<string> { user.Configuration.SubtitleLanguagePreference };
var defaultAudioIndex = source.DefaultAudioStreamIndex;
var audioLangage = defaultAudioIndex == null
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs
index 7b8832c594..2f940eb1d8 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs
@@ -1,5 +1,4 @@
using System;
-using System.IO;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using System.Linq;
diff --git a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
index 715f3c522d..307cf4cd2f 100644
--- a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserDataManager.cs
@@ -10,7 +10,6 @@ using MediaBrowser.Model.Logging;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
index 826154fac4..a149da6510 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
using System;
@@ -43,16 +42,12 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var numComplete = 0;
var count = items.Count;
- var validIds = new List<Guid>();
-
foreach (var name in items)
{
try
{
var itemByName = _libraryManager.GetGameGenre(name);
- validIds.Add(itemByName.Id);
-
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
@@ -73,28 +68,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
progress.Report(percent);
}
- var allIds = _libraryManager.GetItemIds(new InternalItemsQuery
- {
- IncludeItemTypes = new[] { typeof(GameGenre).Name }
- });
-
- var invalidIds = allIds
- .Except(validIds)
- .ToList();
-
- foreach (var id in invalidIds)
- {
- cancellationToken.ThrowIfCancellationRequested();
-
- var item = _libraryManager.GetItemById(id);
-
- await _libraryManager.DeleteItem(item, new DeleteOptions
- {
- DeleteFileLocation = false
-
- }).ConfigureAwait(false);
- }
-
progress.Report(100);
}
}
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
index 11d4c9f166..fac5cfc356 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
@@ -44,16 +43,12 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var numComplete = 0;
var count = items.Count;
- var validIds = new List<Guid>();
-
foreach (var name in items)
{
try
{
var itemByName = _libraryManager.GetGenre(name);
- validIds.Add(itemByName.Id);
-
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
@@ -74,28 +69,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
progress.Report(percent);
}
- var allIds = _libraryManager.GetItemIds(new InternalItemsQuery
- {
- IncludeItemTypes = new[] { typeof(Genre).Name }
- });
-
- var invalidIds = allIds
- .Except(validIds)
- .ToList();
-
- foreach (var id in invalidIds)
- {
- cancellationToken.ThrowIfCancellationRequested();
-
- var item = _libraryManager.GetItemById(id);
-
- await _libraryManager.DeleteItem(item, new DeleteOptions
- {
- DeleteFileLocation = false
-
- }).ConfigureAwait(false);
- }
-
progress.Report(100);
}
}
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
index 0c8c56f5aa..81433e5b32 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Entities.Audio;
+using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
using System;
@@ -44,16 +42,12 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var numComplete = 0;
var count = items.Count;
- var validIds = new List<Guid>();
-
foreach (var name in items)
{
try
{
var itemByName = _libraryManager.GetMusicGenre(name);
- validIds.Add(itemByName.Id);
-
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
@@ -74,28 +68,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
progress.Report(percent);
}
- var allIds = _libraryManager.GetItemIds(new InternalItemsQuery
- {
- IncludeItemTypes = new[] { typeof(MusicGenre).Name }
- });
-
- var invalidIds = allIds
- .Except(validIds)
- .ToList();
-
- foreach (var id in invalidIds)
- {
- cancellationToken.ThrowIfCancellationRequested();
-
- var item = _libraryManager.GetItemById(id);
-
- await _libraryManager.DeleteItem(item, new DeleteOptions
- {
- DeleteFileLocation = false
-
- }).ConfigureAwait(false);
- }
-
progress.Report(100);
}
}
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
index 5c43f2e137..8430809501 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
@@ -89,7 +89,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var peopleOptions = _config.Configuration.PeopleMetadataOptions;
- var people = _libraryManager.GetAllPeople();
+ var people = _libraryManager.GetPeople(new InternalPeopleQuery());
var dict = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
@@ -112,8 +112,9 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
}
var numComplete = 0;
- var validIds = new List<Guid>();
-
+
+ _logger.Debug("Will refresh {0} people", dict.Count);
+
foreach (var person in dict)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -122,10 +123,9 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
{
var item = _libraryManager.GetPerson(person.Key);
- validIds.Add(item.Id);
-
var hasMetdata = !string.IsNullOrWhiteSpace(item.Overview);
- var performFullRefresh = !hasMetdata && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= 30;
+ var performFullRefresh = !hasMetdata && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= 90;
+ performFullRefresh = false;
var defaultMetadataRefreshMode = performFullRefresh
? MetadataRefreshMode.FullRefresh
@@ -160,31 +160,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
progress.Report(100 * percent);
}
- var allIds = _libraryManager.GetItemIds(new InternalItemsQuery
- {
- IncludeItemTypes = new[] { typeof(Person).Name }
- });
-
- var invalidIds = allIds
- .Except(validIds)
- .ToList();
-
- foreach (var id in invalidIds)
- {
- cancellationToken.ThrowIfCancellationRequested();
-
- var item = _libraryManager.GetItemById(id);
-
- if (item != null)
- {
- await _libraryManager.DeleteItem(item, new DeleteOptions
- {
- DeleteFileLocation = false
-
- }).ConfigureAwait(false);
- }
- }
-
progress.Report(100);
_logger.Info("People validation complete");
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
index c1803b5e4c..259878566b 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
@@ -43,16 +42,12 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var numComplete = 0;
var count = items.Count;
- var validIds = new List<Guid>();
-
foreach (var name in items)
{
try
{
var itemByName = _libraryManager.GetStudio(name);
- validIds.Add(itemByName.Id);
-
await itemByName.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs b/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs
index 7f52a4506f..164b142234 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
using System;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index 8f56554f10..a36eae8d22 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -12,7 +12,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Events;
-using MediaBrowser.Model.FileOrganization;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization;
@@ -26,8 +25,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using CommonIO;
-using MediaBrowser.Common.Events;
-using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Power;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index 1e82e3fce2..d1d8df2e81 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -11,7 +11,6 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Emby.XmlTv.Classes;
-using Emby.XmlTv.Entities;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 64af35a9aa..26ec599fa4 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -1187,6 +1187,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
// Load these now which will prefetch metadata
var dtoOptions = new DtoOptions();
dtoOptions.Fields.Remove(ItemFields.SyncInfo);
+ dtoOptions.Fields.Remove(ItemFields.BasicSyncInfo);
await GetRecordings(new RecordingQuery(), dtoOptions, cancellationToken).ConfigureAwait(false);
progress.Report(100);
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
index 2a974b5459..5b83e7cbe8 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs
@@ -141,7 +141,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
return new List<MediaSourceInfo> { mediaSource };
}
- return new List<MediaSourceInfo> { };
+ return new List<MediaSourceInfo>();
}
protected override Task<bool> IsAvailableInternal(TunerHostInfo tuner, string channelId, CancellationToken cancellationToken)
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
index d0a55966f3..43f48b37bf 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
@@ -1,6 +1,4 @@
using System;
-using System.Globalization;
-using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs
index 1e571c84fb..b1e349a862 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs
@@ -110,7 +110,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
return new List<MediaSourceInfo> { mediaSource };
}
- return new List<MediaSourceInfo> { };
+ return new List<MediaSourceInfo>();
}
protected override async Task<MediaSourceInfo> GetChannelStream(TunerHostInfo tuner, string channelId, string streamId, CancellationToken cancellationToken)
diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
index 2c4c74b35c..92d95b7fd0 100644
--- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
+++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
@@ -56,8 +56,8 @@
<Reference Include="Interfaces.IO">
<HintPath>..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll</HintPath>
</Reference>
- <Reference Include="MediaBrowser.Naming, Version=1.0.6046.41603, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\MediaBrowser.Naming.1.0.0.54\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath>
+ <Reference Include="MediaBrowser.Naming, Version=1.0.6059.24054, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\MediaBrowser.Naming.1.0.0.55\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MoreLinq">
@@ -73,8 +73,8 @@
<HintPath>..\packages\SimpleInjector.3.2.0\lib\net45\SimpleInjector.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="SocketHttpListener, Version=1.0.6046.26351, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\SocketHttpListener.1.0.0.35\lib\net45\SocketHttpListener.dll</HintPath>
+ <Reference Include="SocketHttpListener, Version=1.0.6057.1168, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\SocketHttpListener.1.0.0.36\lib\net45\SocketHttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
diff --git a/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs b/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs
index 61ce6e351b..a16d237005 100644
--- a/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs
@@ -4,7 +4,6 @@ using MediaBrowser.Model.Serialization;
using System;
using System.Data;
using System.IO;
-using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Persistence
{
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs
index d5b582da56..c273d49458 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs
@@ -1,12 +1,7 @@
using System;
-using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
-using System.Linq;
-using System.Text;
using System.Threading.Tasks;
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Server.Implementations.Persistence
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 63dd29e0dd..2ef878a20c 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
@@ -3776,6 +3776,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
whereClauses.Add("Name like @NameContains");
cmd.Parameters.Add(cmd, "@NameContains", DbType.String).Value = "%" + query.NameContains + "%";
}
+ if (query.SourceTypes.Length == 1)
+ {
+ whereClauses.Add("(select sourcetype from typedbaseitems where guid=ItemId) = @SourceTypes");
+ cmd.Parameters.Add(cmd, "@SourceTypes", DbType.String).Value = query.SourceTypes[0].ToString();
+ }
return whereClauses;
}
diff --git a/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs b/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs
index e8c78b8e73..5080edffd5 100644
--- a/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs
@@ -3,7 +3,6 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
using System;
-using System.Linq;
namespace MediaBrowser.Server.Implementations.Sorting
{
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
index e120d3a4dc..d5dfd38569 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
@@ -951,8 +951,7 @@ namespace MediaBrowser.Server.Implementations.Sync
: new[] { user.Configuration.AudioLanguagePreference };
var preferredSubs = string.IsNullOrEmpty(user.Configuration.SubtitleLanguagePreference)
- ? new List<string> { }
- : new List<string> { user.Configuration.SubtitleLanguagePreference };
+ ? new List<string>() : new List<string> { user.Configuration.SubtitleLanguagePreference };
foreach (var source in mediaSources)
{
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
index 38edc30240..ffba60af84 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
@@ -152,7 +152,7 @@ namespace MediaBrowser.Server.Implementations.Sync
UserId = request.UserId,
UnwatchedOnly = request.UnwatchedOnly,
ItemLimit = request.ItemLimit,
- RequestedItemIds = request.ItemIds ?? new List<string> { },
+ RequestedItemIds = request.ItemIds ?? new List<string>(),
DateCreated = DateTime.UtcNow,
DateLastModified = DateTime.UtcNow,
SyncNewContent = request.SyncNewContent,
@@ -646,6 +646,7 @@ namespace MediaBrowser.Server.Implementations.Sync
dtoOptions.Fields.Remove(ItemFields.SeriesGenres);
dtoOptions.Fields.Remove(ItemFields.Settings);
dtoOptions.Fields.Remove(ItemFields.SyncInfo);
+ dtoOptions.Fields.Remove(ItemFields.BasicSyncInfo);
syncedItem.Item = _dtoService().GetBaseItemDto(libraryItem, dtoOptions);
@@ -1123,7 +1124,7 @@ namespace MediaBrowser.Server.Implementations.Sync
await processor.UpdateJobStatus(jobItem.JobId).ConfigureAwait(false);
}
- public QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query)
+ public Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query)
{
return _repo.GetSyncedItemProgresses(query);
}
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs b/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs
index a1ed66a995..d7c77e655b 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs
@@ -29,6 +29,17 @@ namespace MediaBrowser.Server.Implementations.Sync
DbFilePath = Path.Combine(appPaths.DataPath, "sync14.db");
}
+ private class SyncSummary
+ {
+ public Dictionary<string, int> Items { get; set; }
+
+ public SyncSummary()
+ {
+ Items = new Dictionary<string, int>();
+ }
+ }
+
+
public async Task Initialize()
{
using (var connection = await CreateConnection().ConfigureAwait(false))
@@ -41,7 +52,10 @@ namespace MediaBrowser.Server.Implementations.Sync
"create table if not exists SyncJobItems (Id GUID PRIMARY KEY, ItemId TEXT, ItemName TEXT, MediaSourceId TEXT, JobId TEXT, TemporaryPath TEXT, OutputPath TEXT, Status TEXT, TargetId TEXT, DateCreated DateTime, Progress FLOAT, AdditionalFiles TEXT, MediaSource TEXT, IsMarkedForRemoval BIT, JobItemIndex INT, ItemDateModifiedTicks BIGINT)",
"create index if not exists idx_SyncJobItems1 on SyncJobItems(Id)",
- "create index if not exists idx_SyncJobItems2 on SyncJobItems(TargetId)",
+
+ "drop index if exists idx_SyncJobItems2",
+ "drop index if exists idx_SyncJobItems3",
+ "create index if not exists idx_SyncJobItems4 on SyncJobItems(TargetId,ItemId,Status,Progress,DateCreated)",
"pragma shrink_memory"
};
@@ -583,9 +597,74 @@ namespace MediaBrowser.Server.Implementations.Sync
}
}
- public QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query)
+ public Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query)
{
- return GetJobItemReader(query, "select ItemId,Status from SyncJobItems", GetSyncedItemProgress);
+ var result = new Dictionary<string, SyncedItemProgress>();
+
+ using (var connection = CreateConnection(true).Result)
+ {
+ using (var cmd = connection.CreateCommand())
+ {
+ cmd.CommandText = "select ItemId,Status,Progress from SyncJobItems";
+
+ var whereClauses = new List<string>();
+
+ if (!string.IsNullOrWhiteSpace(query.TargetId))
+ {
+ whereClauses.Add("TargetId=@TargetId");
+ cmd.Parameters.Add(cmd, "@TargetId", DbType.String).Value = query.TargetId;
+ }
+
+ if (query.Statuses.Length > 0)
+ {
+ var statuses = string.Join(",", query.Statuses.Select(i => "'" + i.ToString() + "'").ToArray());
+
+ whereClauses.Add(string.Format("Status in ({0})", statuses));
+ }
+
+ if (whereClauses.Count > 0)
+ {
+ cmd.CommandText += " where " + string.Join(" AND ", whereClauses.ToArray());
+ }
+
+ using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.SingleResult))
+ {
+ while (reader.Read())
+ {
+ var itemId = reader.GetString(0);
+
+ if (!reader.IsDBNull(1))
+ {
+ var status = (SyncJobItemStatus)Enum.Parse(typeof(SyncJobItemStatus), reader.GetString(1), true);
+
+ if (status == SyncJobItemStatus.Synced)
+ {
+ result[itemId] = new SyncedItemProgress
+ {
+ Status = SyncJobItemStatus.Synced
+ };
+ }
+ else
+ {
+ SyncedItemProgress currentStatus;
+ double progress = reader.IsDBNull(2) ? 0.0 : reader.GetDouble(2);
+
+ if (!result.TryGetValue(itemId, out currentStatus) || (currentStatus.Status != SyncJobItemStatus.Synced && progress >= currentStatus.Progress))
+ {
+ result[itemId] = new SyncedItemProgress
+ {
+ Status = status,
+ Progress = progress
+ };
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
}
public QueryResult<SyncJobItem> GetJobItems(SyncJobItemQuery query)
@@ -795,19 +874,5 @@ namespace MediaBrowser.Server.Implementations.Sync
return info;
}
-
- private SyncedItemProgress GetSyncedItemProgress(IDataReader reader)
- {
- var item = new SyncedItemProgress();
-
- item.ItemId = reader.GetString(0);
-
- if (!reader.IsDBNull(1))
- {
- item.Status = (SyncJobItemStatus)Enum.Parse(typeof(SyncJobItemStatus), reader.GetString(1), true);
- }
-
- return item;
- }
}
}
diff --git a/MediaBrowser.Server.Implementations/packages.config b/MediaBrowser.Server.Implementations/packages.config
index 03f7160ae0..8ee333375b 100644
--- a/MediaBrowser.Server.Implementations/packages.config
+++ b/MediaBrowser.Server.Implementations/packages.config
@@ -4,10 +4,10 @@
<package id="Emby.XmlTv" version="1.0.0.55" targetFramework="net45" />
<package id="ini-parser" version="2.3.0" targetFramework="net45" />
<package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
- <package id="MediaBrowser.Naming" version="1.0.0.54" targetFramework="net45" />
+ <package id="MediaBrowser.Naming" version="1.0.0.55" targetFramework="net45" />
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net45" />
<package id="morelinq" version="1.4.0" targetFramework="net45" />
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
<package id="SimpleInjector" version="3.2.0" targetFramework="net45" />
- <package id="SocketHttpListener" version="1.0.0.35" targetFramework="net45" />
+ <package id="SocketHttpListener" version="1.0.0.36" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/MediaBrowser.Server.Mono/Native/DbConnector.cs b/MediaBrowser.Server.Mono/Native/DbConnector.cs
index 5ad3ecfef2..39b53b3709 100644
--- a/MediaBrowser.Server.Mono/Native/DbConnector.cs
+++ b/MediaBrowser.Server.Mono/Native/DbConnector.cs
@@ -1,6 +1,4 @@
-using System;
-using System.Data;
-using System.Data.SQLite;
+using System.Data;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations.Persistence;
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index b7ea5bdad8..3f1f98cd00 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -362,9 +362,7 @@ namespace MediaBrowser.Server.Startup.Common
private void PerformPreInitMigrations()
{
- var migrations = new List<IVersionMigration>
- {
- };
+ var migrations = new List<IVersionMigration>();
foreach (var task in migrations)
{
diff --git a/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs b/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs
index db48d1110e..6b3602a73d 100644
--- a/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs
+++ b/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs
@@ -1,7 +1,5 @@
using MediaBrowser.Controller;
-using MediaBrowser.Model.Logging;
using System;
-using System.Diagnostics;
namespace MediaBrowser.Server.Startup.Common.Browser
{
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/CollectionGroupingMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/CollectionGroupingMigration.cs
index b497eeb424..5041c49b8b 100644
--- a/MediaBrowser.Server.Startup.Common/Migrations/CollectionGroupingMigration.cs
+++ b/MediaBrowser.Server.Startup.Common/Migrations/CollectionGroupingMigration.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Linq;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs
index c6186ce081..3f68ec48b3 100644
--- a/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs
+++ b/MediaBrowser.Server.Startup.Common/Migrations/CollectionsViewMigration.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Linq;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index bdfd7d1bb0..c40e633749 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -19,7 +19,6 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CommonIO.Windows;
-using Emby.Drawing.ImageMagick;
using ImageMagickSharp;
using MediaBrowser.Common.Net;
using MediaBrowser.Server.Implementations.Logging;
@@ -619,6 +618,12 @@ namespace MediaBrowser.ServerApplication
private static void ShutdownWindowsApplication()
{
+ if (_serverNotifyIcon != null)
+ {
+ _serverNotifyIcon.Dispose();
+ _serverNotifyIcon = null;
+ }
+
//_logger.Info("Calling Application.Exit");
//Application.Exit();
diff --git a/MediaBrowser.ServerApplication/Native/DbConnector.cs b/MediaBrowser.ServerApplication/Native/DbConnector.cs
index 9aaa96a804..f403ce2ce4 100644
--- a/MediaBrowser.ServerApplication/Native/DbConnector.cs
+++ b/MediaBrowser.ServerApplication/Native/DbConnector.cs
@@ -1,6 +1,4 @@
-using System;
-using System.Data;
-using System.Data.SQLite;
+using System.Data;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations.Persistence;
diff --git a/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs b/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
index 67d2e83f0e..dc1e3c79b2 100644
--- a/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
+++ b/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
@@ -1,11 +1,8 @@
using System;
-using System.Collections.Generic;
using System.IO;
-using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
-using System.Threading.Tasks;
using CommonIO;
namespace MediaBrowser.ServerApplication.Native
diff --git a/MediaBrowser.ServerApplication/Native/WindowsApp.cs b/MediaBrowser.ServerApplication/Native/WindowsApp.cs
index d8b2720c2c..3c9c04acbf 100644
--- a/MediaBrowser.ServerApplication/Native/WindowsApp.cs
+++ b/MediaBrowser.ServerApplication/Native/WindowsApp.cs
@@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
-using System.Windows.Forms;
using CommonIO;
using MediaBrowser.Controller.Power;
using MediaBrowser.Model.System;
diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
index 27816db5a4..d04128a18c 100644
--- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
+++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs
@@ -4,14 +4,13 @@ using MediaBrowser.Controller.Localization;
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Startup.Common.Browser;
using System;
+using System.ComponentModel;
using System.Windows.Forms;
namespace MediaBrowser.ServerApplication
{
public class ServerNotifyIcon : IDisposable
{
- bool IsDisposing = false;
-
private NotifyIcon notifyIcon1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem cmdExit;
@@ -21,25 +20,13 @@ namespace MediaBrowser.ServerApplication
private ToolStripMenuItem cmdRestart;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem cmdCommunity;
+ private Container components;
private readonly ILogger _logger;
private readonly IServerApplicationHost _appHost;
private readonly IServerConfigurationManager _configurationManager;
private readonly ILocalizationManager _localization;
- public bool Visible
- {
- get
- {
- return notifyIcon1.Visible;
- }
- set
- {
- Action act = () => notifyIcon1.Visible = false;
- Invoke(act);
- }
- }
-
public void Invoke(Action action)
{
contextMenuStrip1.Invoke(action);
@@ -55,7 +42,7 @@ namespace MediaBrowser.ServerApplication
_appHost = appHost;
_configurationManager = configurationManager;
- var components = new System.ComponentModel.Container();
+ components = new System.ComponentModel.Container();
var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
contextMenuStrip1 = new ContextMenuStrip(components);
@@ -138,32 +125,6 @@ namespace MediaBrowser.ServerApplication
LocalizeText();
notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
- Application.ThreadExit += Application_ThreadExit;
- Application.ApplicationExit += Application_ApplicationExit;
- }
-
- void Application_ThreadExit(object sender, EventArgs e)
- {
- try
- {
- notifyIcon1.Visible = false;
- }
- catch
- {
-
- }
- }
-
- void Application_ApplicationExit(object sender, EventArgs e)
- {
- try
- {
- notifyIcon1.Visible = false;
- }
- catch
- {
-
- }
}
void notifyIcon1_DoubleClick(object sender, EventArgs e)
@@ -222,16 +183,26 @@ namespace MediaBrowser.ServerApplication
_appHost.Shutdown();
}
- ~ServerNotifyIcon()
+ public void Dispose()
{
- Dispose();
+ Dispose(true);
}
- public void Dispose()
+ protected virtual void Dispose(bool disposing)
{
- if (!IsDisposing)
+ if (disposing)
{
- IsDisposing = true;
+ if (notifyIcon1 != null)
+ {
+ notifyIcon1.Visible = false;
+ notifyIcon1.Dispose();
+ notifyIcon1 = null;
+ }
+
+ if (components != null)
+ {
+ components.Dispose();
+ }
}
}
}
diff --git a/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs b/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs
index d036a6c6d7..bea709c5c8 100644
--- a/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs
+++ b/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
-using System.Threading.Tasks;
using System.Xml;
namespace MediaBrowser.Tests.ConsistencyTests
diff --git a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/IndexBuilder.cs b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/IndexBuilder.cs
index 07c0df86c7..e88e3ae292 100644
--- a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/IndexBuilder.cs
+++ b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/IndexBuilder.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace MediaBrowser.Tests.ConsistencyTests.TextIndexing
{
diff --git a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordIndex.cs b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordIndex.cs
index 4ced812373..60b88dd5e0 100644
--- a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordIndex.cs
+++ b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordIndex.cs
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace MediaBrowser.Tests.ConsistencyTests.TextIndexing
{
diff --git a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrence.cs b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrence.cs
index 40631f5825..7564d90f3c 100644
--- a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrence.cs
+++ b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrence.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Tests.ConsistencyTests.TextIndexing
+namespace MediaBrowser.Tests.ConsistencyTests.TextIndexing
{
public struct WordOccurrence
{
diff --git a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrences.cs b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrences.cs
index 3ba3b59167..821a74d21b 100644
--- a/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrences.cs
+++ b/MediaBrowser.Tests/ConsistencyTests/TextIndexing/WordOccurrences.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
namespace MediaBrowser.Tests.ConsistencyTests.TextIndexing
{
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 46178dd9a0..cc064dc813 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -194,12 +194,6 @@
<Content Include="dashboard-ui\components\humanedate.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\components\itemidentifier\itemidentifier.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="dashboard-ui\components\itemidentifier\itemidentifier.template.html">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\components\imagedownloader\imagedownloader.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -671,9 +665,6 @@
<Content Include="dashboard-ui\css\nowplaying.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\css\card.css">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\dashboardgeneral.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -809,9 +800,6 @@
<Content Include="dashboard-ui\css\librarybrowser.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\css\tileitem.css">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\edititemmetadata.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
diff --git a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs
index 6e3114fa15..dfa5c1b71a 100644
--- a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs
+++ b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs
@@ -199,10 +199,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
// int.TryParse is local aware, so it can be probamatic, force us culture
if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval))
{
- if ((item.ParentIndexNumber ?? 0) == 0)
- {
- item.AirsBeforeSeasonNumber = rval;
- }
+ item.AirsBeforeSeasonNumber = rval;
}
}
@@ -220,10 +217,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
// int.TryParse is local aware, so it can be probamatic, force us culture
if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval))
{
- if ((item.ParentIndexNumber ?? 0) == 0)
- {
- item.AirsBeforeEpisodeNumber = rval;
- }
+ item.AirsBeforeEpisodeNumber = rval;
}
}
diff --git a/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs b/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
index c1dd929877..f3c40a1696 100644
--- a/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
+++ b/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.XbmcMetadata.Savers;
-using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;