commit
2cb0f3eed6
|
@ -77,6 +77,11 @@ namespace BDInfo
|
||||||
public BDROM(
|
public BDROM(
|
||||||
string path, IFileSystem fileSystem, ITextEncoding textEncoding)
|
string path, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
//
|
//
|
||||||
// Locate BDMV directories.
|
// Locate BDMV directories.
|
||||||
|
@ -326,15 +331,28 @@ namespace BDInfo
|
||||||
private FileSystemMetadata GetDirectoryBDMV(
|
private FileSystemMetadata GetDirectoryBDMV(
|
||||||
string path)
|
string path)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
FileSystemMetadata dir = _fileSystem.GetDirectoryInfo(path);
|
FileSystemMetadata dir = _fileSystem.GetDirectoryInfo(path);
|
||||||
|
|
||||||
while (dir != null)
|
while (dir != null)
|
||||||
{
|
{
|
||||||
if (dir.Name == "BDMV")
|
if (string.Equals(dir.Name, "BDMV", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return dir;
|
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);
|
return GetDirectory("BDMV", _fileSystem.GetDirectoryInfo(path), 0);
|
||||||
|
@ -350,7 +368,7 @@ namespace BDInfo
|
||||||
FileSystemMetadata[] children = _fileSystem.GetDirectories(dir.FullName).ToArray();
|
FileSystemMetadata[] children = _fileSystem.GetDirectories(dir.FullName).ToArray();
|
||||||
foreach (FileSystemMetadata child in children)
|
foreach (FileSystemMetadata child in children)
|
||||||
{
|
{
|
||||||
if (child.Name == name)
|
if (string.Equals(child.Name, name, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
|
@ -795,6 +795,8 @@ return null;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void NotifyPendingRestart()
|
public void NotifyPendingRestart()
|
||||||
{
|
{
|
||||||
|
Logger.Info("App needs to be restarted.");
|
||||||
|
|
||||||
var changed = !HasPendingRestart;
|
var changed = !HasPendingRestart;
|
||||||
|
|
||||||
HasPendingRestart = true;
|
HasPendingRestart = true;
|
||||||
|
|
|
@ -10,11 +10,17 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
public class EnvironmentInfo : IEnvironmentInfo
|
public class EnvironmentInfo : IEnvironmentInfo
|
||||||
{
|
{
|
||||||
public MediaBrowser.Model.System.Architecture? CustomArchitecture { get; set; }
|
public MediaBrowser.Model.System.Architecture? CustomArchitecture { get; set; }
|
||||||
|
public MediaBrowser.Model.System.OperatingSystem? CustomOperatingSystem { get; set; }
|
||||||
|
|
||||||
public MediaBrowser.Model.System.OperatingSystem OperatingSystem
|
public MediaBrowser.Model.System.OperatingSystem OperatingSystem
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (CustomOperatingSystem.HasValue)
|
||||||
|
{
|
||||||
|
return CustomOperatingSystem.Value;
|
||||||
|
}
|
||||||
|
|
||||||
#if NET46
|
#if NET46
|
||||||
switch (Environment.OSVersion.Platform)
|
switch (Environment.OSVersion.Platform)
|
||||||
{
|
{
|
||||||
|
|
|
@ -490,38 +490,13 @@ namespace Emby.Common.Implementations.IO
|
||||||
var temp1 = Path.GetTempFileName();
|
var temp1 = Path.GetTempFileName();
|
||||||
|
|
||||||
// Copying over will fail against hidden files
|
// Copying over will fail against hidden files
|
||||||
RemoveHiddenAttribute(file1);
|
SetHidden(file1, false);
|
||||||
RemoveHiddenAttribute(file2);
|
SetHidden(file2, false);
|
||||||
|
|
||||||
CopyFile(file1, temp1, true);
|
CopyFile(file1, temp1, true);
|
||||||
|
|
||||||
CopyFile(file2, file1, true);
|
CopyFile(file2, file1, true);
|
||||||
CopyFile(temp1, file2, 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)
|
public bool ContainsSubPath(string parentPath, string path)
|
||||||
|
|
|
@ -282,9 +282,12 @@ namespace Emby.Common.Implementations.ScheduledTasks
|
||||||
throw new ArgumentNullException("value");
|
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>
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||||
private Tuple<TaskTriggerInfo, ITaskTrigger>[] LoadTriggers()
|
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();
|
return settings.Select(i => new Tuple<TaskTriggerInfo, ITaskTrigger>(i, GetTrigger(i))).ToArray();
|
||||||
}
|
}
|
||||||
|
@ -544,8 +548,12 @@ namespace Emby.Common.Implementations.ScheduledTasks
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return JsonSerializer.DeserializeFromFile<IEnumerable<TaskTriggerInfo>>(GetConfigurationFilePath())
|
var list = JsonSerializer.DeserializeFromFile<IEnumerable<TaskTriggerInfo>>(GetConfigurationFilePath());
|
||||||
.ToArray();
|
|
||||||
|
if (list != null)
|
||||||
|
{
|
||||||
|
return list.ToArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
|
@ -555,8 +563,8 @@ namespace Emby.Common.Implementations.ScheduledTasks
|
||||||
catch (DirectoryNotFoundException)
|
catch (DirectoryNotFoundException)
|
||||||
{
|
{
|
||||||
// File doesn't exist. No biggie. Return defaults.
|
// File doesn't exist. No biggie. Return defaults.
|
||||||
return ScheduledTask.GetDefaultTriggers().ToArray();
|
|
||||||
}
|
}
|
||||||
|
return ScheduledTask.GetDefaultTriggers().ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -268,7 +268,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, item, null, null, deviceId, filter);
|
_didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, item, user, null, null, deviceId, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
provided++;
|
provided++;
|
||||||
|
@ -294,7 +294,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||||
}
|
}
|
||||||
else
|
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
|
else
|
||||||
{
|
{
|
||||||
_didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, i, item, serverItem.StubType, deviceId, filter);
|
_didlBuilder.WriteItemElement(_config.GetDlnaConfiguration(), writer, i, user, item, serverItem.StubType, deviceId, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace Emby.Dlna.Didl
|
||||||
_user = user;
|
_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
|
var settings = new XmlWriterSettings
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ namespace Emby.Dlna.Didl
|
||||||
|
|
||||||
WriteXmlRootAttributes(_profile, writer);
|
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.WriteFullEndElement();
|
||||||
//writer.WriteEndDocument();
|
//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);
|
var clientId = GetClientId(item, null);
|
||||||
|
|
||||||
|
@ -135,7 +143,7 @@ namespace Emby.Dlna.Didl
|
||||||
|
|
||||||
AddGeneralProperties(item, null, context, writer, filter);
|
AddGeneralProperties(item, null, context, writer, filter);
|
||||||
|
|
||||||
//AddBookmarkInfo(item, user, element);
|
AddSamsungBookmarkInfo(item, user, writer);
|
||||||
|
|
||||||
// refID?
|
// refID?
|
||||||
// storeAttribute(itemNode, object, ClassProperties.REF_ID, false);
|
// storeAttribute(itemNode, object, ClassProperties.REF_ID, false);
|
||||||
|
@ -555,17 +563,37 @@ namespace Emby.Dlna.Didl
|
||||||
writer.WriteFullEndElement();
|
writer.WriteFullEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
//private void AddBookmarkInfo(BaseItem item, User user, XmlElement element)
|
private void AddSamsungBookmarkInfo(BaseItem item, User user, XmlWriter writer)
|
||||||
//{
|
{
|
||||||
// var userdata = _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
|
if (!item.SupportsPositionTicksResume || item is Folder)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if (userdata.PlaybackPositionTicks > 0)
|
XmlAttribute secAttribute = null;
|
||||||
// {
|
foreach (var attribute in _profile.XmlRootAttributes)
|
||||||
// var dcmInfo = element.OwnerDocument.CreateElement("sec", "dcmInfo", NS_SEC);
|
{
|
||||||
// dcmInfo.InnerText = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(userdata.PlaybackPositionTicks).TotalSeconds).ToString(_usCulture));
|
if (string.Equals(attribute.Name, "xmlns:sec", StringComparison.OrdinalIgnoreCase))
|
||||||
// element.AppendChild(dcmInfo);
|
{
|
||||||
// }
|
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>
|
/// <summary>
|
||||||
/// Adds fields used by both items and folders
|
/// Adds fields used by both items and folders
|
||||||
|
|
|
@ -493,7 +493,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
playlistItem.StreamUrl = playlistItem.StreamInfo.ToDlnaUrl(_serverAddress, _accessToken);
|
playlistItem.StreamUrl = playlistItem.StreamInfo.ToDlnaUrl(_serverAddress, _accessToken);
|
||||||
|
|
||||||
var itemXml = new DidlBuilder(profile, user, _imageProcessor, _serverAddress, _accessToken, _userDataManager, _localization, _mediaSourceManager, _logger, _libraryManager, _mediaEncoder)
|
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;
|
playlistItem.Didl = itemXml;
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,21 @@ namespace Emby.Dlna.Profiles
|
||||||
IsRequired = true
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -55,27 +55,26 @@ namespace Emby.Dlna.Profiles
|
||||||
{
|
{
|
||||||
Container = "ts",
|
Container = "ts",
|
||||||
VideoCodec = "h264",
|
VideoCodec = "h264",
|
||||||
AudioCodec = "aac,ac3,mp3",
|
AudioCodec = "aac,ac3,mp3,dca,dts",
|
||||||
Type = DlnaProfileType.Video
|
Type = DlnaProfileType.Video
|
||||||
},
|
},
|
||||||
new DirectPlayProfile
|
new DirectPlayProfile
|
||||||
{
|
{
|
||||||
Container = "mkv",
|
Container = "mkv",
|
||||||
VideoCodec = "h264",
|
VideoCodec = "h264",
|
||||||
AudioCodec = "aac,ac3,mp3",
|
AudioCodec = "aac,ac3,mp3,dca,dts",
|
||||||
Type = DlnaProfileType.Video
|
Type = DlnaProfileType.Video
|
||||||
},
|
},
|
||||||
new DirectPlayProfile
|
new DirectPlayProfile
|
||||||
{
|
{
|
||||||
Container = "mp4",
|
Container = "mp4",
|
||||||
VideoCodec = "h264,mpeg4",
|
VideoCodec = "h264,mpeg4",
|
||||||
AudioCodec = "aac,ac3,mp3",
|
AudioCodec = "aac,ac3,mp3,dca,dts",
|
||||||
Type = DlnaProfileType.Video
|
Type = DlnaProfileType.Video
|
||||||
},
|
},
|
||||||
new DirectPlayProfile
|
new DirectPlayProfile
|
||||||
{
|
{
|
||||||
Container = "mp3",
|
Container = "mp3",
|
||||||
AudioCodec = "mp3",
|
|
||||||
Type = DlnaProfileType.Audio
|
Type = DlnaProfileType.Audio
|
||||||
},
|
},
|
||||||
new DirectPlayProfile
|
new DirectPlayProfile
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
<DirectPlayProfile container="" type="Photo" />
|
<DirectPlayProfile container="" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
<DirectPlayProfile container="mp3,wma,aac,wav" type="Audio" />
|
<DirectPlayProfile container="mp3,wma,aac,wav" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
|
<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
<DirectPlayProfile container="jpeg,jpg" type="Photo" />
|
<DirectPlayProfile container="jpeg,jpg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<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="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles>
|
<CodecProfiles>
|
||||||
|
|
|
@ -43,9 +43,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles>
|
<CodecProfiles>
|
||||||
|
@ -80,6 +80,12 @@
|
||||||
</Conditions>
|
</Conditions>
|
||||||
<ApplyConditions />
|
<ApplyConditions />
|
||||||
</CodecProfile>
|
</CodecProfile>
|
||||||
|
<CodecProfile type="VideoAudio">
|
||||||
|
<Conditions>
|
||||||
|
<ProfileCondition condition="Equals" property="IsSecondaryAudio" value="false" isRequired="true" />
|
||||||
|
</Conditions>
|
||||||
|
<ApplyConditions />
|
||||||
|
</CodecProfile>
|
||||||
</CodecProfiles>
|
</CodecProfiles>
|
||||||
<ResponseProfiles>
|
<ResponseProfiles>
|
||||||
<ResponseProfile container="mkv,ts" type="Video" mimeType="video/mp4">
|
<ResponseProfile container="mkv,ts" type="Video" mimeType="video/mp4">
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
<DirectPlayProfile container="" type="Photo" />
|
<DirectPlayProfile container="" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -35,16 +35,16 @@
|
||||||
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
|
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
|
||||||
<XmlRootAttributes />
|
<XmlRootAttributes />
|
||||||
<DirectPlayProfiles>
|
<DirectPlayProfiles>
|
||||||
<DirectPlayProfile container="ts" audioCodec="aac,ac3,mp3" videoCodec="h264" type="Video" />
|
<DirectPlayProfile container="ts" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264" type="Video" />
|
||||||
<DirectPlayProfile container="mkv" audioCodec="aac,ac3,mp3" videoCodec="h264" type="Video" />
|
<DirectPlayProfile container="mkv" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264" type="Video" />
|
||||||
<DirectPlayProfile container="mp4" audioCodec="aac,ac3,mp3" videoCodec="h264,mpeg4" type="Video" />
|
<DirectPlayProfile container="mp4" audioCodec="aac,ac3,mp3,dca,dts" videoCodec="h264,mpeg4" type="Video" />
|
||||||
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
|
<DirectPlayProfile container="mp3" type="Audio" />
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
<DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
|
<DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -43,9 +43,9 @@
|
||||||
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
|
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
<DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
|
<DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles>
|
<CodecProfiles>
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
|
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
<DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
|
<DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -55,9 +55,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -55,9 +55,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" 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" />
|
||||||
<TranscodingProfile container="jpeg" type="Photo" 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" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
<DirectPlayProfile container="" type="Photo" />
|
<DirectPlayProfile container="" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Photo">
|
<ContainerProfile type="Photo">
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Video" container="mp4,mov">
|
<ContainerProfile type="Video" container="mp4,mov">
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
<DirectPlayProfile container="jpeg" type="Photo" />
|
<DirectPlayProfile container="jpeg" type="Photo" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles>
|
<ContainerProfiles>
|
||||||
<ContainerProfile type="Video" container="mp4,mov">
|
<ContainerProfile type="Video" container="mp4,mov">
|
||||||
|
|
|
@ -43,9 +43,9 @@
|
||||||
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
|
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
|
||||||
</DirectPlayProfiles>
|
</DirectPlayProfiles>
|
||||||
<TranscodingProfiles>
|
<TranscodingProfiles>
|
||||||
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" enableSplittingOnNonKeyFrames="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" enableSplittingOnNonKeyFrames="false" />
|
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
|
||||||
</TranscodingProfiles>
|
</TranscodingProfiles>
|
||||||
<ContainerProfiles />
|
<ContainerProfiles />
|
||||||
<CodecProfiles />
|
<CodecProfiles />
|
||||||
|
|
|
@ -1083,6 +1083,8 @@ namespace Emby.Server.Core
|
||||||
|
|
||||||
if (requiresRestart)
|
if (requiresRestart)
|
||||||
{
|
{
|
||||||
|
Logger.Info("App needs to be restarted due to configuration change.");
|
||||||
|
|
||||||
NotifyPendingRestart();
|
NotifyPendingRestart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1204,7 +1206,8 @@ namespace Emby.Server.Core
|
||||||
var exclude = new[]
|
var exclude = new[]
|
||||||
{
|
{
|
||||||
"mbplus.dll",
|
"mbplus.dll",
|
||||||
"mbintros.dll"
|
"mbintros.dll",
|
||||||
|
"embytv.dll"
|
||||||
};
|
};
|
||||||
|
|
||||||
return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||||
|
@ -1583,7 +1586,8 @@ namespace Emby.Server.Core
|
||||||
|
|
||||||
public void LaunchUrl(string url)
|
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();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
@ -1591,7 +1595,7 @@ namespace Emby.Server.Core
|
||||||
var process = ProcessFactory.Create(new ProcessOptions
|
var process = ProcessFactory.Create(new ProcessOptions
|
||||||
{
|
{
|
||||||
FileName = url,
|
FileName = url,
|
||||||
EnableRaisingEvents = true,
|
//EnableRaisingEvents = true,
|
||||||
UseShellExecute = true,
|
UseShellExecute = true,
|
||||||
ErrorDialog = false
|
ErrorDialog = false
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,21 +79,6 @@ namespace Emby.Server.Implementations.Channels
|
||||||
_channels = channels.ToArray();
|
_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()
|
private IEnumerable<IChannel> GetAllChannels()
|
||||||
{
|
{
|
||||||
return _channels
|
return _channels
|
||||||
|
@ -288,7 +273,7 @@ namespace Emby.Server.Implementations.Channels
|
||||||
_jsonSerializer.SerializeToFile(mediaSources, path);
|
_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>();
|
IEnumerable<ChannelMediaInfo> results = new List<ChannelMediaInfo>();
|
||||||
var video = item as Video;
|
var video = item as Video;
|
||||||
|
@ -302,17 +287,9 @@ namespace Emby.Server.Implementations.Channels
|
||||||
results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
|
results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
|
||||||
}
|
}
|
||||||
|
|
||||||
var sources = SortMediaInfoResults(results)
|
return SortMediaInfoResults(results)
|
||||||
.Select(i => GetMediaSource(item, i))
|
.Select(i => GetMediaSource(item, i))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
if (includeCachedVersions)
|
|
||||||
{
|
|
||||||
var cachedVersions = GetCachedChannelItemMediaSources(item);
|
|
||||||
sources.InsertRange(0, cachedVersions);
|
|
||||||
}
|
|
||||||
|
|
||||||
return sources;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<MediaSourceInfo>> GetDynamicMediaSources(BaseItem item, CancellationToken cancellationToken)
|
public async Task<IEnumerable<MediaSourceInfo>> GetDynamicMediaSources(BaseItem item, CancellationToken cancellationToken)
|
||||||
|
@ -334,14 +311,9 @@ namespace Emby.Server.Implementations.Channels
|
||||||
results = new List<ChannelMediaInfo>();
|
results = new List<ChannelMediaInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var list = SortMediaInfoResults(results)
|
return SortMediaInfoResults(results)
|
||||||
.Select(i => GetMediaSource(item, i))
|
.Select(i => GetMediaSource(item, i))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var cachedVersions = GetCachedChannelItemMediaSources(item);
|
|
||||||
list.InsertRange(0, cachedVersions);
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<string, Tuple<DateTime, List<ChannelMediaInfo>>> _channelItemMediaInfo =
|
private readonly ConcurrentDictionary<string, Tuple<DateTime, List<ChannelMediaInfo>>> _channelItemMediaInfo =
|
||||||
|
@ -369,55 +341,6 @@ namespace Emby.Server.Implementations.Channels
|
||||||
return list;
|
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)
|
private MediaSourceInfo GetMediaSource(BaseItem item, ChannelMediaInfo info)
|
||||||
{
|
{
|
||||||
var source = info.ToMediaSource();
|
var source = info.ToMediaSource();
|
||||||
|
|
|
@ -570,9 +570,9 @@ namespace Emby.Server.Implementations.Connect
|
||||||
}
|
}
|
||||||
catch (HttpException ex)
|
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
|
// If they entered a username, then whatever the error is just throw it, for example, user not found
|
||||||
|
|
|
@ -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)
|
public static void TryBind(this IStatement statement, string name, int? value)
|
||||||
{
|
{
|
||||||
if (value.HasValue)
|
if (value.HasValue)
|
||||||
|
|
|
@ -5267,11 +5267,19 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
foreach (var pair in values)
|
foreach (var pair in values)
|
||||||
{
|
{
|
||||||
|
var itemValue = pair.Item2;
|
||||||
|
|
||||||
|
// Don't save if invalid
|
||||||
|
if (string.IsNullOrWhiteSpace(itemValue))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
statement.Reset();
|
statement.Reset();
|
||||||
|
|
||||||
statement.TryBind("@ItemId", itemId.ToGuidParamValue());
|
statement.TryBind("@ItemId", itemId.ToGuidParamValue());
|
||||||
statement.TryBind("@Type", pair.Item1);
|
statement.TryBind("@Type", pair.Item1);
|
||||||
statement.TryBind("@Value", pair.Item2);
|
statement.TryBind("@Value", itemValue);
|
||||||
|
|
||||||
if (pair.Item2 == null)
|
if (pair.Item2 == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -312,8 +312,8 @@
|
||||||
<HintPath>..\packages\Emby.XmlTv.1.0.3\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
|
<HintPath>..\packages\Emby.XmlTv.1.0.3\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MediaBrowser.Naming, Version=1.0.6178.4191, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MediaBrowser.Naming, Version=1.0.6201.24431, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MediaBrowser.Naming.1.0.3\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath>
|
<HintPath>..\packages\MediaBrowser.Naming.1.0.4\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
@ -424,6 +424,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Localization\Ratings\us.txt" />
|
<EmbeddedResource Include="Localization\Ratings\us.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Localization\Ratings\uk.txt" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
<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.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||||
|
|
||||||
if (_appHost.HasPendingRestart)
|
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();
|
DisposeTimer();
|
||||||
|
|
||||||
|
_logger.Info("Automatically restarting the system because it is idle and a restart is required.");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_appHost.Restart();
|
_appHost.Restart();
|
||||||
|
|
|
@ -91,16 +91,12 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
|
|
||||||
readonly Dictionary<Type, int> _mapExceptionToStatusCode = new Dictionary<Type, int>
|
readonly Dictionary<Type, int> _mapExceptionToStatusCode = new Dictionary<Type, int>
|
||||||
{
|
{
|
||||||
{typeof (InvalidOperationException), 500},
|
|
||||||
{typeof (NotImplementedException), 500},
|
|
||||||
{typeof (ResourceNotFoundException), 404},
|
{typeof (ResourceNotFoundException), 404},
|
||||||
{typeof (FileNotFoundException), 404},
|
{typeof (FileNotFoundException), 404},
|
||||||
//{typeof (DirectoryNotFoundException), 404},
|
//{typeof (DirectoryNotFoundException), 404},
|
||||||
{typeof (SecurityException), 401},
|
{typeof (SecurityException), 401},
|
||||||
{typeof (PaymentRequiredException), 402},
|
{typeof (PaymentRequiredException), 402},
|
||||||
{typeof (UnauthorizedAccessException), 500},
|
{typeof (ArgumentException), 400}
|
||||||
{typeof (PlatformNotSupportedException), 500},
|
|
||||||
{typeof (NotSupportedException), 500}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public override void Configure()
|
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
|
try
|
||||||
|
{
|
||||||
|
if (logException)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error processing request", ex);
|
_logger.ErrorException("Error processing request", ex);
|
||||||
|
}
|
||||||
|
|
||||||
var httpRes = httpReq.Response;
|
var httpRes = httpReq.Response;
|
||||||
|
|
||||||
|
@ -241,11 +256,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int statusCode;
|
var statusCode = GetStatusCode(ex);
|
||||||
if (!_mapExceptionToStatusCode.TryGetValue(ex.GetType(), out statusCode))
|
|
||||||
{
|
|
||||||
statusCode = 500;
|
|
||||||
}
|
|
||||||
httpRes.StatusCode = statusCode;
|
httpRes.StatusCode = statusCode;
|
||||||
|
|
||||||
httpRes.ContentType = "text/html";
|
httpRes.ContentType = "text/html";
|
||||||
|
@ -264,7 +275,9 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
{
|
{
|
||||||
if (_listener != null)
|
if (_listener != null)
|
||||||
{
|
{
|
||||||
|
_logger.Info("Stopping HttpListener...");
|
||||||
_listener.Stop();
|
_listener.Stop();
|
||||||
|
_logger.Info("HttpListener stopped");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,6 +542,10 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
ErrorHandler(new FileNotFoundException(), httpReq);
|
ErrorHandler(new FileNotFoundException(), httpReq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (OperationCanceledException ex)
|
||||||
|
{
|
||||||
|
ErrorHandler(ex, httpReq, false);
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ErrorHandler(ex, httpReq);
|
ErrorHandler(ex, httpReq);
|
||||||
|
@ -698,19 +715,19 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
protected virtual void Dispose(bool disposing)
|
protected virtual void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (_disposed) return;
|
if (_disposed) return;
|
||||||
|
|
||||||
base.Dispose();
|
base.Dispose();
|
||||||
|
|
||||||
lock (_disposeLock)
|
lock (_disposeLock)
|
||||||
{
|
{
|
||||||
if (_disposed) return;
|
if (_disposed) return;
|
||||||
|
|
||||||
|
_disposed = true;
|
||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
//release unmanaged resources here...
|
|
||||||
_disposed = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,20 +203,12 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
// Do not use the memoryStreamFactory here, they don't place nice with compression
|
// Do not use the memoryStreamFactory here, they don't place nice with compression
|
||||||
using (var ms = new MemoryStream())
|
using (var ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
using (var compressionStream = GetCompressionStream(ms, compressionType))
|
ContentTypes.Instance.SerializeToStream(request, dto, ms);
|
||||||
{
|
ms.Position = 0;
|
||||||
ContentTypes.Instance.SerializeToStream(request, dto, compressionStream);
|
|
||||||
compressionStream.Dispose();
|
|
||||||
|
|
||||||
var compressedBytes = ms.ToArray();
|
var responseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
var httpResult = new StreamWriter(compressedBytes, request.ResponseContentType, _logger);
|
return GetCompressedResult(ms, compressionType, responseHeaders, false, request.ResponseContentType).Result;
|
||||||
|
|
||||||
//httpResult.Headers["Content-Length"] = compressedBytes.Length.ToString(UsCulture);
|
|
||||||
httpResult.Headers["Content-Encoding"] = compressionType;
|
|
||||||
|
|
||||||
return httpResult;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,45 +583,53 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
string content;
|
|
||||||
|
|
||||||
using (var stream = await factoryFn().ConfigureAwait(false))
|
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)
|
||||||
{
|
{
|
||||||
content = await reader.ReadToEndAsync().ConfigureAwait(false);
|
using (var reader = new MemoryStream())
|
||||||
}
|
{
|
||||||
}
|
await stream.CopyToAsync(reader).ConfigureAwait(false);
|
||||||
|
|
||||||
var contents = Compress(content, requestedCompressionType);
|
reader.Position = 0;
|
||||||
|
var content = reader.ToArray();
|
||||||
|
|
||||||
responseHeaders["Content-Length"] = contents.Length.ToString(UsCulture);
|
if (content.Length >= 1024)
|
||||||
|
{
|
||||||
|
content = Compress(content, requestedCompressionType);
|
||||||
responseHeaders["Content-Encoding"] = requestedCompressionType;
|
responseHeaders["Content-Encoding"] = requestedCompressionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
responseHeaders["Content-Length"] = content.Length.ToString(UsCulture);
|
||||||
|
|
||||||
if (isHeadRequest)
|
if (isHeadRequest)
|
||||||
{
|
{
|
||||||
return GetHttpResult(new byte[] { }, contentType, true);
|
return GetHttpResult(new byte[] { }, contentType, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetHttpResult(contents, contentType, true, responseHeaders);
|
return GetHttpResult(content, contentType, true, responseHeaders);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] Compress(string text, string compressionType)
|
private byte[] Compress(byte[] bytes, string compressionType)
|
||||||
{
|
{
|
||||||
if (compressionType == "deflate")
|
if (compressionType == "deflate")
|
||||||
return Deflate(text);
|
return Deflate(bytes);
|
||||||
|
|
||||||
if (compressionType == "gzip")
|
if (compressionType == "gzip")
|
||||||
return GZip(text);
|
return GZip(bytes);
|
||||||
|
|
||||||
throw new NotSupportedException(compressionType);
|
throw new NotSupportedException(compressionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] Deflate(string text)
|
|
||||||
{
|
|
||||||
return Deflate(Encoding.UTF8.GetBytes(text));
|
|
||||||
}
|
|
||||||
|
|
||||||
private byte[] Deflate(byte[] bytes)
|
private byte[] Deflate(byte[] bytes)
|
||||||
{
|
{
|
||||||
// In .NET FX incompat-ville, you can't access compressed bytes without closing DeflateStream
|
// 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)
|
private byte[] GZip(byte[] buffer)
|
||||||
{
|
{
|
||||||
using (var ms = new MemoryStream())
|
using (var ms = new MemoryStream())
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
/// Gets or sets the error handler.
|
/// Gets or sets the error handler.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The error handler.</value>
|
/// <value>The error handler.</value>
|
||||||
Action<Exception, IRequest> ErrorHandler { get; set; }
|
Action<Exception, IRequest, bool> ErrorHandler { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the request handler.
|
/// Gets or sets the request handler.
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
||||||
_httpRequestFactory = httpRequestFactory;
|
_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 Func<IHttpRequest, Uri, Task> RequestHandler { get; set; }
|
||||||
|
|
||||||
public Action<WebSocketConnectingEventArgs> WebSocketConnecting { get; set; }
|
public Action<WebSocketConnectingEventArgs> WebSocketConnecting { get; set; }
|
||||||
|
@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
||||||
_logger.ErrorException("Error processing request", ex);
|
_logger.ErrorException("Error processing request", ex);
|
||||||
|
|
||||||
httpReq = httpReq ?? GetRequest(context);
|
httpReq = httpReq ?? GetRequest(context);
|
||||||
ErrorHandler(ex, httpReq);
|
ErrorHandler(ex, httpReq, true);
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ using System.Linq;
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
|
@ -19,6 +20,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Any folder named in this list will be ignored - can be added to at runtime for extensibility
|
/// 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;
|
_fileSystem = fileSystem;
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -54,6 +57,12 @@ namespace Emby.Server.Implementations.Library
|
||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||||
public bool ShouldIgnore(FileSystemMetadata fileInfo, BaseItem parent)
|
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 filename = fileInfo.Name;
|
||||||
var isHidden = fileInfo.IsHidden;
|
var isHidden = fileInfo.IsHidden;
|
||||||
var path = fileInfo.FullName;
|
var path = fileInfo.FullName;
|
||||||
|
|
|
@ -3084,7 +3084,11 @@ namespace Emby.Server.Implementations.Library
|
||||||
|
|
||||||
foreach (var contentType in ConfigurationManager.Configuration.ContentTypes)
|
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))
|
|| _fileSystem.ContainsSubPath(path, contentType.Name))
|
||||||
{
|
{
|
||||||
removeList.Add(contentType);
|
removeList.Add(contentType);
|
||||||
|
|
|
@ -74,21 +74,21 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||||
|
|
||||||
if (string.Equals(collectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase))
|
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) ||
|
if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) ||
|
||||||
string.Equals(collectionType, CollectionType.Photos, 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
|
// Owned items should just use the plain video type
|
||||||
if (parent == null)
|
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())
|
if (parent is Series || parent.GetParents().OfType<Series>().Any())
|
||||||
|
@ -96,18 +96,18 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||||
return null;
|
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))
|
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;
|
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()
|
where T : Video, new()
|
||||||
{
|
{
|
||||||
var files = new List<FileSystemMetadata>();
|
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
|
// Loop through each child file/folder and see if we find a video
|
||||||
foreach (var child in fileSystemEntries)
|
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)
|
if (child.IsDirectory)
|
||||||
{
|
{
|
||||||
leftOver.Add(child);
|
leftOver.Add(child);
|
||||||
|
@ -408,7 +418,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||||
!string.Equals(collectionType, CollectionType.Photos) &&
|
!string.Equals(collectionType, CollectionType.Photos) &&
|
||||||
!string.Equals(collectionType, CollectionType.MusicVideos);
|
!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)
|
if (result.Items.Count == 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
var httpRequestOptions = new HttpRequestOptions
|
var httpRequestOptions = new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = mediaSource.Path,
|
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))
|
using (var response = await _httpClient.SendAsync(httpRequestOptions, "GET").ConfigureAwait(false))
|
||||||
|
|
|
@ -440,10 +440,23 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
|
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
|
||||||
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
|
IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
|
||||||
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
|
IsMovie = showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1,
|
||||||
ShowId = programInfo.programID,
|
|
||||||
Etag = programInfo.md5
|
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)
|
if (programInfo.videoProperties != null)
|
||||||
{
|
{
|
||||||
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
|
info.IsHD = programInfo.videoProperties.Contains("hdtv", StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
|
@ -2647,7 +2647,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
public GuideInfo GetGuideInfo()
|
public GuideInfo GetGuideInfo()
|
||||||
{
|
{
|
||||||
var startDate = DateTime.UtcNow;
|
var startDate = DateTime.UtcNow;
|
||||||
var endDate = startDate.AddDays(14);
|
var endDate = startDate.AddDays(GetGuideDays());
|
||||||
|
|
||||||
return new GuideInfo
|
return new GuideInfo
|
||||||
{
|
{
|
||||||
|
|
7
Emby.Server.Implementations/Localization/Ratings/uk.txt
Normal file
7
Emby.Server.Implementations/Localization/Ratings/uk.txt
Normal file
|
@ -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
|
|
@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
new TaskTriggerInfo
|
new TaskTriggerInfo
|
||||||
{
|
{
|
||||||
Type = TaskTriggerInfo.TriggerDaily,
|
Type = TaskTriggerInfo.TriggerDaily,
|
||||||
TimeOfDayTicks = TimeSpan.FromHours(1).Ticks,
|
TimeOfDayTicks = TimeSpan.FromHours(2).Ticks,
|
||||||
MaxRuntimeMs = Convert.ToInt32(TimeSpan.FromHours(4).TotalMilliseconds)
|
MaxRuntimeMs = Convert.ToInt32(TimeSpan.FromHours(4).TotalMilliseconds)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.Sync
|
||||||
},
|
},
|
||||||
new ProfileCondition
|
new ProfileCondition
|
||||||
{
|
{
|
||||||
Condition = ProfileConditionType.EqualsAny,
|
Condition = ProfileConditionType.Equals,
|
||||||
Property = ProfileConditionValue.NumVideoStreams,
|
Property = ProfileConditionValue.NumVideoStreams,
|
||||||
Value = "1",
|
Value = "1",
|
||||||
IsRequired = false
|
IsRequired = false
|
||||||
|
@ -230,20 +230,6 @@ namespace Emby.Server.Implementations.Sync
|
||||||
Codec = "aac,mp3",
|
Codec = "aac,mp3",
|
||||||
Conditions = new[]
|
Conditions = new[]
|
||||||
{
|
{
|
||||||
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
|
new ProfileCondition
|
||||||
{
|
{
|
||||||
Condition = ProfileConditionType.Equals,
|
Condition = ProfileConditionType.Equals,
|
||||||
|
|
|
@ -515,8 +515,14 @@ namespace Emby.Server.Implementations.Sync
|
||||||
|
|
||||||
jobItem.Progress = 0;
|
jobItem.Progress = 0;
|
||||||
|
|
||||||
var syncOptions = _config.GetSyncOptions();
|
|
||||||
var job = _syncManager.GetJob(jobItem.JobId);
|
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);
|
var user = _userManager.GetUserById(job.UserId);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
|
@ -552,6 +558,8 @@ namespace Emby.Server.Implementations.Sync
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var syncOptions = _config.GetSyncOptions();
|
||||||
|
|
||||||
var video = item as Video;
|
var video = item as Video;
|
||||||
if (video != null)
|
if (video != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1030,6 +1030,18 @@ namespace Emby.Server.Implementations.Sync
|
||||||
{
|
{
|
||||||
await CancelJobItem(jobItem.Id).ConfigureAwait(false);
|
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);
|
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.Progress = 0;
|
||||||
jobItem.IsMarkedForRemoval = true;
|
jobItem.IsMarkedForRemoval = true;
|
||||||
|
@ -1071,18 +1075,18 @@ namespace Emby.Server.Implementations.Sync
|
||||||
_logger.ErrorException("Error deleting directory {0}", ex, path);
|
_logger.ErrorException("Error deleting directory {0}", ex, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
//var jobItemsResult = GetJobItems(new SyncJobItemQuery
|
var jobItemsResult = GetJobItems(new SyncJobItemQuery
|
||||||
//{
|
{
|
||||||
// AddMetadata = false,
|
AddMetadata = false,
|
||||||
// JobId = jobItem.JobId,
|
JobId = jobItem.JobId,
|
||||||
// Limit = 0,
|
Limit = 0,
|
||||||
// Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Failed, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring }
|
Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring }
|
||||||
//});
|
});
|
||||||
|
|
||||||
//if (jobItemsResult.TotalRecordCount == 0)
|
if (jobItemsResult.TotalRecordCount == 0)
|
||||||
//{
|
{
|
||||||
// await CancelJob(jobItem.JobId).ConfigureAwait(false);
|
await CancelJob(jobItem.JobId).ConfigureAwait(false);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task MarkJobItemForRemoval(string id)
|
public Task MarkJobItemForRemoval(string id)
|
||||||
|
|
|
@ -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()
|
public void Dispose()
|
||||||
|
|
|
@ -221,48 +221,70 @@ namespace Emby.Server.Implementations.Sync
|
||||||
using (var connection = CreateConnection())
|
using (var connection = CreateConnection())
|
||||||
{
|
{
|
||||||
string commandText;
|
string commandText;
|
||||||
var paramList = new List<object>();
|
|
||||||
|
|
||||||
if (insert)
|
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
|
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);
|
|
||||||
|
|
||||||
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 (insert)
|
|
||||||
{
|
|
||||||
paramList.Insert(0, job.Id.ToGuidParamValue());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
paramList.Add(job.Id.ToGuidParamValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connection.RunInTransaction(conn =>
|
connection.RunInTransaction(conn =>
|
||||||
{
|
{
|
||||||
conn.Execute(commandText, paramList.ToArray());
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(job.ParentId))
|
||||||
|
{
|
||||||
|
statement.TryBind("@ParentId", job.ParentId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
statement.TryBindNull("@ParentId");
|
||||||
|
}
|
||||||
|
|
||||||
|
statement.TryBind("@UnwatchedOnly", job.UnwatchedOnly);
|
||||||
|
|
||||||
|
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);
|
}, TransactionMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,6 +360,11 @@ namespace Emby.Server.Implementations.Sync
|
||||||
whereClauses.Add("UserId=?");
|
whereClauses.Add("UserId=?");
|
||||||
paramList.Add(query.UserId);
|
paramList.Add(query.UserId);
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(query.ItemId))
|
||||||
|
{
|
||||||
|
whereClauses.Add("ItemIds like ?");
|
||||||
|
paramList.Add("%" + query.ItemId + "%");
|
||||||
|
}
|
||||||
if (query.SyncNewContent.HasValue)
|
if (query.SyncNewContent.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("SyncNewContent=?");
|
whereClauses.Add("SyncNewContent=?");
|
||||||
|
|
|
@ -154,6 +154,9 @@ namespace Emby.Server.Implementations.Udp
|
||||||
catch (ObjectDisposedException)
|
catch (ObjectDisposedException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error receiving udp message", ex);
|
_logger.ErrorException("Error receiving udp message", ex);
|
||||||
|
@ -167,6 +170,11 @@ namespace Emby.Server.Implementations.Udp
|
||||||
/// <param name="message">The message.</param>
|
/// <param name="message">The message.</param>
|
||||||
private void OnMessageReceived(SocketReceiveResult message)
|
private void OnMessageReceived(SocketReceiveResult message)
|
||||||
{
|
{
|
||||||
|
if (_isDisposed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (message.RemoteEndPoint.Port == 0)
|
if (message.RemoteEndPoint.Port == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -221,6 +229,11 @@ namespace Emby.Server.Implementations.Udp
|
||||||
|
|
||||||
public async Task SendAsync(byte[] bytes, IpEndPointInfo remoteEndPoint)
|
public async Task SendAsync(byte[] bytes, IpEndPointInfo remoteEndPoint)
|
||||||
{
|
{
|
||||||
|
if (_isDisposed)
|
||||||
|
{
|
||||||
|
throw new ObjectDisposedException(GetType().Name);
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes == null)
|
if (bytes == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("bytes");
|
throw new ArgumentNullException("bytes");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Emby.XmlTv" version="1.0.3" targetFramework="portable45-net45+win8" />
|
<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="SQLitePCL.pretty" version="1.1.0" targetFramework="portable45-net45+win8" />
|
||||||
<package id="SQLitePCLRaw.core" version="1.1.1" 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" />
|
<package id="UniversalDetector" version="1.0.1" targetFramework="portable45-net45+win8" />
|
||||||
|
|
|
@ -99,6 +99,7 @@ namespace MediaBrowser.Api
|
||||||
var path = item.ContainingFolderPath;
|
var path = item.ContainingFolderPath;
|
||||||
|
|
||||||
var types = _config.Configuration.ContentTypes
|
var types = _config.Configuration.ContentTypes
|
||||||
|
.Where(i => !string.IsNullOrWhiteSpace(i.Name))
|
||||||
.Where(i => !string.Equals(i.Name, path, StringComparison.OrdinalIgnoreCase))
|
.Where(i => !string.Equals(i.Name, path, StringComparison.OrdinalIgnoreCase))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
|
@ -870,33 +870,47 @@ namespace MediaBrowser.Api.Playback
|
||||||
inputChannels = null;
|
inputChannels = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
int? resultChannels = null;
|
int? transcoderChannelLimit = null;
|
||||||
var codec = outputAudioCodec ?? string.Empty;
|
var codec = outputAudioCodec ?? string.Empty;
|
||||||
|
|
||||||
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
|
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
{
|
{
|
||||||
// wmav2 currently only supports two channel output
|
// 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)
|
||||||
{
|
{
|
||||||
var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
|
// libmp3lame currently only supports two channel output
|
||||||
? 2
|
transcoderChannelLimit = 2;
|
||||||
: 6;
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
var isTranscodingAudio = !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
int? resultChannels = null;
|
||||||
|
if (isTranscodingAudio)
|
||||||
|
{
|
||||||
|
resultChannels = request.TranscodingMaxAudioChannels;
|
||||||
|
}
|
||||||
|
resultChannels = resultChannels ?? request.MaxAudioChannels ?? request.AudioChannels;
|
||||||
|
|
||||||
if (inputChannels.HasValue)
|
if (inputChannels.HasValue)
|
||||||
{
|
{
|
||||||
channelLimit = Math.Min(channelLimit, inputChannels.Value);
|
resultChannels = resultChannels.HasValue
|
||||||
|
? Math.Min(resultChannels.Value, inputChannels.Value)
|
||||||
|
: inputChannels.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
|
if (isTranscodingAudio && transcoderChannelLimit.HasValue)
|
||||||
resultChannels = Math.Min(request.MaxAudioChannels.Value, channelLimit);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request.TranscodingMaxAudioChannels.HasValue && !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
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;
|
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 += 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
|
// h264
|
||||||
return string.Format(" -b:v {0} -maxrate {0} -bufsize {1}",
|
return string.Format(" -maxrate {0} -bufsize {1}",
|
||||||
bitrate.Value.ToString(UsCulture),
|
bitrate.Value.ToString(UsCulture),
|
||||||
(bitrate.Value * 2).ToString(UsCulture));
|
(bitrate.Value * 2).ToString(UsCulture));
|
||||||
}
|
}
|
||||||
|
@ -1753,13 +1779,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
request.Tag = val;
|
request.Tag = val;
|
||||||
}
|
}
|
||||||
else if (i == 29)
|
else if (i == 29)
|
||||||
{
|
|
||||||
if (videoRequest != null)
|
|
||||||
{
|
|
||||||
videoRequest.EnableSplittingOnNonKeyFrames = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (i == 30)
|
|
||||||
{
|
{
|
||||||
if (videoRequest != null)
|
if (videoRequest != null)
|
||||||
{
|
{
|
||||||
|
@ -1948,10 +1967,15 @@ namespace MediaBrowser.Api.Playback
|
||||||
state.OutputVideoCodec = state.VideoRequest.VideoCodec;
|
state.OutputVideoCodec = state.VideoRequest.VideoCodec;
|
||||||
state.OutputVideoBitrate = GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream, state.OutputVideoCodec);
|
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(
|
var resolution = ResolutionNormalizer.Normalize(
|
||||||
state.VideoStream == null ? (int?)null : state.VideoStream.BitRate,
|
state.VideoStream == null ? (int?) null : state.VideoStream.BitRate,
|
||||||
state.OutputVideoBitrate.Value,
|
state.OutputVideoBitrate.Value,
|
||||||
state.VideoStream == null ? null : state.VideoStream.Codec,
|
state.VideoStream == null ? null : state.VideoStream.Codec,
|
||||||
state.OutputVideoCodec,
|
state.OutputVideoCodec,
|
||||||
|
@ -1961,13 +1985,12 @@ namespace MediaBrowser.Api.Playback
|
||||||
videoRequest.MaxWidth = resolution.MaxWidth;
|
videoRequest.MaxWidth = resolution.MaxWidth;
|
||||||
videoRequest.MaxHeight = resolution.MaxHeight;
|
videoRequest.MaxHeight = resolution.MaxHeight;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ApplyDeviceProfileSettings(state);
|
ApplyDeviceProfileSettings(state);
|
||||||
|
}
|
||||||
if (videoRequest != null)
|
else
|
||||||
{
|
{
|
||||||
TryStreamCopy(state, videoRequest);
|
ApplyDeviceProfileSettings(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.OutputFilePath = GetOutputFilePath(state);
|
state.OutputFilePath = GetOutputFilePath(state);
|
||||||
|
@ -2096,7 +2119,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
state.MediaSource = mediaSource;
|
state.MediaSource = mediaSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool CanStreamCopyVideo(StreamState state)
|
protected bool CanStreamCopyVideo(StreamState state)
|
||||||
{
|
{
|
||||||
var request = state.VideoRequest;
|
var request = state.VideoRequest;
|
||||||
var videoStream = state.VideoStream;
|
var videoStream = state.VideoStream;
|
||||||
|
@ -2381,7 +2404,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
||||||
state.VideoRequest.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
|
state.VideoRequest.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
|
||||||
state.VideoRequest.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -886,8 +886,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
}
|
}
|
||||||
|
|
||||||
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
|
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
|
||||||
var enableSplittingOnNonKeyFrames = state.VideoRequest.EnableSplittingOnNonKeyFrames && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase);
|
var enableSplittingOnNonKeyFrames = string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && false;
|
||||||
enableSplittingOnNonKeyFrames = false;
|
|
||||||
|
|
||||||
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
|
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
|
||||||
var hlsProtocolSupportsSplittingByTime = false;
|
var hlsProtocolSupportsSplittingByTime = false;
|
||||||
|
|
|
@ -153,7 +153,7 @@ namespace MediaBrowser.Api.Playback.Progressive
|
||||||
|
|
||||||
if (!state.RunTimeTicks.HasValue)
|
if (!state.RunTimeTicks.HasValue)
|
||||||
{
|
{
|
||||||
args += " -fflags +genpts -flags +global_header";
|
args += " -flags -global_header -fflags +genpts";
|
||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
|
|
|
@ -194,7 +194,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
public bool CopyTimestamps { get; set; }
|
public bool CopyTimestamps { get; set; }
|
||||||
|
|
||||||
public bool EnableSubtitlesInManifest { get; set; }
|
public bool EnableSubtitlesInManifest { get; set; }
|
||||||
public bool EnableSplittingOnNonKeyFrames { get; set; }
|
|
||||||
public bool RequireAvc { get; set; }
|
public bool RequireAvc { get; set; }
|
||||||
|
|
||||||
public VideoStreamRequest()
|
public VideoStreamRequest()
|
||||||
|
|
|
@ -15,15 +15,8 @@ namespace MediaBrowser.Controller.Channels
|
||||||
/// Adds the parts.
|
/// Adds the parts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="channels">The channels.</param>
|
/// <param name="channels">The channels.</param>
|
||||||
/// <param name="factories">The factories.</param>
|
|
||||||
void AddParts(IEnumerable<IChannel> channels);
|
void AddParts(IEnumerable<IChannel> channels);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the channel download path.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The channel download path.</value>
|
|
||||||
string ChannelDownloadPath { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the channel features.
|
/// Gets the channel features.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -115,10 +108,9 @@ namespace MediaBrowser.Controller.Channels
|
||||||
/// Gets the channel item media sources.
|
/// Gets the channel item media sources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <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>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
|
/// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
|
||||||
Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, bool includeCachedVersions, CancellationToken cancellationToken);
|
Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the channel folder.
|
/// Gets the channel folder.
|
||||||
|
|
|
@ -206,7 +206,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
{
|
{
|
||||||
if (SourceType == SourceType.Channel)
|
if (SourceType == SourceType.Channel)
|
||||||
{
|
{
|
||||||
var sources = ChannelManager.GetStaticMediaSources(this, false, CancellationToken.None)
|
var sources = ChannelManager.GetStaticMediaSources(this, CancellationToken.None)
|
||||||
.Result.ToList();
|
.Result.ToList();
|
||||||
|
|
||||||
if (sources.Count > 0)
|
if (sources.Count > 0)
|
||||||
|
|
|
@ -549,7 +549,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
if (SourceType == SourceType.Channel)
|
if (SourceType == SourceType.Channel)
|
||||||
{
|
{
|
||||||
var sources = ChannelManager.GetStaticMediaSources(this, false, CancellationToken.None)
|
var sources = ChannelManager.GetStaticMediaSources(this, CancellationToken.None)
|
||||||
.Result.ToList();
|
.Result.ToList();
|
||||||
|
|
||||||
if (sources.Count > 0)
|
if (sources.Count > 0)
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public string VideoCodec { get; set; }
|
public string VideoCodec { get; set; }
|
||||||
|
|
||||||
|
public int? TranscodingMaxAudioChannels { get; set; }
|
||||||
public int? VideoBitRate { get; set; }
|
public int? VideoBitRate { get; set; }
|
||||||
public int? AudioStreamIndex { get; set; }
|
public int? AudioStreamIndex { get; set; }
|
||||||
public int? VideoStreamIndex { get; set; }
|
public int? VideoStreamIndex { get; set; }
|
||||||
|
@ -86,6 +87,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
MaxVideoBitDepth = info.MaxVideoBitDepth;
|
MaxVideoBitDepth = info.MaxVideoBitDepth;
|
||||||
SubtitleMethod = info.SubtitleDeliveryMethod;
|
SubtitleMethod = info.SubtitleDeliveryMethod;
|
||||||
Context = info.Context;
|
Context = info.Context;
|
||||||
|
TranscodingMaxAudioChannels = info.TranscodingMaxAudioChannels;
|
||||||
|
|
||||||
if (info.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
|
if (info.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,11 @@ namespace MediaBrowser.MediaEncoding.BdInfo
|
||||||
/// <returns>BlurayDiscInfo.</returns>
|
/// <returns>BlurayDiscInfo.</returns>
|
||||||
public BlurayDiscInfo GetDiscInfo(string path)
|
public BlurayDiscInfo GetDiscInfo(string path)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
var bdrom = new BDROM(path, _fileSystem, _textEncoding);
|
var bdrom = new BDROM(path, _fileSystem, _textEncoding);
|
||||||
|
|
||||||
bdrom.Scan();
|
bdrom.Scan();
|
||||||
|
|
|
@ -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 += 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
|
// h264
|
||||||
return string.Format(" -b:v {0} -maxrate {0} -bufsize {1}",
|
return string.Format(" -maxrate {0} -bufsize {1}",
|
||||||
bitrate.Value.ToString(UsCulture),
|
bitrate.Value.ToString(UsCulture),
|
||||||
(bitrate.Value * 2).ToString(UsCulture));
|
(bitrate.Value * 2).ToString(UsCulture));
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,30 +370,50 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
inputChannels = null;
|
inputChannels = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int? transcoderChannelLimit = null;
|
||||||
var codec = outputAudioCodec ?? string.Empty;
|
var codec = outputAudioCodec ?? string.Empty;
|
||||||
|
|
||||||
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
|
if (codec.IndexOf("wma", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
{
|
{
|
||||||
// wmav2 currently only supports two channel output
|
// 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
|
// libmp3lame currently only supports two channel output
|
||||||
? 2
|
transcoderChannelLimit = 2;
|
||||||
: 6;
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
var isTranscodingAudio = !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
int? resultChannels = null;
|
||||||
|
if (isTranscodingAudio)
|
||||||
|
{
|
||||||
|
resultChannels = request.TranscodingMaxAudioChannels;
|
||||||
|
}
|
||||||
|
resultChannels = resultChannels ?? request.MaxAudioChannels ?? request.AudioChannels;
|
||||||
|
|
||||||
if (inputChannels.HasValue)
|
if (inputChannels.HasValue)
|
||||||
{
|
{
|
||||||
channelLimit = Math.Min(channelLimit, inputChannels.Value);
|
resultChannels = resultChannels.HasValue
|
||||||
|
? Math.Min(resultChannels.Value, inputChannels.Value)
|
||||||
|
: inputChannels.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
|
if (isTranscodingAudio && transcoderChannelLimit.HasValue)
|
||||||
return Math.Min(request.MaxAudioChannels.Value, channelLimit);
|
{
|
||||||
|
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)
|
private int? GetVideoBitrateParamValue(EncodingJobOptions request, MediaStream videoStream, string outputVideoCodec)
|
||||||
|
|
|
@ -95,6 +95,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
int defaultImageExtractionTimeoutMs,
|
int defaultImageExtractionTimeoutMs,
|
||||||
bool enableEncoderFontFile, IEnvironmentInfo environmentInfo)
|
bool enableEncoderFontFile, IEnvironmentInfo environmentInfo)
|
||||||
{
|
{
|
||||||
|
if (jsonSerializer == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("jsonSerializer");
|
||||||
|
}
|
||||||
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
ConfigurationManager = configurationManager;
|
ConfigurationManager = configurationManager;
|
||||||
|
@ -282,6 +287,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logger.Info("Attempting to update encoder path to {0}. pathType: {1}", path ?? string.Empty, pathType ?? string.Empty);
|
||||||
|
|
||||||
Tuple<string, string> newPaths;
|
Tuple<string, string> newPaths;
|
||||||
|
|
||||||
if (string.Equals(pathType, "system", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(pathType, "system", StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -632,7 +639,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
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.");
|
throw new Exception("ffprobe failed - streams and format are both null.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,11 +462,9 @@ namespace MediaBrowser.Model.Configuration
|
||||||
Type = ImageType.Art
|
Type = ImageType.Art
|
||||||
},
|
},
|
||||||
|
|
||||||
// Don't download this by default
|
|
||||||
// Generally not used
|
|
||||||
new ImageOption
|
new ImageOption
|
||||||
{
|
{
|
||||||
Limit = 0,
|
Limit = 1,
|
||||||
Type = ImageType.Logo
|
Type = ImageType.Logo
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -556,7 +554,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
Type = ImageType.Thumb
|
Type = ImageType.Thumb
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
|
DisabledMetadataFetchers = new []{ "TheMovieDb" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions(0, 1280)
|
new MetadataOptions(0, 1280)
|
||||||
|
@ -577,8 +575,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
Type = ImageType.Primary
|
Type = ImageType.Primary
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DisabledMetadataFetchers = new []{ "The Open Movie Database" },
|
DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" },
|
||||||
DisabledImageFetchers = new []{ "TheMovieDb" }
|
DisabledImageFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
public bool DisplayMissingEpisodes { get; set; }
|
public bool DisplayMissingEpisodes { get; set; }
|
||||||
public bool DisplayUnairedEpisodes { get; set; }
|
public bool DisplayUnairedEpisodes { get; set; }
|
||||||
|
|
||||||
public string[] ExcludeFoldersFromGrouping { get; set; }
|
|
||||||
public string[] GroupedFolders { get; set; }
|
public string[] GroupedFolders { get; set; }
|
||||||
|
|
||||||
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
||||||
|
|
|
@ -124,6 +124,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
switch (condition.Condition)
|
switch (condition.Condition)
|
||||||
{
|
{
|
||||||
case ProfileConditionType.Equals:
|
case ProfileConditionType.Equals:
|
||||||
|
case ProfileConditionType.EqualsAny:
|
||||||
return currentValue.Value.Equals(expected);
|
return currentValue.Value.Equals(expected);
|
||||||
case ProfileConditionType.GreaterThanEqual:
|
case ProfileConditionType.GreaterThanEqual:
|
||||||
return currentValue.Value >= expected;
|
return currentValue.Value >= expected;
|
||||||
|
@ -132,7 +133,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return !currentValue.Value.Equals(expected);
|
return !currentValue.Value.Equals(expected);
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return !StringHelper.EqualsIgnoreCase(currentValue, expected);
|
return !StringHelper.EqualsIgnoreCase(currentValue, expected);
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +183,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return currentValue.Value != expected;
|
return currentValue.Value != expected;
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +212,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return !currentValue.Value.Equals(expected);
|
return !currentValue.Value.Equals(expected);
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +241,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return !currentValue.Value.Equals(expected);
|
return !currentValue.Value.Equals(expected);
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +265,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
case ProfileConditionType.NotEquals:
|
case ProfileConditionType.NotEquals:
|
||||||
return timestamp != expected;
|
return timestamp != expected;
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException("Unexpected ProfileConditionType");
|
throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,8 +410,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
audioStreamIndex = audioStream.Index;
|
audioStreamIndex = audioStream.Index;
|
||||||
}
|
}
|
||||||
|
|
||||||
var allMediaStreams = item.MediaStreams;
|
|
||||||
|
|
||||||
MediaStream videoStream = item.VideoStream;
|
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
|
// 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)
|
if (isEligibleForDirectPlay || isEligibleForDirectStream)
|
||||||
{
|
{
|
||||||
// See if it can be direct played
|
// 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)
|
if (directPlay != null)
|
||||||
{
|
{
|
||||||
|
@ -482,7 +480,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
|
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
|
||||||
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
||||||
playlistItem.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
|
playlistItem.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
|
||||||
playlistItem.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels))
|
if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels))
|
||||||
{
|
{
|
||||||
|
@ -656,8 +653,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
MediaStream videoStream,
|
MediaStream videoStream,
|
||||||
MediaStream audioStream,
|
MediaStream audioStream,
|
||||||
bool isEligibleForDirectPlay,
|
bool isEligibleForDirectPlay,
|
||||||
bool isEligibleForDirectStream,
|
bool isEligibleForDirectStream)
|
||||||
List<MediaStream> allMediaStreams)
|
|
||||||
{
|
{
|
||||||
DeviceProfile profile = options.Profile;
|
DeviceProfile profile = options.Profile;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
public bool RequireAvc { get; set; }
|
public bool RequireAvc { get; set; }
|
||||||
public bool CopyTimestamps { get; set; }
|
public bool CopyTimestamps { get; set; }
|
||||||
public bool EnableSubtitlesInManifest { get; set; }
|
public bool EnableSubtitlesInManifest { get; set; }
|
||||||
public bool EnableSplittingOnNonKeyFrames { get; set; }
|
|
||||||
public string[] AudioCodecs { get; set; }
|
public string[] AudioCodecs { get; set; }
|
||||||
|
|
||||||
public int? AudioStreamIndex { 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("EnableSubtitlesInManifest", item.EnableSubtitlesInManifest.ToString().ToLower()));
|
||||||
|
|
||||||
list.Add(new NameValuePair("Tag", item.MediaSource.ETag ?? string.Empty));
|
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()));
|
list.Add(new NameValuePair("RequireAvc", item.RequireAvc.ToString().ToLower()));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -39,9 +39,6 @@ namespace MediaBrowser.Model.Dlna
|
||||||
[XmlAttribute("enableSubtitlesInManifest")]
|
[XmlAttribute("enableSubtitlesInManifest")]
|
||||||
public bool EnableSubtitlesInManifest { get; set; }
|
public bool EnableSubtitlesInManifest { get; set; }
|
||||||
|
|
||||||
[XmlAttribute("enableSplittingOnNonKeyFrames")]
|
|
||||||
public bool EnableSplittingOnNonKeyFrames { get; set; }
|
|
||||||
|
|
||||||
[XmlAttribute("maxAudioChannels")]
|
[XmlAttribute("maxAudioChannels")]
|
||||||
public string MaxAudioChannels { get; set; }
|
public string MaxAudioChannels { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace MediaBrowser.Model.Sync
|
||||||
/// <value>The user identifier.</value>
|
/// <value>The user identifier.</value>
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string ExcludeTargetIds { get; set; }
|
public string ExcludeTargetIds { get; set; }
|
||||||
|
public string ItemId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the status.
|
/// Gets or sets the status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -328,6 +328,11 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
/// <returns>VideoStream.</returns>
|
/// <returns>VideoStream.</returns>
|
||||||
private BlurayDiscInfo GetBDInfo(string path)
|
private BlurayDiscInfo GetBDInfo(string path)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("path");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _blurayExaminer.GetDiscInfo(path);
|
return _blurayExaminer.GetDiscInfo(path);
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
|
|
||||||
T item = itemResult.Item;
|
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
|
// 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))
|
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -221,7 +221,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
|
|
||||||
internal async Task<RootObject> GetRootObject(string imdbId, CancellationToken cancellationToken)
|
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;
|
string resultString;
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
|
|
||||||
internal async Task<SeasonRootObject> GetSeasonRootObject(string imdbId, int seasonId, CancellationToken cancellationToken)
|
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;
|
string resultString;
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,12 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
var seriesDataPath = TvdbSeriesProvider.GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds);
|
var seriesDataPath = TvdbSeriesProvider.GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds);
|
||||||
|
|
||||||
|
// Doesn't have required provider id's
|
||||||
|
if (string.IsNullOrWhiteSpace(seriesDataPath))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var episodeFiles = _fileSystem.GetFilePaths(seriesDataPath)
|
var episodeFiles = _fileSystem.GetFilePaths(seriesDataPath)
|
||||||
.Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase))
|
.Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase))
|
||||||
.Select(Path.GetFileNameWithoutExtension)
|
.Select(Path.GetFileNameWithoutExtension)
|
||||||
|
@ -238,7 +244,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
var targetSeries = DetermineAppropriateSeries(series, tuple.Item1);
|
var targetSeries = DetermineAppropriateSeries(series, tuple.Item1);
|
||||||
var seasonOffset = TvdbSeriesProvider.GetSeriesOffset(targetSeries.ProviderIds) ?? ((targetSeries.AnimeSeriesIndex ?? 1) - 1);
|
var seasonOffset = TvdbSeriesProvider.GetSeriesOffset(targetSeries.ProviderIds) ?? ((targetSeries.AnimeSeriesIndex ?? 1) - 1);
|
||||||
|
|
||||||
var unairedThresholdDays = 1;
|
var unairedThresholdDays = 2;
|
||||||
now = now.AddDays(0 - unairedThresholdDays);
|
now = now.AddDays(0 - unairedThresholdDays);
|
||||||
|
|
||||||
if (airDate.Value < now)
|
if (airDate.Value < now)
|
||||||
|
|
|
@ -55,11 +55,15 @@ namespace MediaBrowser.Providers.TV
|
||||||
return result;
|
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);
|
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);
|
{
|
||||||
|
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;
|
return result;
|
||||||
|
|
|
@ -512,9 +512,6 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncactivity.html">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncactivity.html">
|
||||||
<Link>Resources\dashboard-ui\syncactivity.html</Link>
|
<Link>Resources\dashboard-ui\syncactivity.html</Link>
|
||||||
</BundleResource>
|
</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">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\syncsettings.html">
|
||||||
<Link>Resources\dashboard-ui\syncsettings.html</Link>
|
<Link>Resources\dashboard-ui\syncsettings.html</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -929,6 +926,9 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\bower.json">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\bower.json">
|
||||||
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\bower.json</Link>
|
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\bower.json</Link>
|
||||||
</BundleResource>
|
</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">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-apiclient\connectionmanager.js">
|
||||||
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\connectionmanager.js</Link>
|
<Link>Resources\dashboard-ui\bower_components\emby-apiclient\connectionmanager.js</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -1031,6 +1031,9 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js">
|
||||||
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js</Link>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\filedownloader.js</Link>
|
||||||
</BundleResource>
|
</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">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\focusmanager.js">
|
||||||
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\focusmanager.js</Link>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\focusmanager.js</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -1172,6 +1175,9 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\emby-collapse\emby-collapse.js">
|
<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>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\emby-collapse\emby-collapse.js</Link>
|
||||||
</BundleResource>
|
</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">
|
<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>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\emby-input\emby-input.css</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -1805,6 +1811,12 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\bower_components\emby-webcomponents\sync\sync.js">
|
<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>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\sync.js</Link>
|
||||||
</BundleResource>
|
</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">
|
<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>
|
<Link>Resources\dashboard-ui\bower_components\emby-webcomponents\sync\synctoggle.js</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -2684,9 +2696,6 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\navdrawer\navdrawer.js">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\navdrawer\navdrawer.js">
|
||||||
<Link>Resources\dashboard-ui\components\navdrawer\navdrawer.js</Link>
|
<Link>Resources\dashboard-ui\components\navdrawer\navdrawer.js</Link>
|
||||||
</BundleResource>
|
</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">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\components\tvproviders\schedulesdirect.js">
|
||||||
<Link>Resources\dashboard-ui\components\tvproviders\schedulesdirect.js</Link>
|
<Link>Resources\dashboard-ui\components\tvproviders\schedulesdirect.js</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
@ -3347,9 +3356,6 @@
|
||||||
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncactivity.js">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncactivity.js">
|
||||||
<Link>Resources\dashboard-ui\scripts\syncactivity.js</Link>
|
<Link>Resources\dashboard-ui\scripts\syncactivity.js</Link>
|
||||||
</BundleResource>
|
</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">
|
<BundleResource Include="..\MediaBrowser.WebDashboard\dashboard-ui\scripts\syncsettings.js">
|
||||||
<Link>Resources\dashboard-ui\scripts\syncsettings.js</Link>
|
<Link>Resources\dashboard-ui\scripts\syncsettings.js</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
|
|
|
@ -142,7 +142,10 @@ namespace MediaBrowser.Server.Mac
|
||||||
|
|
||||||
private static EnvironmentInfo GetEnvironmentInfo()
|
private static EnvironmentInfo GetEnvironmentInfo()
|
||||||
{
|
{
|
||||||
var info = new EnvironmentInfo();
|
var info = new EnvironmentInfo()
|
||||||
|
{
|
||||||
|
CustomOperatingSystem = MediaBrowser.Model.System.OperatingSystem.OSX
|
||||||
|
};
|
||||||
|
|
||||||
var uname = GetUnixName();
|
var uname = GetUnixName();
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,11 @@ namespace MediaBrowser.Server.Mono
|
||||||
}
|
}
|
||||||
else if (environment.OperatingSystem == Model.System.OperatingSystem.Linux)
|
else if (environment.OperatingSystem == Model.System.OperatingSystem.Linux)
|
||||||
{
|
{
|
||||||
|
info.FFMpegFilename = "ffmpeg";
|
||||||
|
info.FFProbeFilename = "ffprobe";
|
||||||
info.ArchiveType = "7z";
|
info.ArchiveType = "7z";
|
||||||
info.Version = "20160215";
|
info.Version = "20160215";
|
||||||
|
info.DownloadUrls = GetDownloadUrls();
|
||||||
}
|
}
|
||||||
|
|
||||||
// No version available - user requirement
|
// No version available - user requirement
|
||||||
|
@ -61,6 +64,25 @@ namespace MediaBrowser.Server.Mono
|
||||||
return info;
|
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()
|
protected override void RestartInternal()
|
||||||
{
|
{
|
||||||
MainClass.Restart(StartupOptions);
|
MainClass.Restart(StartupOptions);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
@ -52,7 +53,7 @@ namespace MediaBrowser.ServerApplication.Native
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The STG m_ READ
|
/// The STG m_ READ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint STGM_READ = 0;
|
public const int STGM_READ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
// CLSID_ShellLink from ShlGuid.h
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class ShellLink
|
/// Class ShellLink
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
using Emby.Server.Core;
|
using Emby.Server.Core;
|
||||||
using Emby.Server.Implementations;
|
using Emby.Server.Implementations;
|
||||||
using Emby.Server.Implementations.EntryPoints;
|
using Emby.Server.Implementations.EntryPoints;
|
||||||
|
@ -93,21 +94,30 @@ namespace MediaBrowser.ServerApplication
|
||||||
|
|
||||||
protected override void ConfigureAutoRunInternal(bool autorun)
|
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);
|
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
|
//Copy our shortut into the startup folder for this user
|
||||||
var targetPath = Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk");
|
var targetPath = Path.Combine(startupPath, "Emby Server.lnk");
|
||||||
FileSystemManager.CreateDirectory(Path.GetDirectoryName(targetPath));
|
|
||||||
File.Copy(shortcutPath, targetPath, true);
|
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
|
else
|
||||||
{
|
{
|
||||||
//Remove our shortcut from the startup folder for this user
|
//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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,9 +162,6 @@
|
||||||
<Content Include="dashboard-ui\components\remotecontrolautoplay.js">
|
<Content Include="dashboard-ui\components\remotecontrolautoplay.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\components\syncjoblist\syncjoblist.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\components\tvproviders\xmltv.js">
|
<Content Include="dashboard-ui\components\tvproviders\xmltv.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -507,9 +504,6 @@
|
||||||
<Content Include="dashboard-ui\scripts\streamingsettings.js">
|
<Content Include="dashboard-ui\scripts\streamingsettings.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\syncjob.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\scripts\appservices.js">
|
<Content Include="dashboard-ui\scripts\appservices.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -534,9 +528,6 @@
|
||||||
<Content Include="dashboard-ui\streamingsettings.html">
|
<Content Include="dashboard-ui\streamingsettings.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\syncjob.html">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\appservices.html">
|
<Content Include="dashboard-ui\appservices.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
|
@ -37,7 +37,9 @@ namespace OpenSubtitlesHandler
|
||||||
public static IHttpClient HttpClient { get; set; }
|
public static IHttpClient HttpClient { get; set; }
|
||||||
public static ITextEncoding EncodingHelper { 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>
|
/// <summary>
|
||||||
/// Compute movie hash
|
/// Compute movie hash
|
||||||
|
@ -142,32 +144,6 @@ namespace OpenSubtitlesHandler
|
||||||
public static Stream SendRequest(byte[] request, string userAgent)
|
public static Stream SendRequest(byte[] request, string userAgent)
|
||||||
{
|
{
|
||||||
return SendRequestAsync(request, userAgent, CancellationToken.None).Result;
|
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)
|
public static async Task<Stream> SendRequestAsync(byte[] request, string userAgent, CancellationToken cancellationToken)
|
||||||
|
@ -177,7 +153,7 @@ namespace OpenSubtitlesHandler
|
||||||
RequestContentBytes = request,
|
RequestContentBytes = request,
|
||||||
RequestContentType = "text/xml",
|
RequestContentType = "text/xml",
|
||||||
UserAgent = userAgent,
|
UserAgent = userAgent,
|
||||||
Host = "api.opensubtitles.org:443",
|
Host = HostHeader,
|
||||||
Url = XML_RPC_SERVER,
|
Url = XML_RPC_SERVER,
|
||||||
|
|
||||||
// Response parsing will fail with this enabled
|
// Response parsing will fail with this enabled
|
||||||
|
@ -195,32 +171,6 @@ namespace OpenSubtitlesHandler
|
||||||
var result = await HttpClient.Post(options).ConfigureAwait(false);
|
var result = await HttpClient.Post(options).ConfigureAwait(false);
|
||||||
|
|
||||||
return result.Content;
|
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;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
private bool IsDuplicateSearchRequest(string searchTarget, IpEndPointInfo endPoint)
|
||||||
|
@ -485,7 +485,7 @@ namespace Rssdp.Infrastructure
|
||||||
|
|
||||||
_CommsServer.SendMulticastMessage(message);
|
_CommsServer.SendMulticastMessage(message);
|
||||||
|
|
||||||
WriteTrace(String.Format("Sent alive notification"), device);
|
//WriteTrace(String.Format("Sent alive notification"), device);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -209,7 +209,7 @@ namespace SocketHttpListener.Net
|
||||||
// TODO: can we get this stream before reading the input?
|
// TODO: can we get this stream before reading the input?
|
||||||
if (o_stream == null)
|
if (o_stream == null)
|
||||||
{
|
{
|
||||||
context.Response.DetermineIfChunked();
|
//context.Response.DetermineIfChunked();
|
||||||
|
|
||||||
if (context.Response.SendChunked || isExpect100Continue || context.Request.IsWebSocketRequest || true)
|
if (context.Response.SendChunked || isExpect100Continue || context.Request.IsWebSocketRequest || true)
|
||||||
{
|
{
|
||||||
|
@ -508,7 +508,7 @@ namespace SocketHttpListener.Net
|
||||||
{
|
{
|
||||||
force_close |= !context.Request.KeepAlive;
|
force_close |= !context.Request.KeepAlive;
|
||||||
if (!force_close)
|
if (!force_close)
|
||||||
force_close = (context.Response.Headers["connection"] == "close");
|
force_close = (string.Equals(context.Response.Headers["connection"], "close", StringComparison.OrdinalIgnoreCase));
|
||||||
/*
|
/*
|
||||||
if (!force_close) {
|
if (!force_close) {
|
||||||
// bool conn_close = (status_code == 400 || status_code == 408 || status_code == 411 ||
|
// bool conn_close = (status_code == 400 || status_code == 408 || status_code == 411 ||
|
||||||
|
|
|
@ -386,7 +386,7 @@ namespace SocketHttpListener.Net
|
||||||
|
|
||||||
if (content_type != null)
|
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;
|
string enc_name = content_encoding.WebName;
|
||||||
headers.SetInternal("Content-Type", content_type + "; charset=" + enc_name);
|
headers.SetInternal("Content-Type", content_type + "; charset=" + enc_name);
|
||||||
|
@ -429,9 +429,10 @@ namespace SocketHttpListener.Net
|
||||||
* HttpStatusCode.InternalServerError 500
|
* HttpStatusCode.InternalServerError 500
|
||||||
* HttpStatusCode.ServiceUnavailable 503
|
* 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 == 413 || status_code == 414 ||
|
||||||
status_code == 503);
|
status_code == 500 ||
|
||||||
|
status_code == 503;
|
||||||
|
|
||||||
if (conn_close == false)
|
if (conn_close == false)
|
||||||
conn_close = !context.Request.KeepAlive;
|
conn_close = !context.Request.KeepAlive;
|
||||||
|
|
|
@ -136,6 +136,11 @@ namespace SocketHttpListener.Net
|
||||||
if (disposed)
|
if (disposed)
|
||||||
throw new ObjectDisposedException(GetType().ToString());
|
throw new ObjectDisposedException(GetType().ToString());
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
//return;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] bytes = null;
|
byte[] bytes = null;
|
||||||
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
|
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
|
||||||
bool chunked = response.SendChunked;
|
bool chunked = response.SendChunked;
|
||||||
|
@ -176,6 +181,11 @@ namespace SocketHttpListener.Net
|
||||||
if (disposed)
|
if (disposed)
|
||||||
throw new ObjectDisposedException(GetType().ToString());
|
throw new ObjectDisposedException(GetType().ToString());
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
//return;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] bytes = null;
|
byte[] bytes = null;
|
||||||
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
|
MemoryStream ms = GetHeaders(response, _memoryStreamFactory, false);
|
||||||
bool chunked = response.SendChunked;
|
bool chunked = response.SendChunked;
|
||||||
|
@ -206,7 +216,7 @@ namespace SocketHttpListener.Net
|
||||||
await stream.WriteAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false);
|
await stream.WriteAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.SendChunked)
|
if (chunked)
|
||||||
stream.Write(crlf, 0, 2);
|
stream.Write(crlf, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user