aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-07-18 13:35:41 -0400
committerGitHub <noreply@github.com>2017-07-18 13:35:41 -0400
commitf1267ccb6a6388c0a4e4190465c3411f82ae3a43 (patch)
treeadd896c5c13979e07b7e4022ff84a669cea2c81a /Emby.Server.Implementations
parente6da6fcf68427f0ddfee7f2e60e342adc90de7a5 (diff)
parentdab74b9cd182e649ef4c981204ba66309f2458d0 (diff)
Merge pull request #2760 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpResultFactory.cs9
-rw-r--r--Emby.Server.Implementations/Localization/Ratings/nz.txt6
2 files changed, 12 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
index 6c37d5f7a..396bd8e88 100644
--- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -438,6 +438,15 @@ namespace Emby.Server.Implementations.HttpServer
options.CacheKey = cacheKey.GetMD5();
options.ContentFactory = () => Task.FromResult(GetFileStream(path, fileShare));
+ options.ResponseHeaders = options.ResponseHeaders ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+
+ // Quotes are valid in linux. They'll possibly cause issues here
+ var filename = (Path.GetFileName(path) ?? string.Empty).Replace("\"", string.Empty);
+ if (!string.IsNullOrWhiteSpace(filename))
+ {
+ options.ResponseHeaders["Content-Disposition"] = "inline; filename=\"" + filename + "\"";
+ }
+
return GetStaticResult(requestContext, options);
}
diff --git a/Emby.Server.Implementations/Localization/Ratings/nz.txt b/Emby.Server.Implementations/Localization/Ratings/nz.txt
index cb2b878ff..46e4067ba 100644
--- a/Emby.Server.Implementations/Localization/Ratings/nz.txt
+++ b/Emby.Server.Implementations/Localization/Ratings/nz.txt
@@ -1,11 +1,11 @@
NZ-G,1
NZ-PG,5
+NZ-M,6
NZ-R13,7
+NZ-RP13,7
NZ-R15,8
+NZ-RP16,9
NZ-R16,9
NZ-R18,10
-NZ-RP13,7
-NZ-RP16,9
NZ-R,10
-NZ-M,10
NZ-MA,10 \ No newline at end of file