From 3c1447804b5de9a7d840c7158c3cb4e0a27f76e1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 4 Nov 2016 22:17:18 -0400 Subject: [PATCH] move localization classes --- Emby.Dlna/Didl/DidlBuilder.cs | 8 +- .../Emby.Server.Implementations.csproj | 246 +++++++++++++++++- .../HttpServer/GetSwaggerResource.cs | 4 +- .../HttpServer/SocketSharp/HttpUtility.cs | 24 +- .../HttpServer/SwaggerService.cs | 9 +- .../Localization/Core/ar.json | 0 .../Localization/Core/bg-BG.json | 0 .../Localization/Core/ca.json | 0 .../Localization/Core/core.json | 0 .../Localization/Core/cs.json | 0 .../Localization/Core/da.json | 0 .../Localization/Core/de.json | 0 .../Localization/Core/el.json | 0 .../Localization/Core/en-GB.json | 0 .../Localization/Core/en-US.json | 0 .../Localization/Core/es-AR.json | 0 .../Localization/Core/es-MX.json | 0 .../Localization/Core/es.json | 0 .../Localization/Core/fi.json | 0 .../Localization/Core/fr-CA.json | 0 .../Localization/Core/fr.json | 0 .../Localization/Core/gsw.json | 0 .../Localization/Core/he.json | 0 .../Localization/Core/hr.json | 0 .../Localization/Core/hu.json | 0 .../Localization/Core/id.json | 0 .../Localization/Core/it.json | 0 .../Localization/Core/kk.json | 0 .../Localization/Core/ko.json | 0 .../Localization/Core/ms.json | 0 .../Localization/Core/nb.json | 0 .../Localization/Core/nl.json | 0 .../Localization/Core/pl.json | 0 .../Localization/Core/pt-BR.json | 0 .../Localization/Core/pt-PT.json | 0 .../Localization/Core/ro.json | 0 .../Localization/Core/ru.json | 0 .../Localization/Core/sl-SI.json | 0 .../Localization/Core/sv.json | 0 .../Localization/Core/tr.json | 0 .../Localization/Core/uk.json | 0 .../Localization/Core/vi.json | 0 .../Localization/Core/zh-CN.json | 0 .../Localization/Core/zh-HK.json | 0 .../Localization/Core/zh-TW.json | 0 .../Localization/LocalizationManager.cs | 63 +++-- .../Localization/Ratings/au.txt | 0 .../Localization/Ratings/be.txt | 0 .../Localization/Ratings/br.txt | 0 .../Localization/Ratings/ca.txt | 0 .../Localization/Ratings/co.txt | 0 .../Localization/Ratings/de.txt | 0 .../Localization/Ratings/dk.txt | 0 .../Localization/Ratings/fr.txt | 0 .../Localization/Ratings/gb.txt | 0 .../Localization/Ratings/ie.txt | 0 .../Localization/Ratings/jp.txt | 0 .../Localization/Ratings/kz.txt | 0 .../Localization/Ratings/mx.txt | 0 .../Localization/Ratings/nl.txt | 0 .../Localization/Ratings/nz.txt | 0 .../Localization/Ratings/ru.txt | 0 .../Localization/Ratings/us.txt | 0 .../Localization/countries.json | 0 .../Localization/iso6392.txt | 0 .../HttpServer/HttpListenerHost.cs | 1 + .../SocketSharp/WebSocketSharpRequest.cs | 1 + ...MediaBrowser.Server.Implementations.csproj | 209 --------------- .../ApplicationHost.cs | 9 +- .../MediaBrowser.Server.Startup.Common.csproj | 1 + .../TextLocalizer.cs | 25 ++ 71 files changed, 329 insertions(+), 271 deletions(-) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/HttpServer/GetSwaggerResource.cs (79%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/HttpServer/SocketSharp/HttpUtility.cs (98%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/HttpServer/SwaggerService.cs (78%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ar.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/bg-BG.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ca.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/core.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/cs.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/da.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/de.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/el.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/en-GB.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/en-US.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/es-AR.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/es-MX.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/es.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/fi.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/fr-CA.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/fr.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/gsw.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/he.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/hr.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/hu.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/id.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/it.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/kk.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ko.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ms.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/nb.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/nl.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/pl.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/pt-BR.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/pt-PT.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ro.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/ru.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/sl-SI.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/sv.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/tr.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/uk.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/vi.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/zh-CN.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/zh-HK.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Core/zh-TW.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/LocalizationManager.cs (89%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/au.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/be.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/br.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/ca.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/co.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/de.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/dk.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/fr.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/gb.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/ie.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/jp.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/kz.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/mx.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/nl.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/nz.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/ru.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/Ratings/us.txt (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/countries.json (100%) rename {MediaBrowser.Server.Implementations => Emby.Server.Implementations}/Localization/iso6392.txt (100%) create mode 100644 MediaBrowser.Server.Startup.Common/TextLocalizer.cs diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 50668f5557..ee5c8fecd4 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -104,6 +104,8 @@ namespace Emby.Dlna.Didl writer.WriteStartElement(string.Empty, "item", NS_DIDL); + AddGeneralProperties(item, null, context, writer, filter); + writer.WriteAttributeString("restricted", "1"); writer.WriteAttributeString("id", clientId); @@ -122,8 +124,6 @@ namespace Emby.Dlna.Didl //AddBookmarkInfo(item, user, element); - AddGeneralProperties(item, null, context, writer, filter); - // refID? // storeAttribute(itemNode, object, ClassProperties.REF_ID, false); @@ -501,6 +501,8 @@ namespace Emby.Dlna.Didl { writer.WriteStartElement(string.Empty, "container", NS_DIDL); + AddGeneralProperties(folder, stubType, context, writer, filter); + writer.WriteAttributeString("restricted", "0"); writer.WriteAttributeString("searchable", "1"); writer.WriteAttributeString("childCount", childCount.ToString(_usCulture)); @@ -534,8 +536,6 @@ namespace Emby.Dlna.Didl } } - AddCommonFields(folder, stubType, null, writer, filter); - AddCover(folder, context, stubType, writer); writer.WriteEndElement(); diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 8d13d206ac..33f29d64da 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -67,11 +67,14 @@ + + + @@ -144,6 +147,7 @@ + @@ -230,7 +234,9 @@ - + + + {9142eefa-7570-41e1-bfcc-468bb571af2f} @@ -266,8 +272,246 @@ + + swagger-ui\fonts\droid-sans-v6-latin-700.svg + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-regular.svg + PreserveNewest + + + swagger-ui\images\explorer_icons.png + PreserveNewest + + + swagger-ui\images\logo_small.png + PreserveNewest + + + swagger-ui\images\pet_store_api.png + PreserveNewest + + + swagger-ui\images\throbber.gif + PreserveNewest + + + swagger-ui\images\wordnik_api.png + PreserveNewest + + + swagger-ui\index.html + PreserveNewest + + + swagger-ui\lib\backbone-min.js + PreserveNewest + + + swagger-ui\lib\handlebars-2.0.0.js + PreserveNewest + + + swagger-ui\lib\highlight.7.3.pack.js + PreserveNewest + + + swagger-ui\lib\jquery-1.8.0.min.js + PreserveNewest + + + swagger-ui\lib\jquery.ba-bbq.min.js + PreserveNewest + + + swagger-ui\lib\jquery.slideto.min.js + PreserveNewest + + + swagger-ui\lib\jquery.wiggle.min.js + PreserveNewest + + + swagger-ui\lib\marked.js + PreserveNewest + + + swagger-ui\lib\shred.bundle.js + PreserveNewest + + + swagger-ui\lib\shred\content.js + PreserveNewest + + + swagger-ui\lib\swagger-client.js + PreserveNewest + + + swagger-ui\lib\swagger-oauth.js + PreserveNewest + + + swagger-ui\lib\underscore-min.js + PreserveNewest + + + swagger-ui\o2c.html + PreserveNewest + + + swagger-ui\patch.js + PreserveNewest + + + swagger-ui\swagger-ui.js + PreserveNewest + + + swagger-ui\swagger-ui.min.js + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + swagger-ui\fonts\droid-sans-v6-latin-700.eot + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-700.ttf + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-700.woff + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-700.woff2 + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-regular.eot + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-regular.ttf + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-regular.woff + PreserveNewest + + + swagger-ui\fonts\droid-sans-v6-latin-regular.woff2 + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + swagger-ui\css\reset.css + PreserveNewest + + + swagger-ui\css\screen.css + PreserveNewest + + + swagger-ui\css\typography.css + PreserveNewest + +