mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
9afc7ff900
@ -457,6 +457,8 @@ namespace Emby.Common.Implementations.HttpClientManager
|
|||||||
if (options.RequestContentBytes != null ||
|
if (options.RequestContentBytes != null ||
|
||||||
!string.IsNullOrEmpty(options.RequestContent) ||
|
!string.IsNullOrEmpty(options.RequestContent) ||
|
||||||
string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
|
string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var bytes = options.RequestContentBytes ??
|
var bytes = options.RequestContentBytes ??
|
||||||
Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
|
Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
|
||||||
@ -468,6 +470,11 @@ namespace Emby.Common.Implementations.HttpClientManager
|
|||||||
#endif
|
#endif
|
||||||
(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)).Write(bytes, 0, bytes.Length);
|
(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)).Write(bytes, 0, bytes.Length);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new HttpException(ex.Message) { IsTimedOut = true };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (options.ResourcePool != null)
|
if (options.ResourcePool != null)
|
||||||
{
|
{
|
||||||
|
@ -309,8 +309,8 @@
|
|||||||
<Project>{4f26d5d8-a7b0-42b3-ba42-7cb7d245934e}</Project>
|
<Project>{4f26d5d8-a7b0-42b3-ba42-7cb7d245934e}</Project>
|
||||||
<Name>SocketHttpListener.Portable</Name>
|
<Name>SocketHttpListener.Portable</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<Reference Include="Emby.XmlTv, Version=1.0.6241.4924, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Emby.XmlTv, Version=1.0.6249.32870, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Emby.XmlTv.1.0.5\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
|
<HintPath>..\packages\Emby.XmlTv.1.0.6\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MediaBrowser.Naming, Version=1.0.6201.24431, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MediaBrowser.Naming, Version=1.0.6201.24431, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
@ -155,6 +155,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||||||
var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks);
|
var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks);
|
||||||
var inputModifiers = "-fflags +genpts -async 1 -vsync -1";
|
var inputModifiers = "-fflags +genpts -async 1 -vsync -1";
|
||||||
var mapArgs = string.Equals(OutputFormat, "mkv", StringComparison.OrdinalIgnoreCase) ? "-map 0" : "-sn";
|
var mapArgs = string.Equals(OutputFormat, "mkv", StringComparison.OrdinalIgnoreCase) ? "-map 0" : "-sn";
|
||||||
|
mapArgs = "-sn";
|
||||||
var commandLineArgs = "-i \"{0}\"{4} " + mapArgs + " {2} -map_metadata -1 -threads 0 {3} -y \"{1}\"";
|
var commandLineArgs = "-i \"{0}\"{4} " + mapArgs + " {2} -map_metadata -1 -threads 0 {3} -y \"{1}\"";
|
||||||
|
|
||||||
long startTimeTicks = 0;
|
long startTimeTicks = 0;
|
||||||
|
@ -50,6 +50,8 @@ namespace Emby.Server.Implementations.LiveTv
|
|||||||
{
|
{
|
||||||
var channel = _liveTvManager.GetInternalChannel(liveTvItem.ChannelId);
|
var channel = _liveTvManager.GetInternalChannel(liveTvItem.ChannelId);
|
||||||
|
|
||||||
|
if (channel != null)
|
||||||
|
{
|
||||||
var response = await service.GetProgramImageAsync(GetItemExternalId(liveTvItem), GetItemExternalId(channel), cancellationToken).ConfigureAwait(false);
|
var response = await service.GetProgramImageAsync(GetItemExternalId(liveTvItem), GetItemExternalId(channel), cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
if (response != null)
|
if (response != null)
|
||||||
@ -59,6 +61,7 @@ namespace Emby.Server.Implementations.LiveTv
|
|||||||
imageResponse.Format = response.Format;
|
imageResponse.Format = response.Format;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (NotImplementedException)
|
catch (NotImplementedException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Emby.XmlTv" version="1.0.5" targetFramework="portable45-net45+win8" />
|
<package id="Emby.XmlTv" version="1.0.6" targetFramework="portable45-net45+win8" />
|
||||||
<package id="MediaBrowser.Naming" version="1.0.4" 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" />
|
||||||
|
@ -1486,33 +1486,33 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
//inputModifier += " -noaccurate_seek";
|
//inputModifier += " -noaccurate_seek";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(state.InputContainer))
|
//if (!string.IsNullOrWhiteSpace(state.InputContainer))
|
||||||
{
|
//{
|
||||||
var inputFormat = GetInputFormat(state.InputContainer);
|
// var inputFormat = GetInputFormat(state.InputContainer);
|
||||||
if (!string.IsNullOrWhiteSpace(inputFormat))
|
// if (!string.IsNullOrWhiteSpace(inputFormat))
|
||||||
{
|
// {
|
||||||
inputModifier += " -f " + inputFormat;
|
// inputModifier += " -f " + inputFormat;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (state.RunTimeTicks.HasValue)
|
//if (state.RunTimeTicks.HasValue)
|
||||||
{
|
//{
|
||||||
foreach (var stream in state.MediaSource.MediaStreams)
|
// foreach (var stream in state.MediaSource.MediaStreams)
|
||||||
{
|
// {
|
||||||
if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
|
// if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
|
||||||
{
|
// {
|
||||||
if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
// if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
||||||
{
|
// {
|
||||||
var decoder = GetDecoderFromCodec(stream.Codec);
|
// var decoder = GetDecoderFromCodec(stream.Codec);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(decoder))
|
// if (!string.IsNullOrWhiteSpace(decoder))
|
||||||
{
|
// {
|
||||||
inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder;
|
// inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
return inputModifier;
|
return inputModifier;
|
||||||
|
@ -385,10 +385,11 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
{
|
{
|
||||||
T item = itemResult.Item;
|
T item = itemResult.Item;
|
||||||
|
|
||||||
|
var isConfiguredForEnglish = IsConfiguredForEnglish(item);
|
||||||
|
|
||||||
// Grab series genres because imdb data is better than tvdb. Leave movies alone
|
// Grab series genres because imdb data is better than tvdb. Leave movies alone
|
||||||
// But only do it if english is the preferred language because this data will not be localized
|
// But only do it if english is the preferred language because this data will not be localized
|
||||||
if (ShouldFetchGenres(item) &&
|
if (isConfiguredForEnglish && !string.IsNullOrWhiteSpace(result.Genre))
|
||||||
!string.IsNullOrWhiteSpace(result.Genre))
|
|
||||||
{
|
{
|
||||||
item.Genres.Clear();
|
item.Genres.Clear();
|
||||||
|
|
||||||
@ -418,8 +419,11 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
hasAwards.AwardSummary = WebUtility.HtmlDecode(result.Awards);
|
hasAwards.AwardSummary = WebUtility.HtmlDecode(result.Awards);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imdb plots are usually pretty short
|
if (isConfiguredForEnglish)
|
||||||
|
{
|
||||||
|
// Omdb is currently english only, so for other languages skip this and let secondary providers fill it in
|
||||||
item.Overview = result.Plot;
|
item.Overview = result.Plot;
|
||||||
|
}
|
||||||
|
|
||||||
//if (!string.IsNullOrWhiteSpace(result.Director))
|
//if (!string.IsNullOrWhiteSpace(result.Director))
|
||||||
//{
|
//{
|
||||||
@ -462,7 +466,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ShouldFetchGenres(BaseItem item)
|
private bool IsConfiguredForEnglish(BaseItem item)
|
||||||
{
|
{
|
||||||
var lang = item.GetPreferredMetadataLanguage();
|
var lang = item.GetPreferredMetadataLanguage();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user