diff --git a/Dockerfile b/Dockerfile
index 864cfa445..057d4b041 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,7 +21,7 @@ RUN apt-get update \
COPY --from=ffmpeg / /
COPY --from=builder /jellyfin /jellyfin
-ARG JELLYFIN_WEB_VERSION=10.3.6
+ARG JELLYFIN_WEB_VERSION=10.3.7
RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& rm -rf /jellyfin/jellyfin-web \
&& mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
diff --git a/Dockerfile.arm b/Dockerfile.arm
index 816739063..dad4da1f1 100644
--- a/Dockerfile.arm
+++ b/Dockerfile.arm
@@ -26,7 +26,7 @@ RUN apt-get update \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
-ARG JELLYFIN_WEB_VERSION=10.3.6
+ARG JELLYFIN_WEB_VERSION=10.3.7
RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& rm -rf /jellyfin/jellyfin-web \
&& mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
diff --git a/Dockerfile.arm64 b/Dockerfile.arm64
index 1843f7224..5d4e86bff 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.arm64
@@ -26,7 +26,7 @@ RUN apt-get update \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
-ARG JELLYFIN_WEB_VERSION=10.3.6
+ARG JELLYFIN_WEB_VERSION=10.3.7
RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& rm -rf /jellyfin/jellyfin-web \
&& mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.cs
index 780b0a889..22aaa6885 100644
--- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs
+++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs
@@ -155,7 +155,6 @@ namespace Emby.Dlna.PlayTo
}
options.RequestContentType = "text/xml";
- options.AppendCharsetToMimeType = true;
options.RequestContent = postData;
return _httpClient.Post(options);
diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs
index c9dc6c815..3e23150d8 100644
--- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs
+++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs
@@ -179,10 +179,7 @@ namespace Emby.Server.Implementations.HttpClientManager
/// The HTTP method.
/// Task{HttpResponseInfo}.
public Task SendAsync(HttpRequestOptions options, string httpMethod)
- {
- var httpMethod2 = GetHttpMethod(httpMethod);
- return SendAsync(options, httpMethod2);
- }
+ => SendAsync(options, new HttpMethod(httpMethod));
///
/// send as an asynchronous operation.
@@ -218,40 +215,6 @@ namespace Emby.Server.Implementations.HttpClientManager
return response;
}
- private HttpMethod GetHttpMethod(string httpMethod)
- {
- if (httpMethod.Equals("DELETE", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Delete;
- }
- else if (httpMethod.Equals("GET", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Get;
- }
- else if (httpMethod.Equals("HEAD", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Head;
- }
- else if (httpMethod.Equals("OPTIONS", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Options;
- }
- else if (httpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Post;
- }
- else if (httpMethod.Equals("PUT", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Put;
- }
- else if (httpMethod.Equals("TRACE", StringComparison.OrdinalIgnoreCase))
- {
- return HttpMethod.Trace;
- }
-
- throw new ArgumentException("Invalid HTTP method", nameof(httpMethod));
- }
-
private HttpResponseInfo GetCachedResponse(string responseCachePath, TimeSpan cacheLength, string url)
{
if (File.Exists(responseCachePath)
@@ -303,23 +266,15 @@ namespace Emby.Server.Implementations.HttpClientManager
}
else if (options.RequestContent != null)
{
- httpWebRequest.Content = new StringContent(options.RequestContent);
+ httpWebRequest.Content = new StringContent(
+ options.RequestContent,
+ null,
+ options.RequestContentType);
}
else
{
httpWebRequest.Content = new ByteArrayContent(Array.Empty());
}
-
- // TODO: add correct content type
- /*
- var contentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
-
- if (options.AppendCharsetToMimeType)
- {
- contentType = contentType.TrimEnd(';') + "; charset=\"utf-8\"";
- }
-
- httpWebRequest.Headers.Add(HeaderNames.ContentType, contentType);*/
}
if (options.LogRequest)
@@ -331,24 +286,24 @@ namespace Emby.Server.Implementations.HttpClientManager
if (!options.BufferContent)
{
- var response = await client.SendAsync(httpWebRequest, options.CancellationToken).ConfigureAwait(false);
+ var response = await client.SendAsync(httpWebRequest, HttpCompletionOption.ResponseHeadersRead, options.CancellationToken).ConfigureAwait(false);
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
options.CancellationToken.ThrowIfCancellationRequested();
var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
- return new HttpResponseInfo(response.Headers)
+ return new HttpResponseInfo(response.Headers, response.Content.Headers)
{
Content = stream,
StatusCode = response.StatusCode,
ContentType = response.Content.Headers.ContentType?.MediaType,
- ContentLength = stream.Length,
+ ContentLength = response.Content.Headers.ContentLength,
ResponseUrl = response.Content.Headers.ContentLocation?.ToString()
};
}
- using (var response = await client.SendAsync(httpWebRequest, options.CancellationToken).ConfigureAwait(false))
+ using (var response = await client.SendAsync(httpWebRequest, HttpCompletionOption.ResponseHeadersRead, options.CancellationToken).ConfigureAwait(false))
{
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
@@ -360,7 +315,7 @@ namespace Emby.Server.Implementations.HttpClientManager
await stream.CopyToAsync(memoryStream, StreamDefaults.DefaultCopyToBufferSize, options.CancellationToken).ConfigureAwait(false);
memoryStream.Position = 0;
- return new HttpResponseInfo(response.Headers)
+ return new HttpResponseInfo(response.Headers, response.Content.Headers)
{
Content = memoryStream,
StatusCode = response.StatusCode,
@@ -430,7 +385,7 @@ namespace Emby.Server.Implementations.HttpClientManager
options.Progress.Report(100);
- var responseInfo = new HttpResponseInfo(response.Headers)
+ var responseInfo = new HttpResponseInfo(response.Headers, response.Content.Headers)
{
TempFilePath = tempFile,
StatusCode = response.StatusCode,
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
index d39c91783..94225a0aa 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs
@@ -2,14 +2,15 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.IO.Compression;
using System.Linq;
+using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Emby.XmlTv.Classes;
using Emby.XmlTv.Entities;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
-using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.Dto;
@@ -27,7 +28,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings
private readonly IFileSystem _fileSystem;
private readonly IZipClient _zipClient;
- public XmlTvListingsProvider(IServerConfigurationManager config, IHttpClient httpClient, ILogger logger, IFileSystem fileSystem, IZipClient zipClient)
+ public XmlTvListingsProvider(
+ IServerConfigurationManager config,
+ IHttpClient httpClient,
+ ILogger logger,
+ IFileSystem fileSystem,
+ IZipClient zipClient)
{
_config = config;
_httpClient = httpClient;
@@ -52,7 +58,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
private async Task GetXml(string path, CancellationToken cancellationToken)
{
- _logger.LogInformation("xmltv path: {path}", path);
+ _logger.LogInformation("xmltv path: {Path}", path);
if (!path.StartsWith("http", StringComparison.OrdinalIgnoreCase))
{
@@ -66,24 +72,33 @@ namespace Emby.Server.Implementations.LiveTv.Listings
return UnzipIfNeeded(path, cacheFile);
}
- _logger.LogInformation("Downloading xmltv listings from {path}", path);
-
- string tempFile = await _httpClient.GetTempFile(new HttpRequestOptions
- {
- CancellationToken = cancellationToken,
- Url = path,
- Progress = new SimpleProgress(),
- // It's going to come back gzipped regardless of this value
- // So we need to make sure the decompression method is set to gzip
- DecompressionMethod = CompressionMethod.Gzip,
-
- UserAgent = "Emby/3.0"
-
- }).ConfigureAwait(false);
+ _logger.LogInformation("Downloading xmltv listings from {Path}", path);
Directory.CreateDirectory(Path.GetDirectoryName(cacheFile));
- File.Copy(tempFile, cacheFile, true);
+ using (var res = await _httpClient.SendAsync(
+ new HttpRequestOptions
+ {
+ CancellationToken = cancellationToken,
+ Url = path,
+ DecompressionMethod = CompressionMethod.Gzip,
+ },
+ HttpMethod.Get).ConfigureAwait(false))
+ using (var stream = res.Content)
+ using (var fileStream = new FileStream(cacheFile, FileMode.CreateNew))
+ {
+ if (res.ContentHeaders.ContentEncoding.Contains("gzip"))
+ {
+ using (var gzStream = new GZipStream(stream, CompressionMode.Decompress))
+ {
+ await gzStream.CopyToAsync(fileStream).ConfigureAwait(false);
+ }
+ }
+ else
+ {
+ await stream.CopyToAsync(fileStream).ConfigureAwait(false);
+ }
+ }
return UnzipIfNeeded(path, cacheFile);
}
@@ -101,7 +116,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
catch (Exception ex)
{
- _logger.LogError(ex, "Error extracting from gz file {file}", file);
+ _logger.LogError(ex, "Error extracting from gz file {File}", file);
}
try
@@ -111,7 +126,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
catch (Exception ex)
{
- _logger.LogError(ex, "Error extracting from zip file {file}", file);
+ _logger.LogError(ex, "Error extracting from zip file {File}", file);
}
}
@@ -159,20 +174,10 @@ namespace Emby.Server.Implementations.LiveTv.Listings
throw new ArgumentNullException(nameof(channelId));
}
- /*
- if (!await EmbyTV.EmbyTVRegistration.Instance.EnableXmlTv().ConfigureAwait(false))
- {
- var length = endDateUtc - startDateUtc;
- if (length.TotalDays > 1)
- {
- endDateUtc = startDateUtc.AddDays(1);
- }
- }*/
-
- _logger.LogDebug("Getting xmltv programs for channel {id}", channelId);
+ _logger.LogDebug("Getting xmltv programs for channel {Id}", channelId);
string path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false);
- _logger.LogDebug("Opening XmlTvReader for {path}", path);
+ _logger.LogDebug("Opening XmlTvReader for {Path}", path);
var reader = new XmlTvReader(path, GetLanguage(info));
return reader.GetProgrammes(channelId, startDateUtc, endDateUtc, cancellationToken)
@@ -265,7 +270,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{
// In theory this should never be called because there is always only one lineup
string path = await GetXml(info.Path, CancellationToken.None).ConfigureAwait(false);
- _logger.LogDebug("Opening XmlTvReader for {path}", path);
+ _logger.LogDebug("Opening XmlTvReader for {Path}", path);
var reader = new XmlTvReader(path, GetLanguage(info));
IEnumerable results = reader.GetChannels();
@@ -277,7 +282,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{
// In theory this should never be called because there is always only one lineup
string path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false);
- _logger.LogDebug("Opening XmlTvReader for {path}", path);
+ _logger.LogDebug("Opening XmlTvReader for {Path}", path);
var reader = new XmlTvReader(path, GetLanguage(info));
var results = reader.GetChannels();
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs
index 0576a1a5d..76bd35e57 100644
--- a/MediaBrowser.Common/Net/HttpRequestOptions.cs
+++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs
@@ -91,8 +91,6 @@ namespace MediaBrowser.Common.Net
public bool EnableDefaultUserAgent { get; set; }
- public bool AppendCharsetToMimeType { get; set; }
-
private string GetHeaderValue(string name)
{
RequestHeaders.TryGetValue(name, out var value);
diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs
index cd9feabfe..d65ce897a 100644
--- a/MediaBrowser.Common/Net/HttpResponseInfo.cs
+++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs
@@ -52,14 +52,21 @@ namespace MediaBrowser.Common.Net
/// The headers.
public HttpResponseHeaders Headers { get; set; }
+ ///
+ /// Gets or sets the content headers.
+ ///
+ /// The content headers.
+ public HttpContentHeaders ContentHeaders { get; set; }
+
public HttpResponseInfo()
{
}
- public HttpResponseInfo(HttpResponseHeaders headers)
+ public HttpResponseInfo(HttpResponseHeaders headers, HttpContentHeaders contentHeader)
{
Headers = headers;
+ ContentHeaders = contentHeader;
}
public void Dispose()
diff --git a/MediaBrowser.WebDashboard/jellyfin-web b/MediaBrowser.WebDashboard/jellyfin-web
index c9e70d956..1d0fd79eb 160000
--- a/MediaBrowser.WebDashboard/jellyfin-web
+++ b/MediaBrowser.WebDashboard/jellyfin-web
@@ -1 +1 @@
-Subproject commit c9e70d95643e84437189dd500b0380ec0fbbf659
+Subproject commit 1d0fd79eb1e4d0bf6a9f62f769a951970383bcf0
diff --git a/Mono.Nat/Upnp/Messages/UpnpMessage.cs b/Mono.Nat/Upnp/Messages/UpnpMessage.cs
index 1151dd997..ade9df50b 100644
--- a/Mono.Nat/Upnp/Messages/UpnpMessage.cs
+++ b/Mono.Nat/Upnp/Messages/UpnpMessage.cs
@@ -57,10 +57,9 @@ namespace Mono.Nat.Upnp
req.Url = ss;
req.EnableKeepAlive = false;
req.RequestContentType = "text/xml";
- req.AppendCharsetToMimeType = true;
req.RequestHeaders.Add("SOAPACTION", "\"" + device.ServiceType + "#" + upnpMethod + "\"");
- string bodyString = ""
+ ""
@@ -70,8 +69,6 @@ namespace Mono.Nat.Upnp
+ ""
+ ""
+ "\r\n\r\n";
-
- req.RequestContentBytes = System.Text.Encoding.UTF8.GetBytes(bodyString);
return req;
}
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 1e74d8f7d..500e6fe55 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("10.3.6")]
-[assembly: AssemblyFileVersion("10.3.6")]
+[assembly: AssemblyVersion("10.3.7")]
+[assembly: AssemblyFileVersion("10.3.7")]
diff --git a/build.yaml b/build.yaml
index 7a5e66b11..2d4bc29f4 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1,7 +1,7 @@
---
# We just wrap `build` so this is really it
name: "jellyfin"
-version: "10.3.6"
+version: "10.3.7"
packages:
- debian-package-x64
- debian-package-armhf
diff --git a/deployment/debian-package-x64/pkg-src/changelog b/deployment/debian-package-x64/pkg-src/changelog
index 64912a11d..aa15827a7 100644
--- a/deployment/debian-package-x64/pkg-src/changelog
+++ b/deployment/debian-package-x64/pkg-src/changelog
@@ -1,3 +1,9 @@
+jellyfin (10.3.7-1) unstable; urgency=medium
+
+ * New upstream version 10.3.7; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.7
+
+ -- Jellyfin Packaging Team Wed, 24 Jul 2019 10:48:28 -0400
+
jellyfin (10.3.6-1) unstable; urgency=medium
* New upstream version 10.3.6; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.6
diff --git a/deployment/fedora-package-x64/pkg-src/jellyfin.spec b/deployment/fedora-package-x64/pkg-src/jellyfin.spec
index 809bde39d..91b74ffe1 100644
--- a/deployment/fedora-package-x64/pkg-src/jellyfin.spec
+++ b/deployment/fedora-package-x64/pkg-src/jellyfin.spec
@@ -7,7 +7,7 @@
%endif
Name: jellyfin
-Version: 10.3.6
+Version: 10.3.7
Release: 1%{?dist}
Summary: The Free Software Media Browser
License: GPLv2
@@ -140,6 +140,8 @@ fi
%systemd_postun_with_restart jellyfin.service
%changelog
+* Wed Jul 24 2019 Jellyfin Packaging Team
+- New upstream version 10.3.7; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.7
* Sat Jul 06 2019 Jellyfin Packaging Team
- New upstream version 10.3.6; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.6
* Sun Jun 09 2019 Jellyfin Packaging Team