aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-28 16:13:12 -0500
committerGitHub <noreply@github.com>2016-12-28 16:13:12 -0500
commit2cb0f3eed635bb468b3672d08dca9a720b4fb48f (patch)
tree1a0d7c53ec148619ae966a81187413a33ca9a8a4
parente47ccdce4247b93faa6d27849b255aac83324c42 (diff)
parentc10b152018967ddafe72efbccfe8ca6c586cbf04 (diff)
Merge pull request #2372 from MediaBrowser/beta
Beta
-rw-r--r--BDInfo/BDROM.cs24
-rw-r--r--Emby.Common.Implementations/BaseApplicationHost.cs2
-rw-r--r--Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs6
-rw-r--r--Emby.Common.Implementations/IO/ManagedFileSystem.cs29
-rw-r--r--Emby.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs20
-rw-r--r--Emby.Dlna/ContentDirectory/ControlHandler.cs6
-rw-r--r--Emby.Dlna/Didl/DidlBuilder.cs58
-rw-r--r--Emby.Dlna/PlayTo/PlayToController.cs2
-rw-r--r--Emby.Dlna/Profiles/DishHopperJoeyProfile.cs15
-rw-r--r--Emby.Dlna/Profiles/LgTvProfile.cs7
-rw-r--r--Emby.Dlna/Profiles/Xml/BubbleUPnp.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Default.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Denon AVR.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml4
-rw-r--r--Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml12
-rw-r--r--Emby.Dlna/Profiles/Xml/Kodi.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/LG Smart TV.xml14
-rw-r--r--Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/MediaMonkey.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Panasonic Viera.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Popcorn Hour.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Vlc.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/WDTV Live.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Xbox 360.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/Xbox One.xml6
-rw-r--r--Emby.Dlna/Profiles/Xml/foobar2000.xml6
-rw-r--r--Emby.Server.Core/ApplicationHost.cs10
-rw-r--r--Emby.Server.Implementations/Channels/ChannelManager.cs83
-rw-r--r--Emby.Server.Implementations/Connect/ConnectManager.cs4
-rw-r--r--Emby.Server.Implementations/Data/SqliteExtensions.cs12
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs10
-rw-r--r--Emby.Server.Implementations/Emby.Server.Implementations.csproj7
-rw-r--r--Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs4
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs47
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpResultFactory.cs71
-rw-r--r--Emby.Server.Implementations/HttpServer/IHttpListener.cs2
-rw-r--r--Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs4
-rw-r--r--Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs11
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs6
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs27
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs8
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs17
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvManager.cs2
-rw-r--r--Emby.Server.Implementations/Localization/Ratings/uk.txt7
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs2
-rw-r--r--Emby.Server.Implementations/Sync/CloudSyncProfile.cs16
-rw-r--r--Emby.Server.Implementations/Sync/SyncJobProcessor.cs10
-rw-r--r--Emby.Server.Implementations/Sync/SyncManager.cs44
-rw-r--r--Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs12
-rw-r--r--Emby.Server.Implementations/Sync/SyncRepository.cs89
-rw-r--r--Emby.Server.Implementations/Udp/UdpServer.cs13
-rw-r--r--Emby.Server.Implementations/packages.config2
-rw-r--r--MediaBrowser.Api/ItemUpdateService.cs1
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs86
-rw-r--r--MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs3
-rw-r--r--MediaBrowser.Api/Playback/Progressive/VideoService.cs2
-rw-r--r--MediaBrowser.Api/Playback/StreamRequest.cs1
-rw-r--r--MediaBrowser.Controller/Channels/IChannelManager.cs10
-rw-r--r--MediaBrowser.Controller/Entities/Audio/Audio.cs2
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs2
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs2
-rw-r--r--MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs5
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs16
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs44
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs9
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs10
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Dlna/ConditionProcessor.cs13
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs8
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs2
-rw-r--r--MediaBrowser.Model/Dlna/TranscodingProfile.cs3
-rw-r--r--MediaBrowser.Model/Sync/SyncJobQuery.cs1
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs5
-rw-r--r--MediaBrowser.Providers/Omdb/OmdbProvider.cs6
-rw-r--r--MediaBrowser.Providers/TV/MissingEpisodeProvider.cs8
-rw-r--r--MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs12
-rw-r--r--MediaBrowser.Server.Mac/Emby.Server.Mac.csproj24
-rw-r--r--MediaBrowser.Server.Mac/Main.cs5
-rw-r--r--MediaBrowser.Server.Mono/MonoAppHost.cs22
-rw-r--r--MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs69
-rw-r--r--MediaBrowser.ServerApplication/WindowsAppHost.cs24
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj9
-rw-r--r--OpenSubtitlesHandler/Utilities.cs58
-rw-r--r--RSSDP/SsdpDevicePublisherBase.cs4
-rw-r--r--SocketHttpListener.Portable/Net/HttpConnection.cs4
-rw-r--r--SocketHttpListener.Portable/Net/HttpListenerResponse.cs7
-rw-r--r--SocketHttpListener.Portable/Net/ResponseStream.cs12
100 files changed, 739 insertions, 626 deletions
diff --git a/BDInfo/BDROM.cs b/BDInfo/BDROM.cs
index 97dbfbf3b..2faeb405e 100644
--- a/BDInfo/BDROM.cs
+++ b/BDInfo/BDROM.cs
@@ -77,6 +77,11 @@ namespace BDInfo
public BDROM(
string path, IFileSystem fileSystem, ITextEncoding textEncoding)
{
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
_fileSystem = fileSystem;
//
// Locate BDMV directories.
@@ -326,15 +331,28 @@ namespace BDInfo
private FileSystemMetadata GetDirectoryBDMV(
string path)
{
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
FileSystemMetadata dir = _fileSystem.GetDirectoryInfo(path);
while (dir != null)
{
- if (dir.Name == "BDMV")
+ if (string.Equals(dir.Name, "BDMV", StringComparison.OrdinalIgnoreCase))
{
return dir;
}
- dir = _fileSystem.GetDirectoryInfo(Path.GetDirectoryName(dir.FullName));
+ var parentFolder = Path.GetDirectoryName(dir.FullName);
+ if (string.IsNullOrEmpty(parentFolder))
+ {
+ dir = null;
+ }
+ else
+ {
+ dir = _fileSystem.GetDirectoryInfo(parentFolder);
+ }
}
return GetDirectory("BDMV", _fileSystem.GetDirectoryInfo(path), 0);
@@ -350,7 +368,7 @@ namespace BDInfo
FileSystemMetadata[] children = _fileSystem.GetDirectories(dir.FullName).ToArray();
foreach (FileSystemMetadata child in children)
{
- if (child.Name == name)
+ if (string.Equals(child.Name, name, StringComparison.OrdinalIgnoreCase))
{
return child;
}
diff --git a/Emby.Common.Implementations/BaseApplicationHost.cs b/Emby.Common.Implementations/BaseApplicationHost.cs
index 02d7cb31f..9c9e14ec6 100644
--- a/Emby.Common.Implementations/BaseApplicationHost.cs
+++ b/Emby.Common.Implementations/BaseApplicationHost.cs
@@ -795,6 +795,8 @@ return null;
/// </summary>
public void NotifyPendingRestart()
{
+ Logger.Info("App needs to be restarted.");
+
var changed = !HasPendingRestart;
HasPendingRestart = true;
diff --git a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
index 6cc4626ea..dcc974413 100644
--- a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
+++ b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
@@ -10,11 +10,17 @@ namespace Emby.Common.Implementations.EnvironmentInfo
public class EnvironmentInfo : IEnvironmentInfo
{
public MediaBrowser.Model.System.Architecture? CustomArchitecture { get; set; }
+ public MediaBrowser.Model.System.OperatingSystem? CustomOperatingSystem { get; set; }
public MediaBrowser.Model.System.OperatingSystem OperatingSystem
{
get
{
+ if (CustomOperatingSystem.HasValue)
+ {
+ return CustomOperatingSystem.Value;
+ }
+
#if NET46
switch (Environment.OSVersion.Platform)
{
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
index 62d285072..78070a5d9 100644
--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
@@ -490,38 +490,13 @@ namespace Emby.Common.Implementations.IO
var temp1 = Path.GetTempFileName();
// Copying over will fail against hidden files
- RemoveHiddenAttribute(file1);
- RemoveHiddenAttribute(file2);
+ SetHidden(file1, false);
+ SetHidden(file2, false);
CopyFile(file1, temp1, true);
CopyFile(file2, file1, true);
CopyFile(temp1, file2, true);
-
- DeleteFile(temp1);
- }
-
- /// <summary>
- /// Removes the hidden attribute.
- /// </summary>
- /// <param name="path">The path.</param>
- private void RemoveHiddenAttribute(string path)
- {
- if (string.IsNullOrEmpty(path))
- {
- throw new ArgumentNullException("path");
- }
-
- var currentFile = new FileInfo(path);
-
- // This will fail if the file is hidden
- if (currentFile.Exists)
- {
- if ((currentFile.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
- {
- currentFile.Attributes &= ~FileAttributes.Hidden;
- }
- }
}
public bool ContainsSubPath(string parentPath, string path)
diff --git a/Emby.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/Emby.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
index cbc7c7c2d..de528a94f 100644
--- a/Emby.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
+++ b/Emby.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
@@ -282,9 +282,12 @@ namespace Emby.Common.Implementations.ScheduledTasks
throw new ArgumentNullException("value");
}
- SaveTriggers(value);
+ // This null check is not great, but is needed to handle bad user input, or user mucking with the config file incorrectly
+ var triggerList = value.Where(i => i != null).ToArray();
- InternalTriggers = value.Select(i => new Tuple<TaskTriggerInfo, ITaskTrigger>(i, GetTrigger(i))).ToArray();
+ SaveTriggers(triggerList);
+
+ InternalTriggers = triggerList.Select(i => new Tuple<TaskTriggerInfo, ITaskTrigger>(i, GetTrigger(i))).ToArray();
}
}
@@ -535,7 +538,8 @@ namespace Emby.Common.Implementations.ScheduledTasks
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
private Tuple<TaskTriggerInfo, ITaskTrigger>[] LoadTriggers()
{
- var settings = LoadTriggerSettings();
+ // This null check is not great, but is needed to handle bad user input, or user mucking with the config file incorrectly
+ var settings = LoadTriggerSettings().Where(i => i != null).ToArray();
return settings.Select(i => new Tuple<TaskTriggerInfo, ITaskTrigger>(i, GetTrigger(i))).ToArray();
}
@@ -544,8 +548,12 @@ namespace Emby.Common.Implementations.ScheduledTasks
{
try
{
- return JsonSerializer.DeserializeFromFile<IEnumerable<TaskTriggerInfo>>(GetConfigurationFilePath())
- .ToArray();
+ var list = JsonSerializer.DeserializeFromFile<IEnumerable<TaskTriggerInfo>>(GetConfigurationFilePath());
+
+ if (list != null)
+ {
+ return list.ToArray();
+ }
}
catch (FileNotFoundException)
{
@@ -555,8 +563,8 @@ namespace Emby.Common.Implementations.ScheduledTasks
catch (DirectoryNotFoundException)
{
// File doesn't exist. No biggie. Return defaults.
- return ScheduledTask.GetDefaultTriggers().ToArray();
}
+ return ScheduledTask.GetDefaultTriggers().ToArray();
}
/// <summary>
diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs
index 432991128..5718cbd09 100644
--- a/Emby.Dlna/ContentDirectory/ControlHandler.cs
+++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs
@@ -268,7 +268,7 @@ namespace Emby.Dlna.ContentDirectory
}
else
{
- _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, item, null, null, deviceId, filter);
+ _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, item, user, null, null, deviceId, filter);
}
provided++;
@@ -294,7 +294,7 @@ namespace Emby.Dlna.ContentDirectory
}
else
{
- _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, childItem, item, serverItem.StubType, deviceId, filter);
+ _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, childItem, user, item, serverItem.StubType, deviceId, filter);
}
}
}
@@ -390,7 +390,7 @@ namespace Emby.Dlna.ContentDirectory
}
else
{
- _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, i, item, serverItem.StubType, deviceId, filter);
+ _didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, i, user, item, serverItem.StubType, deviceId, filter);
}
}
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs
index 3dcdaf2ef..3e47362f6 100644
--- a/Emby.Dlna/Didl/DidlBuilder.cs
+++ b/Emby.Dlna/Didl/DidlBuilder.cs
@@ -61,7 +61,7 @@ namespace Emby.Dlna.Didl
_user = user;
}
- public string GetItemDidl(DlnaOptions options, BaseItem item, BaseItem context, string deviceId, Filter filter, StreamInfo streamInfo)
+ public string GetItemDidl(DlnaOptions options, BaseItem item, User user, BaseItem context, string deviceId, Filter filter, StreamInfo streamInfo)
{
var settings = new XmlWriterSettings
{
@@ -86,7 +86,7 @@ namespace Emby.Dlna.Didl
WriteXmlRootAttributes(_profile, writer);
- WriteItemElement(options, writer, item, context, null, deviceId, filter, streamInfo);
+ WriteItemElement(options, writer, item, user, context, null, deviceId, filter, streamInfo);
writer.WriteFullEndElement();
//writer.WriteEndDocument();
@@ -111,7 +111,15 @@ namespace Emby.Dlna.Didl
}
}
- public void WriteItemElement(DlnaOptions options, XmlWriter writer, BaseItem item, BaseItem context, StubType? contextStubType, string deviceId, Filter filter, StreamInfo streamInfo = null)
+ public void WriteItemElement(DlnaOptions options,
+ XmlWriter writer,
+ BaseItem item,
+ User user,
+ BaseItem context,
+ StubType? contextStubType,
+ string deviceId,
+ Filter filter,
+ StreamInfo streamInfo = null)
{
var clientId = GetClientId(item, null);
@@ -135,7 +143,7 @@ namespace Emby.Dlna.Didl
AddGeneralProperties(item, null, context, writer, filter);
- //AddBookmarkInfo(item, user, element);
+ AddSamsungBookmarkInfo(item, user, writer);
// refID?
// storeAttribute(itemNode, object, ClassProperties.REF_ID, false);
@@ -555,17 +563,37 @@ namespace Emby.Dlna.Didl
writer.WriteFullEndElement();
}
- //private void AddBookmarkInfo(BaseItem item, User user, XmlElement element)
- //{
- // var userdata = _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
-
- // if (userdata.PlaybackPositionTicks > 0)
- // {
- // var dcmInfo = element.OwnerDocument.CreateElement("sec", "dcmInfo", NS_SEC);
- // dcmInfo.InnerText = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(userdata.PlaybackPositionTicks).TotalSeconds).ToString(_usCulture));
- // element.AppendChild(dcmInfo);
- // }
- //}
+ private void AddSamsungBookmarkInfo(BaseItem item, User user, XmlWriter writer)
+ {
+ if (!item.SupportsPositionTicksResume || item is Folder)
+ {
+ return;
+ }
+
+ XmlAttribute secAttribute = null;
+ foreach (var attribute in _profile.XmlRootAttributes)
+ {
+ if (string.Equals(attribute.Name, "xmlns:sec", StringComparison.OrdinalIgnoreCase))
+ {
+ secAttribute = attribute;
+ break;
+ }
+ }
+
+ // Not a samsung device
+ if (secAttribute == null)
+ {
+ return;
+ }
+
+ var userdata = _userDataManager.GetUserData(user.Id, item);
+
+ if (userdata.PlaybackPositionTicks > 0)
+ {
+ var elementValue = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(userdata.PlaybackPositionTicks).TotalSeconds).ToString(_usCulture));
+ AddValue(writer, "sec", "dcmInfo", elementValue, secAttribute.Value);
+ }
+ }
/// <summary>
/// Adds fields used by both items and folders
diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs
index 7dff8bda1..4ad62216e 100644
--- a/Emby.Dlna/PlayTo/PlayToController.cs
+++ b/Emby.Dlna/PlayTo/PlayToController.cs
@@ -493,7 +493,7 @@ namespace Emby.Dlna.PlayTo
playlistItem.StreamUrl = playlistItem.StreamInfo.ToDlnaUrl(_serverAddress, _accessToken);
var itemXml = new DidlBuilder(profile, user, _imageProcessor, _serverAddress, _accessToken, _userDataManager, _localization, _mediaSourceManager, _logger, _libraryManager, _mediaEncoder)
- .GetItemDidl(_config.GetDlnaConfiguration(), item, null, _session.DeviceId, new Filter(), playlistItem.StreamInfo);
+ .GetItemDidl(_config.GetDlnaConfiguration(), item, user, null, _session.DeviceId, new Filter(), playlistItem.StreamInfo);
playlistItem.Didl = itemXml;
diff --git a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs
index 9f3137710..d494a7bfc 100644
--- a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs
+++ b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs
@@ -201,6 +201,21 @@ namespace Emby.Dlna.Profiles
IsRequired = true
}
}
+ },
+
+ new CodecProfile
+ {
+ Type = CodecType.VideoAudio,
+ Conditions = new []
+ {
+ // The device does not have any audio switching capabilities
+ new ProfileCondition
+ {
+ Condition = ProfileConditionType.Equals,
+ Property = ProfileConditionValue.IsSecondaryAudio,
+ Value = "false"
+ }
+ }
}
};
diff --git a/Emby.Dlna/Profiles/LgTvProfile.cs b/Emby.Dlna/Profiles/LgTvProfile.cs
index faaf63b31..f7cf7b9a1 100644
--- a/Emby.Dlna/Profiles/LgTvProfile.cs
+++ b/Emby.Dlna/Profiles/LgTvProfile.cs
@@ -55,27 +55,26 @@ namespace Emby.Dlna.Profiles
{
Container = "ts",
VideoCodec = "h264",
- AudioCodec = "aac,ac3,mp3",
+ AudioCodec = "aac,ac3,mp3,dca,dts",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "mkv",
VideoCodec = "h264",
- AudioCodec = "aac,ac3,mp3",
+ AudioCodec = "aac,ac3,mp3,dca,dts",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "mp4",
VideoCodec = "h264,mpeg4",
- AudioCodec = "aac,ac3,mp3",
+ AudioCodec = "aac,ac3,mp3,dca,dts",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "mp3",
- AudioCodec = "mp3",
Type = DlnaProfileType.Audio
},
new DirectPlayProfile
diff --git a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml b/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
index 25f981ee0..754be1af8 100644
--- a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/Default.xml b/Emby.Dlna/Profiles/Xml/Default.xml
index 81209c1f6..4e29f651b 100644
--- a/Emby.Dlna/Profiles/Xml/Default.xml
+++ b/Emby.Dlna/Profiles/Xml/Default.xml
@@ -33,9 +33,9 @@
<DirectPlayProfile container="mp3,wma,aac,wav" type="Audio" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/Denon AVR.xml b/Emby.Dlna/Profiles/Xml/Denon AVR.xml
index cdf09df0e..6ddad3146 100644
--- a/Emby.Dlna/Profiles/Xml/Denon AVR.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml b/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
index b8afed60e..2021dae92 100644
--- a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
diff --git a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
index 3ad2a0129..eb63352a3 100644
--- a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
@@ -80,6 +80,12 @@
</Conditions>
<ApplyConditions />
</CodecProfile>
+ <CodecProfile type="VideoAudio">
+ <Conditions>
+ <ProfileCondition condition="Equals" property="IsSecondaryAudio" value="false" isRequired="true" />
+ </Conditions>
+ <ApplyConditions />
+ </CodecProfile>
</CodecProfiles>
<ResponseProfiles>
<ResponseProfile container="mkv,ts" type="Video" mimeType="video/mp4">
diff --git a/Emby.Dlna/Profiles/Xml/Kodi.xml b/Emby.Dlna/Profiles/Xml/Kodi.xml
index 58f9e8e23..a78984b09 100644
--- a/Emby.Dlna/Profiles/Xml/Kodi.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
index 3a185e733..dc0e97772 100644
--- a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
@@ -35,16 +35,16 @@
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<XmlRootAttributes />
<DirectPlayProfiles>
- <DirectPlayProfile container="ts" audioCodec="aac,ac3,mp3" videoCodec="h264" type="Video" />
- <DirectPlayProfile container="mkv" audioCodec="aac,ac3,mp3" videoCodec="h264" type="Video" />
- <DirectPlayProfile container="mp4" audioCodec="aac,ac3,mp3" videoCodec="h264,mpeg4" type="Video" />
- <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
+ <DirectPlayProfile container="ts" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264" type="Video" />
+ <DirectPlayProfile container="mkv" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264" type="Video" />
+ <DirectPlayProfile container="mp4" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264,mpeg4" type="Video" />
+ <DirectPlayProfile container="mp3" type="Audio" />
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml b/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
index 5723f144b..862bede9b 100644
--- a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml b/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
index 929f6898e..48dfbf9bb 100644
--- a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml b/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
index 3e3049d30..d7b142d84 100644
--- a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml b/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
index bc73d2371..9bc4c2e31 100644
--- a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles>
diff --git a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml b/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
index 31210fac1..5b2106da5 100644
--- a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
index 2bf57d426..19a8ed5f9 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
@@ -52,9 +52,9 @@
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
index 703edc35a..2fb9cf583 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
@@ -52,9 +52,9 @@
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
index 69f4b73c6..956977643 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
@@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
index a24cfab89..ddb8f2100 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
@@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="mkv" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
index 7ce41dea0..154d9a68f 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
index 600d76ea7..4b7feded9 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
index 232896c8a..39d7674a1 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
index 5cf1c5ead..8b6e88702 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
index f009d6f11..e76ca2c77 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
index f996652a8..ff4aa9cf8 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
index 3608c343b..ff2e282f8 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
index 498f9966f..7ec4ccc90 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Vlc.xml b/Emby.Dlna/Profiles/Xml/Vlc.xml
index 3a5b7927b..f1d9c1f2d 100644
--- a/Emby.Dlna/Profiles/Xml/Vlc.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Dlna/Profiles/Xml/WDTV Live.xml b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
index bf3531a30..96d37e7fb 100644
--- a/Emby.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
diff --git a/Emby.Dlna/Profiles/Xml/Xbox 360.xml b/Emby.Dlna/Profiles/Xml/Xbox 360.xml
index 2f0fee8c1..a470fa4cb 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox 360.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov">
diff --git a/Emby.Dlna/Profiles/Xml/Xbox One.xml b/Emby.Dlna/Profiles/Xml/Xbox One.xml
index e47c308e4..8c13ed8fd 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox One.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov">
diff --git a/Emby.Dlna/Profiles/Xml/foobar2000.xml b/Emby.Dlna/Profiles/Xml/foobar2000.xml
index 51f649e36..b793e2274 100644
--- a/Emby.Dlna/Profiles/Xml/foobar2000.xml
+++ b/Emby.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" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
- <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
+ <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles>
<ContainerProfiles />
<CodecProfiles />
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.cs
index a0a7416e7..215ac8492 100644
--- a/Emby.Server.Core/ApplicationHost.cs
+++ b/Emby.Server.Core/ApplicationHost.cs
@@ -1083,6 +1083,8 @@ namespace Emby.Server.Core
if (requiresRestart)
{
+ Logger.Info("App needs to be restarted due to configuration change.");
+
NotifyPendingRestart();
}
}
@@ -1204,7 +1206,8 @@ namespace Emby.Server.Core
var exclude = new[]
{
"mbplus.dll",
- "mbintros.dll"
+ "mbintros.dll",
+ "embytv.dll"
};
return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase);
@@ -1583,7 +1586,8 @@ namespace Emby.Server.Core
public void LaunchUrl(string url)
{
- if (EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows)
+ if (EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows &&
+ EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.OSX)
{
throw new NotImplementedException();
}
@@ -1591,7 +1595,7 @@ namespace Emby.Server.Core
var process = ProcessFactory.Create(new ProcessOptions
{
FileName = url,
- EnableRaisingEvents = true,
+ //EnableRaisingEvents = true,
UseShellExecute = true,
ErrorDialog = false
});
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs
index 0df916ded..f7dc93009 100644
--- a/Emby.Server.Implementations/Channels/ChannelManager.cs
+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs
@@ -79,21 +79,6 @@ namespace Emby.Server.Implementations.Channels
_channels = channels.ToArray();
}
- public string ChannelDownloadPath
- {
- get
- {
- var options = _config.GetChannelsConfiguration();
-
- if (!string.IsNullOrWhiteSpace(options.DownloadPath))
- {
- return options.DownloadPath;
- }
-
- return Path.Combine(_config.ApplicationPaths.ProgramDataPath, "channels");
- }
- }
-
private IEnumerable<IChannel> GetAllChannels()
{
return _channels
@@ -288,7 +273,7 @@ namespace Emby.Server.Implementations.Channels
_jsonSerializer.SerializeToFile(mediaSources, path);
}
- public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, bool includeCachedVersions, CancellationToken cancellationToken)
+ public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken)
{
IEnumerable<ChannelMediaInfo> results = new List<ChannelMediaInfo>();
var video = item as Video;
@@ -302,17 +287,9 @@ namespace Emby.Server.Implementations.Channels
results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
}
- var sources = SortMediaInfoResults(results)
+ return SortMediaInfoResults(results)
.Select(i => GetMediaSource(item, i))
.ToList();
-
- if (includeCachedVersions)
- {
- var cachedVersions = GetCachedChannelItemMediaSources(item);
- sources.InsertRange(0, cachedVersions);
- }
-
- return sources;
}
public async Task<IEnumerable<MediaSourceInfo>> GetDynamicMediaSources(BaseItem item, CancellationToken cancellationToken)
@@ -334,14 +311,9 @@ namespace Emby.Server.Implementations.Channels
results = new List<ChannelMediaInfo>();
}
- var list = SortMediaInfoResults(results)
+ return SortMediaInfoResults(results)
.Select(i => GetMediaSource(item, i))
.ToList();
-
- var cachedVersions = GetCachedChannelItemMediaSources(item);
- list.InsertRange(0, cachedVersions);
-
- return list;
}
private readonly ConcurrentDictionary<string, Tuple<DateTime, List<ChannelMediaInfo>>> _channelItemMediaInfo =
@@ -369,55 +341,6 @@ namespace Emby.Server.Implementations.Channels
return list;
}
- private IEnumerable<MediaSourceInfo> GetCachedChannelItemMediaSources(BaseItem item)
- {
- var filenamePrefix = item.Id.ToString("N");
- var parentPath = Path.Combine(ChannelDownloadPath, item.ChannelId);
-
- try
- {
- var files = _fileSystem.GetFiles(parentPath);
-
- if (string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
- {
- files = files.Where(i => _libraryManager.IsVideoFile(i.FullName));
- }
- else
- {
- files = files.Where(i => _libraryManager.IsAudioFile(i.FullName));
- }
-
- var file = files
- .FirstOrDefault(i => i.Name.StartsWith(filenamePrefix, StringComparison.OrdinalIgnoreCase));
-
- if (file != null)
- {
- var cachedItem = _libraryManager.ResolvePath(file);
-
- if (cachedItem != null)
- {
- var hasMediaSources = _libraryManager.GetItemById(cachedItem.Id) as IHasMediaSources;
-
- if (hasMediaSources != null)
- {
- var source = hasMediaSources.GetMediaSources(true).FirstOrDefault();
-
- if (source != null)
- {
- return new[] { source };
- }
- }
- }
- }
- }
- catch (IOException)
- {
-
- }
-
- return new List<MediaSourceInfo>();
- }
-
private MediaSourceInfo GetMediaSource(BaseItem item, ChannelMediaInfo info)
{
var source = info.ToMediaSource();
diff --git a/Emby.Server.Implementations/Connect/ConnectManager.cs b/Emby.Server.Implementations/Connect/ConnectManager.cs
index b7faaa901..8c8b7b026 100644
--- a/Emby.Server.Implementations/Connect/ConnectManager.cs
+++ b/Emby.Server.Implementations/Connect/ConnectManager.cs
@@ -570,9 +570,9 @@ namespace Emby.Server.Implementations.Connect
}
catch (HttpException ex)
{
- if (!ex.StatusCode.HasValue)
+ if (!ex.StatusCode.HasValue || ex.IsTimedOut)
{
- throw;
+ throw new Exception("Unable to invite guest, " + ex.Message, ex);
}
// If they entered a username, then whatever the error is just throw it, for example, user not found
diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs
index d6ad0ba8a..783258a13 100644
--- a/Emby.Server.Implementations/Data/SqliteExtensions.cs
+++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs
@@ -346,6 +346,18 @@ namespace Emby.Server.Implementations.Data
}
}
+ public static void TryBind(this IStatement statement, string name, double? value)
+ {
+ if (value.HasValue)
+ {
+ TryBind(statement, name, value.Value);
+ }
+ else
+ {
+ TryBindNull(statement, name);
+ }
+ }
+
public static void TryBind(this IStatement statement, string name, int? value)
{
if (value.HasValue)
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 8e6a277a4..8c16216b9 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -5267,11 +5267,19 @@ namespace Emby.Server.Implementations.Data
{
foreach (var pair in values)
{
+ var itemValue = pair.Item2;
+
+ // Don't save if invalid
+ if (string.IsNullOrWhiteSpace(itemValue))
+ {
+ continue;
+ }
+
statement.Reset();
statement.TryBind("@ItemId", itemId.ToGuidParamValue());
statement.TryBind("@Type", pair.Item1);
- statement.TryBind("@Value", pair.Item2);
+ statement.TryBind("@Value", itemValue);
if (pair.Item2 == null)
{
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index d773fbbf7..7ee0c566f 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -312,8 +312,8 @@
<HintPath>..\packages\Emby.XmlTv.1.0.3\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="MediaBrowser.Naming, Version=1.0.6178.4191, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\MediaBrowser.Naming.1.0.3\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath>
+ <Reference Include="MediaBrowser.Naming, Version=1.0.6201.24431, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\MediaBrowser.Naming.1.0.4\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -424,6 +424,9 @@
<ItemGroup>
<EmbeddedResource Include="Localization\Ratings\us.txt" />
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Localization\Ratings\uk.txt" />
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs
index 38708648f..561f5ee12 100644
--- a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs
+++ b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs
@@ -51,7 +51,7 @@ namespace Emby.Server.Implementations.EntryPoints
if (_appHost.HasPendingRestart)
{
- _timer = _timerFactory.Create(TimerCallback, null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10));
+ _timer = _timerFactory.Create(TimerCallback, null, TimeSpan.FromMinutes(15), TimeSpan.FromMinutes(15));
}
}
@@ -65,6 +65,8 @@ namespace Emby.Server.Implementations.EntryPoints
{
DisposeTimer();
+ _logger.Info("Automatically restarting the system because it is idle and a restart is required.");
+
try
{
_appHost.Restart();
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 0e1f5a551..322cdf4f0 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -91,16 +91,12 @@ namespace Emby.Server.Implementations.HttpServer
readonly Dictionary<Type, int> _mapExceptionToStatusCode = new Dictionary<Type, int>
{
- {typeof (InvalidOperationException), 500},
- {typeof (NotImplementedException), 500},
{typeof (ResourceNotFoundException), 404},
{typeof (FileNotFoundException), 404},
//{typeof (DirectoryNotFoundException), 404},
{typeof (SecurityException), 401},
{typeof (PaymentRequiredException), 402},
- {typeof (UnauthorizedAccessException), 500},
- {typeof (PlatformNotSupportedException), 500},
- {typeof (NotSupportedException), 500}
+ {typeof (ArgumentException), 400}
};
public override void Configure()
@@ -228,11 +224,30 @@ namespace Emby.Server.Implementations.HttpServer
}
}
- private void ErrorHandler(Exception ex, IRequest httpReq)
+ private int GetStatusCode(Exception ex)
+ {
+ if (ex is ArgumentException)
+ {
+ return 400;
+ }
+
+ int statusCode;
+ if (!_mapExceptionToStatusCode.TryGetValue(ex.GetType(), out statusCode))
+ {
+ statusCode = 500;
+ }
+
+ return statusCode;
+ }
+
+ private void ErrorHandler(Exception ex, IRequest httpReq, bool logException = true)
{
try
{
- _logger.ErrorException("Error processing request", ex);
+ if (logException)
+ {
+ _logger.ErrorException("Error processing request", ex);
+ }
var httpRes = httpReq.Response;
@@ -241,11 +256,7 @@ namespace Emby.Server.Implementations.HttpServer
return;
}
- int statusCode;
- if (!_mapExceptionToStatusCode.TryGetValue(ex.GetType(), out statusCode))
- {
- statusCode = 500;
- }
+ var statusCode = GetStatusCode(ex);
httpRes.StatusCode = statusCode;
httpRes.ContentType = "text/html";
@@ -264,7 +275,9 @@ namespace Emby.Server.Implementations.HttpServer
{
if (_listener != null)
{
+ _logger.Info("Stopping HttpListener...");
_listener.Stop();
+ _logger.Info("HttpListener stopped");
}
}
@@ -529,6 +542,10 @@ namespace Emby.Server.Implementations.HttpServer
ErrorHandler(new FileNotFoundException(), httpReq);
}
}
+ catch (OperationCanceledException ex)
+ {
+ ErrorHandler(ex, httpReq, false);
+ }
catch (Exception ex)
{
ErrorHandler(ex, httpReq);
@@ -698,19 +715,19 @@ namespace Emby.Server.Implementations.HttpServer
protected virtual void Dispose(bool disposing)
{
if (_disposed) return;
+
base.Dispose();
lock (_disposeLock)
{
if (_disposed) return;
+ _disposed = true;
+
if (disposing)
{
Stop();
}
-
- //release unmanaged resources here...
- _disposed = true;
}
}
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
index 995dc7b7b..e78446bc8 100644
--- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -203,20 +203,12 @@ namespace Emby.Server.Implementations.HttpServer
// Do not use the memoryStreamFactory here, they don't place nice with compression
using (var ms = new MemoryStream())
{
- using (var compressionStream = GetCompressionStream(ms, compressionType))
- {
- ContentTypes.Instance.SerializeToStream(request, dto, compressionStream);
- compressionStream.Dispose();
-
- var compressedBytes = ms.ToArray();
+ ContentTypes.Instance.SerializeToStream(request, dto, ms);
+ ms.Position = 0;
- var httpResult = new StreamWriter(compressedBytes, request.ResponseContentType, _logger);
+ var responseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- //httpResult.Headers["Content-Length"] = compressedBytes.Length.ToString(UsCulture);
- httpResult.Headers["Content-Encoding"] = compressionType;
-
- return httpResult;
- }
+ return GetCompressedResult(ms, compressionType, responseHeaders, false, request.ResponseContentType).Result;
}
}
@@ -591,45 +583,53 @@ namespace Emby.Server.Implementations.HttpServer
};
}
- string content;
-
using (var stream = await factoryFn().ConfigureAwait(false))
{
- using (var reader = new StreamReader(stream))
+ return await GetCompressedResult(stream, requestedCompressionType, responseHeaders, isHeadRequest, contentType).ConfigureAwait(false);
+ }
+ }
+
+ private async Task<IHasHeaders> GetCompressedResult(Stream stream,
+ string requestedCompressionType,
+ IDictionary<string,string> responseHeaders,
+ bool isHeadRequest,
+ string contentType)
+ {
+ using (var reader = new MemoryStream())
+ {
+ await stream.CopyToAsync(reader).ConfigureAwait(false);
+
+ reader.Position = 0;
+ var content = reader.ToArray();
+
+ if (content.Length >= 1024)
{
- content = await reader.ReadToEndAsync().ConfigureAwait(false);
+ content = Compress(content, requestedCompressionType);
+ responseHeaders["Content-Encoding"] = requestedCompressionType;
}
- }
- var contents = Compress(content, requestedCompressionType);
+ responseHeaders["Content-Length"] = content.Length.ToString(UsCulture);
- responseHeaders["Content-Length"] = contents.Length.ToString(UsCulture);
- responseHeaders["Content-Encoding"] = requestedCompressionType;
+ if (isHeadRequest)
+ {
+ return GetHttpResult(new byte[] { }, contentType, true);
+ }
- if (isHeadRequest)
- {
- return GetHttpResult(new byte[] { }, contentType, true);
+ return GetHttpResult(content, contentType, true, responseHeaders);
}
-
- return GetHttpResult(contents, contentType, true, responseHeaders);
}
- private byte[] Compress(string text, string compressionType)
+ private byte[] Compress(byte[] bytes, string compressionType)
{
if (compressionType == "deflate")
- return Deflate(text);
+ return Deflate(bytes);
if (compressionType == "gzip")
- return GZip(text);
+ return GZip(bytes);
throw new NotSupportedException(compressionType);
}
- private byte[] Deflate(string text)
- {
- return Deflate(Encoding.UTF8.GetBytes(text));
- }
-
private byte[] Deflate(byte[] bytes)
{
// In .NET FX incompat-ville, you can't access compressed bytes without closing DeflateStream
@@ -644,11 +644,6 @@ namespace Emby.Server.Implementations.HttpServer
}
}
- private byte[] GZip(string text)
- {
- return GZip(Encoding.UTF8.GetBytes(text));
- }
-
private byte[] GZip(byte[] buffer)
{
using (var ms = new MemoryStream())
diff --git a/Emby.Server.Implementations/HttpServer/IHttpListener.cs b/Emby.Server.Implementations/HttpServer/IHttpListener.cs
index 9f96a8e49..18df5682d 100644
--- a/Emby.Server.Implementations/HttpServer/IHttpListener.cs
+++ b/Emby.Server.Implementations/HttpServer/IHttpListener.cs
@@ -12,7 +12,7 @@ namespace Emby.Server.Implementations.HttpServer
/// Gets or sets the error handler.
/// </summary>
/// <value>The error handler.</value>
- Action<Exception, IRequest> ErrorHandler { get; set; }
+ Action<Exception, IRequest, bool> ErrorHandler { get; set; }
/// <summary>
/// Gets or sets the request handler.
diff --git a/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs b/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs
index 4606d0e31..652fc4f83 100644
--- a/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs
+++ b/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs
@@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
_httpRequestFactory = httpRequestFactory;
}
- public Action<Exception, IRequest> ErrorHandler { get; set; }
+ public Action<Exception, IRequest, bool> ErrorHandler { get; set; }
public Func<IHttpRequest, Uri, Task> RequestHandler { get; set; }
public Action<WebSocketConnectingEventArgs> WebSocketConnecting { get; set; }
@@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
_logger.ErrorException("Error processing request", ex);
httpReq = httpReq ?? GetRequest(context);
- ErrorHandler(ex, httpReq);
+ ErrorHandler(ex, httpReq, true);
return Task.FromResult(true);
}
diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
index 2e69cd2ef..d782f5b88 100644
--- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
+++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
@@ -9,6 +9,7 @@ using System.Linq;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Logging;
namespace Emby.Server.Implementations.Library
{
@@ -19,6 +20,7 @@ namespace Emby.Server.Implementations.Library
{
private readonly IFileSystem _fileSystem;
private readonly ILibraryManager _libraryManager;
+ private readonly ILogger _logger;
/// <summary>
/// Any folder named in this list will be ignored - can be added to at runtime for extensibility
@@ -40,10 +42,11 @@ namespace Emby.Server.Implementations.Library
};
- public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager)
+ public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager, ILogger logger)
{
_fileSystem = fileSystem;
_libraryManager = libraryManager;
+ _logger = logger;
}
/// <summary>
@@ -54,6 +57,12 @@ namespace Emby.Server.Implementations.Library
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
public bool ShouldIgnore(FileSystemMetadata fileInfo, BaseItem parent)
{
+ // Don't ignore top level folders
+ if (fileInfo.IsDirectory && parent is AggregateFolder)
+ {
+ return false;
+ }
+
var filename = fileInfo.Name;
var isHidden = fileInfo.IsHidden;
var path = fileInfo.FullName;
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 5bf53fcb4..4c788a2ab 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -3084,7 +3084,11 @@ namespace Emby.Server.Implementations.Library
foreach (var contentType in ConfigurationManager.Configuration.ContentTypes)
{
- if (string.Equals(path, contentType.Name, StringComparison.OrdinalIgnoreCase)
+ if (string.IsNullOrWhiteSpace(contentType.Name))
+ {
+ removeList.Add(contentType);
+ }
+ else if (string.Equals(path, contentType.Name, StringComparison.OrdinalIgnoreCase)
|| _fileSystem.ContainsSubPath(path, contentType.Name))
{
removeList.Add(contentType);
diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
index 55a63b4e5..b791311f9 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
@@ -74,21 +74,21 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
if (string.Equals(collectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase))
{
- return ResolveVideos<MusicVideo>(parent, files, directoryService, false);
+ return ResolveVideos<MusicVideo>(parent, files, directoryService, false, collectionType);
}
if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) ||
string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
{
- return ResolveVideos<Video>(parent, files, directoryService, false);
+ return ResolveVideos<Video>(parent, files, directoryService, false, collectionType);
}
- if (string.IsNullOrEmpty(collectionType))
+ if (string.IsNullOrWhiteSpace(collectionType))
{
// Owned items should just use the plain video type
if (parent == null)
{
- return ResolveVideos<Video>(parent, files, directoryService, false);
+ return ResolveVideos<Video>(parent, files, directoryService, false, collectionType);
}
if (parent is Series || parent.GetParents().OfType<Series>().Any())
@@ -96,18 +96,18 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
return null;
}
- return ResolveVideos<Movie>(parent, files, directoryService, false);
+ return ResolveVideos<Movie>(parent, files, directoryService, false, collectionType);
}
if (string.Equals(collectionType, CollectionType.Movies, StringComparison.OrdinalIgnoreCase))
{
- return ResolveVideos<Movie>(parent, files, directoryService, true);
+ return ResolveVideos<Movie>(parent, files, directoryService, true, collectionType);
}
return null;
}
- private MultiItemResolverResult ResolveVideos<T>(Folder parent, IEnumerable<FileSystemMetadata> fileSystemEntries, IDirectoryService directoryService, bool suppportMultiEditions)
+ private MultiItemResolverResult ResolveVideos<T>(Folder parent, IEnumerable<FileSystemMetadata> fileSystemEntries, IDirectoryService directoryService, bool suppportMultiEditions, string collectionType)
where T : Video, new()
{
var files = new List<FileSystemMetadata>();
@@ -117,6 +117,16 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
// Loop through each child file/folder and see if we find a video
foreach (var child in fileSystemEntries)
{
+ // This is a hack but currently no better way to resolve a sometimes ambiguous situation
+ if (string.IsNullOrWhiteSpace(collectionType))
+ {
+ if (string.Equals(child.Name, "tvshow.nfo", StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(child.Name, "season.nfo", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+ }
+
if (child.IsDirectory)
{
leftOver.Add(child);
@@ -408,7 +418,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
!string.Equals(collectionType, CollectionType.Photos) &&
!string.Equals(collectionType, CollectionType.MusicVideos);
- var result = ResolveVideos<T>(parent, fileSystemEntries, directoryService, supportsMultiVersion);
+ var result = ResolveVideos<T>(parent, fileSystemEntries, directoryService, supportsMultiVersion, collectionType) ??
+ new MultiItemResolverResult();
if (result.Items.Count == 1)
{
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
index 6d527c1cf..ef440899c 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs
@@ -34,7 +34,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
var httpRequestOptions = new HttpRequestOptions
{
Url = mediaSource.Path,
- BufferContent = false
+ BufferContent = false,
+
+ // Some remote urls will expect a user agent to be supplied
+ UserAgent = "Emby/3.0",
+
+ // Shouldn't matter but may cause issues
+ EnableHttpCompression = false
};
using (var response = await _httpClient.SendAsync(httpRequestOptions, "GET").ConfigureAwait(false))
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 04fc78c95..e2446b16f 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -422,7 +422,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
var showType = details.showType ?? string.Empty;
-
+
var info = new ProgramInfo
{
ChannelId = channel,
@@ -440,10 +440,23 @@ namespace Emby.Server.Implementations.LiveTv.Listings
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
- ShowId = programInfo.programID,
Etag = programInfo.md5
};
+ var showId = programInfo.programID ?? string.Empty;
+
+ // According to SchedulesDirect, these are generic, unidentified episodes
+ // SH005316560000
+ var hasUniqueShowId = !showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) ||
+ !showId.EndsWith("0000", StringComparison.OrdinalIgnoreCase);
+
+ if (!hasUniqueShowId)
+ {
+ showId = newID;
+ }
+
+ info.ShowId = showId;
+
if (programInfo.videoProperties != null)
{
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index 525db4036..62a0738c7 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -2647,7 +2647,7 @@ namespace Emby.Server.Implementations.LiveTv
public GuideInfo GetGuideInfo()
{
var startDate = DateTime.UtcNow;
- var endDate = startDate.AddDays(14);
+ var endDate = startDate.AddDays(GetGuideDays());
return new GuideInfo
{
diff --git a/Emby.Server.Implementations/Localization/Ratings/uk.txt b/Emby.Server.Implementations/Localization/Ratings/uk.txt
new file mode 100644
index 000000000..20440921f
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Ratings/uk.txt
@@ -0,0 +1,7 @@
+UK-U,1
+UK-PG,5
+UK-12,7
+UK-12A,7
+UK-15,9
+UK-18,10
+UK-R18,15 \ No newline at end of file
diff --git a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
index d75815847..5f37025e2 100644
--- a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs
@@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
new TaskTriggerInfo
{
Type = TaskTriggerInfo.TriggerDaily,
- TimeOfDayTicks = TimeSpan.FromHours(1).Ticks,
+ TimeOfDayTicks = TimeSpan.FromHours(2).Ticks,
MaxRuntimeMs = Convert.ToInt32(TimeSpan.FromHours(4).TotalMilliseconds)
}
};
diff --git a/Emby.Server.Implementations/Sync/CloudSyncProfile.cs b/Emby.Server.Implementations/Sync/CloudSyncProfile.cs
index 1a78c8ae6..c0675df81 100644
--- a/Emby.Server.Implementations/Sync/CloudSyncProfile.cs
+++ b/Emby.Server.Implementations/Sync/CloudSyncProfile.cs
@@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.Sync
},
new ProfileCondition
{
- Condition = ProfileConditionType.EqualsAny,
+ Condition = ProfileConditionType.Equals,
Property = ProfileConditionValue.NumVideoStreams,
Value = "1",
IsRequired = false
@@ -232,20 +232,6 @@ namespace Emby.Server.Implementations.Sync
{
new ProfileCondition
{
- Condition = ProfileConditionType.LessThanEqual,
- Property = ProfileConditionValue.AudioChannels,
- Value = "2",
- IsRequired = true
- },
- new ProfileCondition
- {
- Condition = ProfileConditionType.LessThanEqual,
- Property = ProfileConditionValue.AudioBitrate,
- Value = "320000",
- IsRequired = true
- },
- new ProfileCondition
- {
Condition = ProfileConditionType.Equals,
Property = ProfileConditionValue.IsSecondaryAudio,
Value = "false",
diff --git a/Emby.Server.Implementations/Sync/SyncJobProcessor.cs b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs
index 415757609..b1adc64df 100644
--- a/Emby.Server.Implementations/Sync/SyncJobProcessor.cs
+++ b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs
@@ -515,8 +515,14 @@ namespace Emby.Server.Implementations.Sync
jobItem.Progress = 0;
- var syncOptions = _config.GetSyncOptions();
var job = _syncManager.GetJob(jobItem.JobId);
+ if (job == null)
+ {
+ _logger.Error("Job not found. Cannot complete the sync job.");
+ await _syncManager.CancelJobItem(jobItem.Id).ConfigureAwait(false);
+ return;
+ }
+
var user = _userManager.GetUserById(job.UserId);
if (user == null)
{
@@ -552,6 +558,8 @@ namespace Emby.Server.Implementations.Sync
}
}
+ var syncOptions = _config.GetSyncOptions();
+
var video = item as Video;
if (video != null)
{
diff --git a/Emby.Server.Implementations/Sync/SyncManager.cs b/Emby.Server.Implementations/Sync/SyncManager.cs
index 13f60f5ee..310b35afe 100644
--- a/Emby.Server.Implementations/Sync/SyncManager.cs
+++ b/Emby.Server.Implementations/Sync/SyncManager.cs
@@ -1030,6 +1030,18 @@ namespace Emby.Server.Implementations.Sync
{
await CancelJobItem(jobItem.Id).ConfigureAwait(false);
}
+
+ var syncJobResult = await GetJobs(new SyncJobQuery
+ {
+ ItemId = item,
+ TargetId = targetId
+
+ }).ConfigureAwait(false);
+
+ foreach (var job in syncJobResult.Items)
+ {
+ await CancelJob(job.Id).ConfigureAwait(false);
+ }
}
}
@@ -1037,15 +1049,7 @@ namespace Emby.Server.Implementations.Sync
{
var jobItem = _repo.GetJobItem(id);
- if (jobItem.Status != SyncJobItemStatus.Queued && jobItem.Status != SyncJobItemStatus.ReadyToTransfer && jobItem.Status != SyncJobItemStatus.Converting && jobItem.Status != SyncJobItemStatus.Failed && jobItem.Status != SyncJobItemStatus.Synced && jobItem.Status != SyncJobItemStatus.Transferring)
- {
- throw new ArgumentException("Operation is not valid for this job item");
- }
-
- if (jobItem.Status != SyncJobItemStatus.Synced)
- {
- jobItem.Status = SyncJobItemStatus.Cancelled;
- }
+ jobItem.Status = SyncJobItemStatus.Cancelled;
jobItem.Progress = 0;
jobItem.IsMarkedForRemoval = true;
@@ -1071,18 +1075,18 @@ namespace Emby.Server.Implementations.Sync
_logger.ErrorException("Error deleting directory {0}", ex, path);
}
- //var jobItemsResult = GetJobItems(new SyncJobItemQuery
- //{
- // AddMetadata = false,
- // JobId = jobItem.JobId,
- // Limit = 0,
- // Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Failed, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring }
- //});
+ var jobItemsResult = GetJobItems(new SyncJobItemQuery
+ {
+ AddMetadata = false,
+ JobId = jobItem.JobId,
+ Limit = 0,
+ Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring }
+ });
- //if (jobItemsResult.TotalRecordCount == 0)
- //{
- // await CancelJob(jobItem.JobId).ConfigureAwait(false);
- //}
+ if (jobItemsResult.TotalRecordCount == 0)
+ {
+ await CancelJob(jobItem.JobId).ConfigureAwait(false);
+ }
}
public Task MarkJobItemForRemoval(string id)
diff --git a/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs b/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs
index 46cdb28a4..06e0e66a9 100644
--- a/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs
+++ b/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs
@@ -38,6 +38,18 @@ namespace Emby.Server.Implementations.Sync
}
}
+
+ if (item.Status == SyncJobItemStatus.Cancelled)
+ {
+ try
+ {
+ await _sessionManager.SendMessageToUserDeviceSessions(item.TargetId, "SyncJobItemCancelled", item, CancellationToken.None).ConfigureAwait(false);
+ }
+ catch
+ {
+
+ }
+ }
}
public void Dispose()
diff --git a/Emby.Server.Implementations/Sync/SyncRepository.cs b/Emby.Server.Implementations/Sync/SyncRepository.cs
index 885f8e64a..aafce3500 100644
--- a/Emby.Server.Implementations/Sync/SyncRepository.cs
+++ b/Emby.Server.Implementations/Sync/SyncRepository.cs
@@ -221,48 +221,70 @@ namespace Emby.Server.Implementations.Sync
using (var connection = CreateConnection())
{
string commandText;
- var paramList = new List<object>();
if (insert)
{
- commandText = "insert into SyncJobs (Id, TargetId, Name, Profile, Quality, Bitrate, Status, Progress, UserId, ItemIds, Category, ParentId, UnwatchedOnly, ItemLimit, SyncNewContent, DateCreated, DateLastModified, ItemCount) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+ commandText = "insert into SyncJobs (Id, TargetId, Name, Profile, Quality, Bitrate, Status, Progress, UserId, ItemIds, Category, ParentId, UnwatchedOnly, ItemLimit, SyncNewContent, DateCreated, DateLastModified, ItemCount) values (@Id, @TargetId, @Name, @Profile, @Quality, @Bitrate, @Status, @Progress, @UserId, @ItemIds, @Category, @ParentId, @UnwatchedOnly, @ItemLimit, @SyncNewContent, @DateCreated, @DateLastModified, @ItemCount)";
}
else
{
- commandText = "update SyncJobs set TargetId=?,Name=?,Profile=?,Quality=?,Bitrate=?,Status=?,Progress=?,UserId=?,ItemIds=?,Category=?,ParentId=?,UnwatchedOnly=?,ItemLimit=?,SyncNewContent=?,DateCreated=?,DateLastModified=?,ItemCount=? where Id=?";
+ commandText = "update SyncJobs set TargetId=@TargetId,Name=@Name,Profile=@Profile,Quality=@Quality,Bitrate=@Bitrate,Status=@Status,Progress=@Progress,UserId=@UserId,ItemIds=@ItemIds,Category=@Category,ParentId=@ParentId,UnwatchedOnly=@UnwatchedOnly,ItemLimit=@ItemLimit,SyncNewContent=@SyncNewContent,DateCreated=@DateCreated,DateLastModified=@DateLastModified,ItemCount=@ItemCount where Id=@Id";
}
- paramList.Add(job.TargetId);
- paramList.Add(job.Name);
- paramList.Add(job.Profile);
- paramList.Add(job.Quality);
- paramList.Add(job.Bitrate);
- paramList.Add(job.Status.ToString());
- paramList.Add(job.Progress);
- paramList.Add(job.UserId);
+ connection.RunInTransaction(conn =>
+ {
+ using (var statement = PrepareStatementSafe(connection, commandText))
+ {
+ statement.TryBind("@TargetId", job.TargetId);
+ statement.TryBind("@Name", job.Name);
+ statement.TryBind("@Profile", job.Profile);
+ statement.TryBind("@Quality", job.Quality);
+ statement.TryBind("@Bitrate", job.Bitrate);
+ statement.TryBind("@Status", job.Status.ToString());
+ statement.TryBind("@Progress", job.Progress);
+ statement.TryBind("@UserId", job.UserId);
+
+ statement.TryBind("@ItemIds", string.Join(",", job.RequestedItemIds.ToArray()));
+
+ if (job.Category.HasValue)
+ {
+ statement.TryBind("@Category", job.Category.Value.ToString());
+ }
+ else
+ {
+ statement.TryBindNull("@Category");
+ }
- paramList.Add(string.Join(",", job.RequestedItemIds.ToArray()));
- paramList.Add(job.Category);
- paramList.Add(job.ParentId);
- paramList.Add(job.UnwatchedOnly);
- paramList.Add(job.ItemLimit);
- paramList.Add(job.SyncNewContent);
- paramList.Add(job.DateCreated.ToDateTimeParamValue());
- paramList.Add(job.DateLastModified.ToDateTimeParamValue());
- paramList.Add(job.ItemCount);
+ if (!string.IsNullOrWhiteSpace(job.ParentId))
+ {
+ statement.TryBind("@ParentId", job.ParentId);
+ }
+ else
+ {
+ statement.TryBindNull("@ParentId");
+ }
- if (insert)
- {
- paramList.Insert(0, job.Id.ToGuidParamValue());
- }
- else
- {
- paramList.Add(job.Id.ToGuidParamValue());
- }
+ statement.TryBind("@UnwatchedOnly", job.UnwatchedOnly);
- connection.RunInTransaction(conn =>
- {
- conn.Execute(commandText, paramList.ToArray());
+ if (job.ItemLimit.HasValue)
+ {
+ statement.TryBind("@ItemLimit", job.ItemLimit);
+ }
+ else
+ {
+ statement.TryBindNull("@ItemLimit");
+ }
+
+ statement.TryBind("@SyncNewContent", job.SyncNewContent);
+
+ statement.TryBind("@DateCreated", job.DateCreated.ToDateTimeParamValue());
+ statement.TryBind("@DateLastModified", job.DateLastModified.ToDateTimeParamValue());
+
+ statement.TryBind("@ItemCount", job.ItemCount);
+ statement.TryBind("@Id", job.Id.ToGuidParamValue());
+
+ statement.MoveNext();
+ }
}, TransactionMode);
}
}
@@ -338,6 +360,11 @@ namespace Emby.Server.Implementations.Sync
whereClauses.Add("UserId=?");
paramList.Add(query.UserId);
}
+ if (!string.IsNullOrWhiteSpace(query.ItemId))
+ {
+ whereClauses.Add("ItemIds like ?");
+ paramList.Add("%" + query.ItemId + "%");
+ }
if (query.SyncNewContent.HasValue)
{
whereClauses.Add("SyncNewContent=?");
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs
index c15e0ee41..79a1e4640 100644
--- a/Emby.Server.Implementations/Udp/UdpServer.cs
+++ b/Emby.Server.Implementations/Udp/UdpServer.cs
@@ -154,6 +154,9 @@ namespace Emby.Server.Implementations.Udp
catch (ObjectDisposedException)
{
}
+ catch (OperationCanceledException)
+ {
+ }
catch (Exception ex)
{
_logger.ErrorException("Error receiving udp message", ex);
@@ -167,6 +170,11 @@ namespace Emby.Server.Implementations.Udp
/// <param name="message">The message.</param>
private void OnMessageReceived(SocketReceiveResult message)
{
+ if (_isDisposed)
+ {
+ return;
+ }
+
if (message.RemoteEndPoint.Port == 0)
{
return;
@@ -221,6 +229,11 @@ namespace Emby.Server.Implementations.Udp
public async Task SendAsync(byte[] bytes, IpEndPointInfo remoteEndPoint)
{
+ if (_isDisposed)
+ {
+ throw new ObjectDisposedException(GetType().Name);
+ }
+
if (bytes == null)
{
throw new ArgumentNullException("bytes");
diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config
index 09b0af898..fcce67b33 100644
--- a/Emby.Server.Implementations/packages.config
+++ b/Emby.Server.Implementations/packages.config
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Emby.XmlTv" version="1.0.3" targetFramework="portable45-net45+win8" />
- <package id="MediaBrowser.Naming" version="1.0.3" targetFramework="portable45-net45+win8" />
+ <package id="MediaBrowser.Naming" version="1.0.4" targetFramework="portable45-net45+win8" />
<package id="SQLitePCL.pretty" version="1.1.0" targetFramework="portable45-net45+win8" />
<package id="SQLitePCLRaw.core" version="1.1.1" targetFramework="portable45-net45+win8" />
<package id="UniversalDetector" version="1.0.1" targetFramework="portable45-net45+win8" />
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs
index b0a0e79ae..5c99d98c2 100644
--- a/MediaBrowser.Api/ItemUpdateService.cs
+++ b/MediaBrowser.Api/ItemUpdateService.cs
@@ -99,6 +99,7 @@ namespace MediaBrowser.Api
var path = item.ContainingFolderPath;
var types = _config.Configuration.ContentTypes
+ .Where(i => !string.IsNullOrWhiteSpace(i.Name))
.Where(i => !string.Equals(i.Name, path, StringComparison.OrdinalIgnoreCase))
.ToList();
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 6545d995c..7f568183e 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -870,33 +870,47 @@ namespace MediaBrowser.Api.Playback
inputChannels = null;
}
- int? resultChannels = null;
+ int? transcoderChannelLimit = null;
var codec = outputAudioCodec ?? string.Empty;
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
{
// wmav2 currently only supports two channel output
- resultChannels = Math.Min(2, inputChannels ?? 2);
+ transcoderChannelLimit = 2;
}
- else if (request.MaxAudioChannels.HasValue)
+ else if (codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ // libmp3lame currently only supports two channel output
+ transcoderChannelLimit = 2;
+ }
+ else
{
- var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
- ? 2
- : 6;
+ // If we don't have any media info then limit it to 6 to prevent encoding errors due to asking for too many channels
+ transcoderChannelLimit = 6;
+ }
- if (inputChannels.HasValue)
- {
- channelLimit = Math.Min(channelLimit, inputChannels.Value);
- }
+ var isTranscodingAudio = !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase);
+
+ int? resultChannels = null;
+ if (isTranscodingAudio)
+ {
+ resultChannels = request.TranscodingMaxAudioChannels;
+ }
+ resultChannels = resultChannels ?? request.MaxAudioChannels ?? request.AudioChannels;
- // If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
- resultChannels = Math.Min(request.MaxAudioChannels.Value, channelLimit);
+ if (inputChannels.HasValue)
+ {
+ resultChannels = resultChannels.HasValue
+ ? Math.Min(resultChannels.Value, inputChannels.Value)
+ : inputChannels.Value;
}
- if (request.TranscodingMaxAudioChannels.HasValue && !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
+ if (isTranscodingAudio && transcoderChannelLimit.HasValue)
{
- resultChannels = Math.Min(request.TranscodingMaxAudioChannels.Value, resultChannels ?? inputChannels ?? request.TranscodingMaxAudioChannels.Value);
+ resultChannels = resultChannels.HasValue
+ ? Math.Min(resultChannels.Value, transcoderChannelLimit.Value)
+ : transcoderChannelLimit.Value;
}
return resultChannels ?? request.AudioChannels;
@@ -1054,7 +1068,19 @@ namespace MediaBrowser.Api.Playback
arg += string.Format(" -canvas_size {0}:{1}", state.VideoStream.Width.Value.ToString(CultureInfo.InvariantCulture), Convert.ToInt32(height).ToString(CultureInfo.InvariantCulture));
}
- arg += " -i \"" + state.SubtitleStream.Path + "\"";
+
+ var subtitlePath = state.SubtitleStream.Path;
+
+ if (string.Equals(Path.GetExtension(subtitlePath), ".sub", StringComparison.OrdinalIgnoreCase))
+ {
+ var idxFile = Path.ChangeExtension(subtitlePath, ".idx");
+ if (FileSystem.FileExists(idxFile))
+ {
+ subtitlePath = idxFile;
+ }
+ }
+
+ arg += " -i \"" + subtitlePath + "\"";
}
}
@@ -1467,7 +1493,7 @@ namespace MediaBrowser.Api.Playback
}
// h264
- return string.Format(" -b:v {0} -maxrate {0} -bufsize {1}",
+ return string.Format(" -maxrate {0} -bufsize {1}",
bitrate.Value.ToString(UsCulture),
(bitrate.Value * 2).ToString(UsCulture));
}
@@ -1756,13 +1782,6 @@ namespace MediaBrowser.Api.Playback
{
if (videoRequest != null)
{
- videoRequest.EnableSplittingOnNonKeyFrames = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
- }
- }
- else if (i == 30)
- {
- if (videoRequest != null)
- {
videoRequest.RequireAvc = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
}
}
@@ -1948,10 +1967,15 @@ namespace MediaBrowser.Api.Playback
state.OutputVideoCodec = state.VideoRequest.VideoCodec;
state.OutputVideoBitrate = GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream, state.OutputVideoCodec);
- if (state.OutputVideoBitrate.HasValue)
+ if (videoRequest != null)
+ {
+ TryStreamCopy(state, videoRequest);
+ }
+
+ if (state.OutputVideoBitrate.HasValue && !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{
var resolution = ResolutionNormalizer.Normalize(
- state.VideoStream == null ? (int?)null : state.VideoStream.BitRate,
+ state.VideoStream == null ? (int?) null : state.VideoStream.BitRate,
state.OutputVideoBitrate.Value,
state.VideoStream == null ? null : state.VideoStream.Codec,
state.OutputVideoCodec,
@@ -1961,13 +1985,12 @@ namespace MediaBrowser.Api.Playback
videoRequest.MaxWidth = resolution.MaxWidth;
videoRequest.MaxHeight = resolution.MaxHeight;
}
- }
- ApplyDeviceProfileSettings(state);
-
- if (videoRequest != null)
+ ApplyDeviceProfileSettings(state);
+ }
+ else
{
- TryStreamCopy(state, videoRequest);
+ ApplyDeviceProfileSettings(state);
}
state.OutputFilePath = GetOutputFilePath(state);
@@ -2096,7 +2119,7 @@ namespace MediaBrowser.Api.Playback
state.MediaSource = mediaSource;
}
- protected virtual bool CanStreamCopyVideo(StreamState state)
+ protected bool CanStreamCopyVideo(StreamState state)
{
var request = state.VideoRequest;
var videoStream = state.VideoStream;
@@ -2381,7 +2404,6 @@ namespace MediaBrowser.Api.Playback
{
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
state.VideoRequest.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
- state.VideoRequest.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
}
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index f1b5b4681..171c971f1 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -886,8 +886,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
- var enableSplittingOnNonKeyFrames = state.VideoRequest.EnableSplittingOnNonKeyFrames && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase);
- enableSplittingOnNonKeyFrames = false;
+ var enableSplittingOnNonKeyFrames = string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && false;
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
var hlsProtocolSupportsSplittingByTime = false;
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
index e29aa7d5a..7ae64b834 100644
--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
@@ -153,7 +153,7 @@ namespace MediaBrowser.Api.Playback.Progressive
if (!state.RunTimeTicks.HasValue)
{
- args += " -fflags +genpts -flags +global_header";
+ args += " -flags -global_header -fflags +genpts";
}
return args;
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs
index 50c779765..2a2ad92cd 100644
--- a/MediaBrowser.Api/Playback/StreamRequest.cs
+++ b/MediaBrowser.Api/Playback/StreamRequest.cs
@@ -194,7 +194,6 @@ namespace MediaBrowser.Api.Playback
public bool CopyTimestamps { get; set; }
public bool EnableSubtitlesInManifest { get; set; }
- public bool EnableSplittingOnNonKeyFrames { get; set; }
public bool RequireAvc { get; set; }
public VideoStreamRequest()
diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs
index 9177e2d81..792744628 100644
--- a/MediaBrowser.Controller/Channels/IChannelManager.cs
+++ b/MediaBrowser.Controller/Channels/IChannelManager.cs
@@ -15,16 +15,9 @@ namespace MediaBrowser.Controller.Channels
/// Adds the parts.
/// </summary>
/// <param name="channels">The channels.</param>
- /// <param name="factories">The factories.</param>
void AddParts(IEnumerable<IChannel> channels);
/// <summary>
- /// Gets the channel download path.
- /// </summary>
- /// <value>The channel download path.</value>
- string ChannelDownloadPath { get; }
-
- /// <summary>
/// Gets the channel features.
/// </summary>
/// <param name="id">The identifier.</param>
@@ -115,10 +108,9 @@ namespace MediaBrowser.Controller.Channels
/// Gets the channel item media sources.
/// </summary>
/// <param name="item">The item.</param>
- /// <param name="includeCachedVersions">if set to <c>true</c> [include cached versions].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
- Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, bool includeCachedVersions, CancellationToken cancellationToken);
+ Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel folder.
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index e4f638cb6..3a6a7765b 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -206,7 +206,7 @@ namespace MediaBrowser.Controller.Entities.Audio
{
if (SourceType == SourceType.Channel)
{
- var sources = ChannelManager.GetStaticMediaSources(this, false, CancellationToken.None)
+ var sources = ChannelManager.GetStaticMediaSources(this, CancellationToken.None)
.Result.ToList();
if (sources.Count > 0)
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs
index 7ba59df4f..47df12e1b 100644
--- a/MediaBrowser.Controller/Entities/Video.cs
+++ b/MediaBrowser.Controller/Entities/Video.cs
@@ -549,7 +549,7 @@ namespace MediaBrowser.Controller.Entities
{
if (SourceType == SourceType.Channel)
{
- var sources = ChannelManager.GetStaticMediaSources(this, false, CancellationToken.None)
+ var sources = ChannelManager.GetStaticMediaSources(this, CancellationToken.None)
.Result.ToList();
if (sources.Count > 0)
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
index 844fafcde..d5fe790b9 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs
@@ -35,6 +35,7 @@ namespace MediaBrowser.Controller.MediaEncoding
public string VideoCodec { get; set; }
+ public int? TranscodingMaxAudioChannels { get; set; }
public int? VideoBitRate { get; set; }
public int? AudioStreamIndex { get; set; }
public int? VideoStreamIndex { get; set; }
@@ -86,6 +87,7 @@ namespace MediaBrowser.Controller.MediaEncoding
MaxVideoBitDepth = info.MaxVideoBitDepth;
SubtitleMethod = info.SubtitleDeliveryMethod;
Context = info.Context;
+ TranscodingMaxAudioChannels = info.TranscodingMaxAudioChannels;
if (info.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
{
diff --git a/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs b/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
index bf7343f3d..219b1f3c5 100644
--- a/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
+++ b/MediaBrowser.MediaEncoding/BdInfo/BdInfoExaminer.cs
@@ -30,6 +30,11 @@ namespace MediaBrowser.MediaEncoding.BdInfo
/// <returns>BlurayDiscInfo.</returns>
public BlurayDiscInfo GetDiscInfo(string path)
{
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
var bdrom = new BDROM(path, _fileSystem, _textEncoding);
bdrom.Scan();
diff --git a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
index b8087fded..80bbc87e3 100644
--- a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
@@ -474,7 +474,19 @@ namespace MediaBrowser.MediaEncoding.Encoder
arg += string.Format(" -canvas_size {0}:{1}", state.VideoStream.Width.Value.ToString(CultureInfo.InvariantCulture), Convert.ToInt32(height).ToString(CultureInfo.InvariantCulture));
}
- arg += " -i \"" + state.SubtitleStream.Path + "\"";
+
+ var subtitlePath = state.SubtitleStream.Path;
+
+ if (string.Equals(Path.GetExtension(subtitlePath), ".sub", StringComparison.OrdinalIgnoreCase))
+ {
+ var idxFile = Path.ChangeExtension(subtitlePath, ".idx");
+ if (FileSystem.FileExists(idxFile))
+ {
+ subtitlePath = idxFile;
+ }
+ }
+
+ arg += " -i \"" + subtitlePath + "\"";
}
}
@@ -816,7 +828,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
// h264
- return string.Format(" -b:v {0} -maxrate {0} -bufsize {1}",
+ return string.Format(" -maxrate {0} -bufsize {1}",
bitrate.Value.ToString(UsCulture),
(bitrate.Value * 2).ToString(UsCulture));
}
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs
index e197bdb6f..d6340d4ab 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs
@@ -370,30 +370,50 @@ namespace MediaBrowser.MediaEncoding.Encoder
inputChannels = null;
}
+ int? transcoderChannelLimit = null;
var codec = outputAudioCodec ?? string.Empty;
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
{
// wmav2 currently only supports two channel output
- return Math.Min(2, inputChannels ?? 2);
+ transcoderChannelLimit = 2;
}
- if (request.MaxAudioChannels.HasValue)
+ else if (codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1)
{
- var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
- ? 2
- : 6;
+ // libmp3lame currently only supports two channel output
+ transcoderChannelLimit = 2;
+ }
+ else
+ {
+ // If we don't have any media info then limit it to 6 to prevent encoding errors due to asking for too many channels
+ transcoderChannelLimit = 6;
+ }
- if (inputChannels.HasValue)
- {
- channelLimit = Math.Min(channelLimit, inputChannels.Value);
- }
+ var isTranscodingAudio = !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase);
- // If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
- return Math.Min(request.MaxAudioChannels.Value, channelLimit);
+ int? resultChannels = null;
+ if (isTranscodingAudio)
+ {
+ resultChannels = request.TranscodingMaxAudioChannels;
+ }
+ resultChannels = resultChannels ?? request.MaxAudioChannels ?? request.AudioChannels;
+
+ if (inputChannels.HasValue)
+ {
+ resultChannels = resultChannels.HasValue
+ ? Math.Min(resultChannels.Value, inputChannels.Value)
+ : inputChannels.Value;
+ }
+
+ if (isTranscodingAudio && transcoderChannelLimit.HasValue)
+ {
+ resultChannels = resultChannels.HasValue
+ ? Math.Min(resultChannels.Value, transcoderChannelLimit.Value)
+ : transcoderChannelLimit.Value;
}
- return request.AudioChannels;
+ return resultChannels ?? request.AudioChannels;
}
private int? GetVideoBitrateParamValue(EncodingJobOptions request, MediaStream videoStream, string outputVideoCodec)
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 23e63dad0..89730a11f 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -95,6 +95,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
int defaultImageExtractionTimeoutMs,
bool enableEncoderFontFile, IEnvironmentInfo environmentInfo)
{
+ if (jsonSerializer == null)
+ {
+ throw new ArgumentNullException("jsonSerializer");
+ }
+
_logger = logger;
_jsonSerializer = jsonSerializer;
ConfigurationManager = configurationManager;
@@ -282,6 +287,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
return;
}
+ _logger.Info("Attempting to update encoder path to {0}. pathType: {1}", path ?? string.Empty, pathType ?? string.Empty);
+
Tuple<string, string> newPaths;
if (string.Equals(pathType, "system", StringComparison.OrdinalIgnoreCase))
@@ -632,7 +639,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
- if (result.streams == null && result.format == null)
+ if (result == null || (result.streams == null && result.format == null))
{
throw new Exception("ffprobe failed - streams and format are both null.");
}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 493fe1bd2..22713b94f 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -462,11 +462,9 @@ namespace MediaBrowser.Model.Configuration
Type = ImageType.Art
},
- // Don't download this by default
- // Generally not used
new ImageOption
{
- Limit = 0,
+ Limit = 1,
Type = ImageType.Logo
}
},
@@ -556,7 +554,7 @@ namespace MediaBrowser.Model.Configuration
Type = ImageType.Thumb
}
},
- DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
+ DisabledMetadataFetchers = new []{ "TheMovieDb" }
},
new MetadataOptions(0, 1280)
@@ -577,8 +575,8 @@ namespace MediaBrowser.Model.Configuration
Type = ImageType.Primary
}
},
- DisabledMetadataFetchers = new []{ "The Open Movie Database" },
- DisabledImageFetchers = new []{ "TheMovieDb" }
+ DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" },
+ DisabledImageFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
}
};
}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index a4a88f169..efd3d6b67 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -27,7 +27,6 @@ namespace MediaBrowser.Model.Configuration
public bool DisplayMissingEpisodes { get; set; }
public bool DisplayUnairedEpisodes { get; set; }
- public string[] ExcludeFoldersFromGrouping { get; set; }
public string[] GroupedFolders { get; set; }
public SubtitlePlaybackMode SubtitleMode { get; set; }
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
index e9e76a993..1c11e6a3c 100644
--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs
+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
@@ -124,6 +124,7 @@ namespace MediaBrowser.Model.Dlna
switch (condition.Condition)
{
case ProfileConditionType.Equals:
+ case ProfileConditionType.EqualsAny:
return currentValue.Value.Equals(expected);
case ProfileConditionType.GreaterThanEqual:
return currentValue.Value >= expected;
@@ -132,7 +133,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return !currentValue.Value.Equals(expected);
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
@@ -160,7 +161,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return !StringHelper.EqualsIgnoreCase(currentValue, expected);
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
@@ -182,7 +183,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return currentValue.Value != expected;
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
@@ -211,7 +212,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return !currentValue.Value.Equals(expected);
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
@@ -240,7 +241,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return !currentValue.Value.Equals(expected);
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
@@ -264,7 +265,7 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionType.NotEquals:
return timestamp != expected;
default:
- throw new InvalidOperationException("Unexpected ProfileConditionType");
+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
}
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 6d68831ff..bc9a3488f 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -410,8 +410,6 @@ namespace MediaBrowser.Model.Dlna
audioStreamIndex = audioStream.Index;
}
- var allMediaStreams = item.MediaStreams;
-
MediaStream videoStream = item.VideoStream;
// TODO: This doesn't accout for situation of device being able to handle media bitrate, but wifi connection not fast enough
@@ -427,7 +425,7 @@ namespace MediaBrowser.Model.Dlna
if (isEligibleForDirectPlay || isEligibleForDirectStream)
{
// See if it can be direct played
- PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream, allMediaStreams);
+ PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream);
if (directPlay != null)
{
@@ -482,7 +480,6 @@ namespace MediaBrowser.Model.Dlna
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
playlistItem.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
- playlistItem.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels))
{
@@ -656,8 +653,7 @@ namespace MediaBrowser.Model.Dlna
MediaStream videoStream,
MediaStream audioStream,
bool isEligibleForDirectPlay,
- bool isEligibleForDirectStream,
- List<MediaStream> allMediaStreams)
+ bool isEligibleForDirectStream)
{
DeviceProfile profile = options.Profile;
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index eb3b7d8fb..5b8d40dfb 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -39,7 +39,6 @@ namespace MediaBrowser.Model.Dlna
public bool RequireAvc { get; set; }
public bool CopyTimestamps { get; set; }
public bool EnableSubtitlesInManifest { get; set; }
- public bool EnableSplittingOnNonKeyFrames { get; set; }
public string[] AudioCodecs { get; set; }
public int? AudioStreamIndex { get; set; }
@@ -267,7 +266,6 @@ namespace MediaBrowser.Model.Dlna
list.Add(new NameValuePair("EnableSubtitlesInManifest", item.EnableSubtitlesInManifest.ToString().ToLower()));
list.Add(new NameValuePair("Tag", item.MediaSource.ETag ?? string.Empty));
- list.Add(new NameValuePair("EnableSplittingOnNonKeyFrames", item.EnableSplittingOnNonKeyFrames.ToString().ToLower()));
list.Add(new NameValuePair("RequireAvc", item.RequireAvc.ToString().ToLower()));
return list;
diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
index 0f9fbae30..76f2332f2 100644
--- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
@@ -39,9 +39,6 @@ namespace MediaBrowser.Model.Dlna
[XmlAttribute("enableSubtitlesInManifest")]
public bool EnableSubtitlesInManifest { get; set; }
- [XmlAttribute("enableSplittingOnNonKeyFrames")]
- public bool EnableSplittingOnNonKeyFrames { get; set; }
-
[XmlAttribute("maxAudioChannels")]
public string MaxAudioChannels { get; set; }
diff --git a/MediaBrowser.Model/Sync/SyncJobQuery.cs b/MediaBrowser.Model/Sync/SyncJobQuery.cs
index bb99b5d5f..ed9e5ae60 100644
--- a/MediaBrowser.Model/Sync/SyncJobQuery.cs
+++ b/MediaBrowser.Model/Sync/SyncJobQuery.cs
@@ -24,6 +24,7 @@ namespace MediaBrowser.Model.Sync
/// <value>The user identifier.</value>
public string UserId { get; set; }
public string ExcludeTargetIds { get; set; }
+ public string ItemId { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
index 0a070d348..c1bae4b3c 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -328,6 +328,11 @@ namespace MediaBrowser.Providers.MediaInfo
/// <returns>VideoStream.</returns>
private BlurayDiscInfo GetBDInfo(string path)
{
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
try
{
return _blurayExaminer.GetDiscInfo(path);
diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
index 721e31b07..c1668c4cc 100644
--- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs
+++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
@@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.Omdb
T item = itemResult.Item;
- var result = await GetRootObject(imdbId, cancellationToken);
+ var result = await GetRootObject(imdbId, cancellationToken).ConfigureAwait(false);
// Only take the name and rating if the user's language is set to english, since Omdb has no localization
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
@@ -221,7 +221,7 @@ namespace MediaBrowser.Providers.Omdb
internal async Task<RootObject> GetRootObject(string imdbId, CancellationToken cancellationToken)
{
- var path = await EnsureItemInfo(imdbId, cancellationToken);
+ var path = await EnsureItemInfo(imdbId, cancellationToken).ConfigureAwait(false);
string resultString;
@@ -240,7 +240,7 @@ namespace MediaBrowser.Providers.Omdb
internal async Task<SeasonRootObject> GetSeasonRootObject(string imdbId, int seasonId, CancellationToken cancellationToken)
{
- var path = await EnsureSeasonInfo(imdbId, seasonId, cancellationToken);
+ var path = await EnsureSeasonInfo(imdbId, seasonId, cancellationToken).ConfigureAwait(false);
string resultString;
diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
index 4992675da..22e7e753c 100644
--- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
+++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
@@ -87,6 +87,12 @@ namespace MediaBrowser.Providers.TV
var seriesDataPath = TvdbSeriesProvider.GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds);
+ // Doesn't have required provider id's
+ if (string.IsNullOrWhiteSpace(seriesDataPath))
+ {
+ return;
+ }
+
var episodeFiles = _fileSystem.GetFilePaths(seriesDataPath)
.Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase))
.Select(Path.GetFileNameWithoutExtension)
@@ -238,7 +244,7 @@ namespace MediaBrowser.Providers.TV
var targetSeries = DetermineAppropriateSeries(series, tuple.Item1);
var seasonOffset = TvdbSeriesProvider.GetSeriesOffset(targetSeries.ProviderIds) ?? ((targetSeries.AnimeSeriesIndex ?? 1) - 1);
- var unairedThresholdDays = 1;
+ var unairedThresholdDays = 2;
now = now.AddDays(0 - unairedThresholdDays);
if (airDate.Value < now)
diff --git a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
index 21e327a8f..56aa3967c 100644
--- a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
+++ b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs
@@ -55,11 +55,15 @@ namespace MediaBrowser.Providers.TV
return result;
}
- if (OmdbProvider.IsValidSeries(info.SeriesProviderIds) && info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue)
+ string seriesImdbId;
+ if (info.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId))
{
- var seriesImdbId = info.GetProviderId(MetadataProviders.Imdb);
-
- result.HasMetadata = await new OmdbProvider(_jsonSerializer, _httpClient, _fileSystem, _configurationManager).FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
+ if (info.IndexNumber.HasValue &&
+ info.ParentIndexNumber.HasValue)
+ {
+ result.HasMetadata = await new OmdbProvider(_jsonSerializer, _httpClient, _fileSystem, _configurationManager)
+ .FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
+ }
}
return result;
diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj
index dc61e19a0..857a8e15f 100644
--- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj
+++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj
@@ -512,9 +512,6 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncactivity.html">
<Link>Resources\dashboard-ui\syncactivity.html</Link>
</BundleResource>
- <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncjob.html">
- <Link>Resources\dashboard-ui\syncjob.html</Link>
- </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncsettings.html">
<Link>Resources\dashboard-ui\syncsettings.html</Link>
</BundleResource>
@@ -929,6 +926,9 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\bower.json">
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\bower.json</Link>
</BundleResource>
+ <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\cameraroll.js">
+ <Link>Resources\dashboard-ui\bower_components\emby-apiclient\cameraroll.js</Link>
+ </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\connectionmanager.js">
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\connectionmanager.js</Link>
</BundleResource>
@@ -1031,6 +1031,9 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js</Link>
</BundleResource>
+ <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\filesystem.js">
+ <Link>Resources\dashboard-ui\bower_components\emby-webcomponents\filesystem.js</Link>
+ </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\focusmanager.js">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\focusmanager.js</Link>
</BundleResource>
@@ -1172,6 +1175,9 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\emby-collapse\emby-collapse.js">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\emby-collapse\emby-collapse.js</Link>
</BundleResource>
+ <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\emby-connect\connecthelper.js">
+ <Link>Resources\dashboard-ui\bower_components\emby-webcomponents\emby-connect\connecthelper.js</Link>
+ </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\emby-input\emby-input.css">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\emby-input\emby-input.css</Link>
</BundleResource>
@@ -1805,6 +1811,12 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\sync\sync.js">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\sync.js</Link>
</BundleResource>
+ <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\sync\syncjobeditor.js">
+ <Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\syncjobeditor.js</Link>
+ </BundleResource>
+ <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\sync\syncjoblist.js">
+ <Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\syncjoblist.js</Link>
+ </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\sync\synctoggle.js">
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\synctoggle.js</Link>
</BundleResource>
@@ -2684,9 +2696,6 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\navdrawer\navdrawer.js">
<Link>Resources\dashboard-ui\components\navdrawer\navdrawer.js</Link>
</BundleResource>
- <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\syncjoblist\syncjoblist.js">
- <Link>Resources\dashboard-ui\components\syncjoblist\syncjoblist.js</Link>
- </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\tvproviders\schedulesdirect.js">
<Link>Resources\dashboard-ui\components\tvproviders\schedulesdirect.js</Link>
</BundleResource>
@@ -3347,9 +3356,6 @@
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncactivity.js">
<Link>Resources\dashboard-ui\scripts\syncactivity.js</Link>
</BundleResource>
- <BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncjob.js">
- <Link>Resources\dashboard-ui\scripts\syncjob.js</Link>
- </BundleResource>
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncsettings.js">
<Link>Resources\dashboard-ui\scripts\syncsettings.js</Link>
</BundleResource>
diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs
index cda6f459a..6d02c7a1a 100644
--- a/MediaBrowser.Server.Mac/Main.cs
+++ b/MediaBrowser.Server.Mac/Main.cs
@@ -142,7 +142,10 @@ namespace MediaBrowser.Server.Mac
private static EnvironmentInfo GetEnvironmentInfo()
{
- var info = new EnvironmentInfo();
+ var info = new EnvironmentInfo()
+ {
+ CustomOperatingSystem = MediaBrowser.Model.System.OperatingSystem.OSX
+ };
var uname = GetUnixName();
diff --git a/MediaBrowser.Server.Mono/MonoAppHost.cs b/MediaBrowser.Server.Mono/MonoAppHost.cs
index 8def1ca2b..932e2d6cd 100644
--- a/MediaBrowser.Server.Mono/MonoAppHost.cs
+++ b/MediaBrowser.Server.Mono/MonoAppHost.cs
@@ -51,8 +51,11 @@ namespace MediaBrowser.Server.Mono
}
else if (environment.OperatingSystem == Model.System.OperatingSystem.Linux)
{
+ info.FFMpegFilename = "ffmpeg";
+ info.FFProbeFilename = "ffprobe";
info.ArchiveType = "7z";
info.Version = "20160215";
+ info.DownloadUrls = GetDownloadUrls();
}
// No version available - user requirement
@@ -61,6 +64,25 @@ namespace MediaBrowser.Server.Mono
return info;
}
+ private string[] GetDownloadUrls()
+ {
+ switch (EnvironmentInfo.SystemArchitecture)
+ {
+ case Architecture.X64:
+ return new[]
+ {
+ "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-64bit-static.7z"
+ };
+ case Architecture.X86:
+ return new[]
+ {
+ "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-32bit-static.7z"
+ };
+ }
+
+ return new string[] { };
+ }
+
protected override void RestartInternal()
{
MainClass.Restart(StartupOptions);
diff --git a/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs b/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
index 91ff7033e..b4a87b9b4 100644
--- a/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
+++ b/MediaBrowser.ServerApplication/Native/LnkShortcutHandler.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
+using System.Runtime.InteropServices.ComTypes;
using System.Security;
using System.Text;
using MediaBrowser.Model.IO;
@@ -52,7 +53,7 @@ namespace MediaBrowser.ServerApplication.Native
/// <summary>
/// The STG m_ READ
/// </summary>
- public const uint STGM_READ = 0;
+ public const int STGM_READ = 0;
}
/// <summary>
@@ -319,72 +320,6 @@ namespace MediaBrowser.ServerApplication.Native
}
- /// <summary>
- /// Interface IPersist
- /// </summary>
- [ComImport, Guid("0000010c-0000-0000-c000-000000000046"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- public interface IPersist
- {
- /// <summary>
- /// Gets the class ID.
- /// </summary>
- /// <param name="pClassID">The p class ID.</param>
- [PreserveSig]
- void GetClassID(out Guid pClassID);
- }
-
- /// <summary>
- /// Interface IPersistFile
- /// </summary>
- [ComImport, Guid("0000010b-0000-0000-C000-000000000046"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- public interface IPersistFile : IPersist
- {
- /// <summary>
- /// Gets the class ID.
- /// </summary>
- /// <param name="pClassID">The p class ID.</param>
- new void GetClassID(out Guid pClassID);
- /// <summary>
- /// Determines whether this instance is dirty.
- /// </summary>
- [PreserveSig]
- int IsDirty();
-
- /// <summary>
- /// Loads the specified PSZ file name.
- /// </summary>
- /// <param name="pszFileName">Name of the PSZ file.</param>
- /// <param name="dwMode">The dw mode.</param>
- [PreserveSig]
- void Load([In, MarshalAs(UnmanagedType.LPWStr)]
- string pszFileName, uint dwMode);
-
- /// <summary>
- /// Saves the specified PSZ file name.
- /// </summary>
- /// <param name="pszFileName">Name of the PSZ file.</param>
- /// <param name="remember">if set to <c>true</c> [remember].</param>
- [PreserveSig]
- void Save([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
- [In, MarshalAs(UnmanagedType.Bool)] bool remember);
-
- /// <summary>
- /// Saves the completed.
- /// </summary>
- /// <param name="pszFileName">Name of the PSZ file.</param>
- [PreserveSig]
- void SaveCompleted([In, MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
-
- /// <summary>
- /// Gets the cur file.
- /// </summary>
- /// <param name="ppszFileName">Name of the PPSZ file.</param>
- [PreserveSig]
- void GetCurFile([In, MarshalAs(UnmanagedType.LPWStr)] string ppszFileName);
- }
-
// CLSID_ShellLink from ShlGuid.h
/// <summary>
/// Class ShellLink
diff --git a/MediaBrowser.ServerApplication/WindowsAppHost.cs b/MediaBrowser.ServerApplication/WindowsAppHost.cs
index c2cdb9ab0..ec66923aa 100644
--- a/MediaBrowser.ServerApplication/WindowsAppHost.cs
+++ b/MediaBrowser.ServerApplication/WindowsAppHost.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
+using System.Runtime.InteropServices.ComTypes;
using Emby.Server.Core;
using Emby.Server.Implementations;
using Emby.Server.Implementations.EntryPoints;
@@ -93,21 +94,30 @@ namespace MediaBrowser.ServerApplication
protected override void ConfigureAutoRunInternal(bool autorun)
{
- var shortcutPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.StartMenu), "Emby", "Emby Server.lnk");
-
var startupPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Startup);
- if (autorun)
+ if (autorun && !MainStartup.IsRunningAsService)
{
//Copy our shortut into the startup folder for this user
- var targetPath = Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk");
- FileSystemManager.CreateDirectory(Path.GetDirectoryName(targetPath));
- File.Copy(shortcutPath, targetPath, true);
+ var targetPath = Path.Combine(startupPath, "Emby Server.lnk");
+
+ IShellLinkW link = (IShellLinkW)new ShellLink();
+
+ var appPath = Process.GetCurrentProcess().MainModule.FileName;
+
+ // setup shortcut information
+ link.SetDescription(Name);
+ link.SetPath(appPath);
+ link.SetWorkingDirectory(Path.GetDirectoryName(appPath));
+
+ // save it
+ IPersistFile file = (IPersistFile)link;
+ file.Save(targetPath, true);
}
else
{
//Remove our shortcut from the startup folder for this user
- FileSystemManager.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk"));
+ FileSystemManager.DeleteFile(Path.Combine(startupPath, "Emby Server.lnk"));
}
}
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 867892567..0a67cbdb0 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -162,9 +162,6 @@
<Content Include="dashboard-ui\components\remotecontrolautoplay.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\components\syncjoblist\syncjoblist.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\components\tvproviders\xmltv.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -507,9 +504,6 @@
<Content Include="dashboard-ui\scripts\streamingsettings.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\scripts\syncjob.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\scripts\appservices.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -534,9 +528,6 @@
<Content Include="dashboard-ui\streamingsettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\syncjob.html">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\appservices.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
diff --git a/OpenSubtitlesHandler/Utilities.cs b/OpenSubtitlesHandler/Utilities.cs
index 3fe606c78..c012da462 100644
--- a/OpenSubtitlesHandler/Utilities.cs
+++ b/OpenSubtitlesHandler/Utilities.cs
@@ -37,7 +37,9 @@ namespace OpenSubtitlesHandler
public static IHttpClient HttpClient { get; set; }
public static ITextEncoding EncodingHelper { get; set; }
- private const string XML_RPC_SERVER = "https://api.opensubtitles.org/xml-rpc";
+ //private static string XML_RPC_SERVER = "https://api.opensubtitles.org/xml-rpc";
+ private static string XML_RPC_SERVER = "https://92.240.234.122/xml-rpc";
+ private static string HostHeader = "api.opensubtitles.org:443";
/// <summary>
/// Compute movie hash
@@ -142,32 +144,6 @@ namespace OpenSubtitlesHandler
public static Stream SendRequest(byte[] request, string userAgent)
{
return SendRequestAsync(request, userAgent, CancellationToken.None).Result;
-
- //HttpWebRequest req = (HttpWebRequest)WebRequest.Create(XML_RPC_SERVER);
- //req.ContentType = "text/xml";
- //req.Host = "api.opensubtitles.org:80";
- //req.Method = "POST";
- //req.UserAgent = "xmlrpc-epi-php/0.2 (PHP)";
- //req.ContentLength = request.Length;
- //ServicePointManager.Expect100Continue = false;
- //try
- //{
- // using (Stream stm = req.GetRequestStream())
- // {
- // stm.Write(request, 0, request.Length);
- // }
-
- // WebResponse response = req.GetResponse();
- // return response.GetResponseStream();
- //}
- //catch (Exception ex)
- //{
- // Stream errorStream = new MemoryStream();
- // byte[] dd = Encoding.ASCII.GetBytes("ERROR: " + ex.Message);
- // errorStream.Write(dd, 0, dd.Length);
- // errorStream.Position = 0;
- // return errorStream;
- //}
}
public static async Task<Stream> SendRequestAsync(byte[] request, string userAgent, CancellationToken cancellationToken)
@@ -177,7 +153,7 @@ namespace OpenSubtitlesHandler
RequestContentBytes = request,
RequestContentType = "text/xml",
UserAgent = userAgent,
- Host = "api.opensubtitles.org:443",
+ Host = HostHeader,
Url = XML_RPC_SERVER,
// Response parsing will fail with this enabled
@@ -195,32 +171,6 @@ namespace OpenSubtitlesHandler
var result = await HttpClient.Post(options).ConfigureAwait(false);
return result.Content;
-
- //HttpWebRequest req = (HttpWebRequest)WebRequest.Create(XML_RPC_SERVER);
- //req.ContentType = "text/xml";
- //req.Host = "api.opensubtitles.org:80";
- //req.Method = "POST";
- //req.UserAgent = "xmlrpc-epi-php/0.2 (PHP)";
- //req.ContentLength = request.Length;
- //ServicePointManager.Expect100Continue = false;
- //try
- //{
- // using (Stream stm = req.GetRequestStream())
- // {
- // stm.Write(request, 0, request.Length);
- // }
-
- // WebResponse response = req.GetResponse();
- // return response.GetResponseStream();
- //}
- //catch (Exception ex)
- //{
- // Stream errorStream = new MemoryStream();
- // byte[] dd = Encoding.ASCII.GetBytes("ERROR: " + ex.Message);
- // errorStream.Write(dd, 0, dd.Length);
- // errorStream.Position = 0;
- // return errorStream;
- //}
}
}
diff --git a/RSSDP/SsdpDevicePublisherBase.cs b/RSSDP/SsdpDevicePublisherBase.cs
index 8ab35d661..2543632b6 100644
--- a/RSSDP/SsdpDevicePublisherBase.cs
+++ b/RSSDP/SsdpDevicePublisherBase.cs
@@ -359,7 +359,7 @@ namespace Rssdp.Infrastructure
}
- WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device);
+ //WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device);
}
private bool IsDuplicateSearchRequest(string searchTarget, IpEndPointInfo endPoint)
@@ -485,7 +485,7 @@ namespace Rssdp.Infrastructure
_CommsServer.SendMulticastMessage(message);
- WriteTrace(String.Format("Sent alive notification"), device);
+ //WriteTrace(String.Format("Sent alive notification"), device);
}
#endregion
diff --git a/SocketHttpListener.Portable/Net/HttpConnection.cs b/SocketHttpListener.Portable/Net/HttpConnection.cs
index bc4286dc8..3baffd258 100644
--- a/SocketHttpListener.Portable/Net/HttpConnection.cs
+++ b/SocketHttpListener.Portable/Net/HttpConnection.cs
@@ -209,7 +209,7 @@ namespace SocketHttpListener.Net
// TODO: can we get this stream before reading the input?
if (o_stream == null)
{
- context.Response.DetermineIfChunked();
+ //context.Response.DetermineIfChunked();
if (context.Response.SendChunked || isExpect100Continue || context.Request.IsWebSocketRequest || true)
{
@@ -508,7 +508,7 @@ namespace SocketHttpListener.Net
{
force_close |= !context.Request.KeepAlive;
if (!force_close)
- force_close = (context.Response.Headers["connection"] == "close");
+ force_close = (string.Equals(context.Response.Headers["connection"], "close", StringComparison.OrdinalIgnoreCase));
/*
if (!force_close) {
// bool conn_close = (status_code == 400 || status_code == 408 || status_code == 411 ||
diff --git a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
index c1182de34..9a5862cb9 100644
--- a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
+++ b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs
@@ -386,7 +386,7 @@ namespace SocketHttpListener.Net
if (content_type != null)
{
- if (content_encoding != null && content_type.IndexOf("charset=", StringComparison.Ordinal) == -1)
+ if (content_encoding != null && content_type.IndexOf("charset=", StringComparison.OrdinalIgnoreCase) == -1)
{
string enc_name = content_encoding.WebName;
headers.SetInternal("Content-Type", content_type + "; charset=" + enc_name);
@@ -429,9 +429,10 @@ namespace SocketHttpListener.Net
* HttpStatusCode.InternalServerError 500
* HttpStatusCode.ServiceUnavailable 503
*/
- bool conn_close = (status_code == 408 || status_code == 411 ||
+ bool conn_close = status_code == 400 || status_code == 408 || status_code == 411 ||
status_code == 413 || status_code == 414 ||
- status_code == 503);
+ status_code == 500 ||
+ status_code == 503;
if (conn_close == false)
conn_close = !context.Request.KeepAlive;
diff --git a/SocketHttpListener.Portable/Net/ResponseStream.cs b/SocketHttpListener.Portable/Net/ResponseStream.cs
index 6067a89ec..a79a18791 100644
--- a/SocketHttpListener.Portable/Net/ResponseStream.cs
+++ b/SocketHttpListener.Portable/Net/ResponseStream.cs
@@ -136,6 +136,11 @@ namespace SocketHttpListener.Net
if (disposed)
throw new ObjectDisposedException(GetType().ToString());
+ if (count == 0)
+ {
+ //return;
+ }
+
byte[] bytes = null;
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
bool chunked = response.SendChunked;
@@ -176,6 +181,11 @@ namespace SocketHttpListener.Net
if (disposed)
throw new ObjectDisposedException(GetType().ToString());
+ if (count == 0)
+ {
+ //return;
+ }
+
byte[] bytes = null;
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
bool chunked = response.SendChunked;
@@ -206,7 +216,7 @@ namespace SocketHttpListener.Net
await stream.WriteAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false);
}
- if (response.SendChunked)
+ if (chunked)
stream.Write(crlf, 0, 2);
}