aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-21 18:37:38 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-21 18:37:38 -0500
commitceab0be20bf2d7f568eb7c2cc669b3dce7dbb4fd (patch)
treee50746af2870e801d01870b053ba79e50f0e8576
parent2ef30a3ba85190adb38ad7b2f360c2018cd0a5ff (diff)
move metadata language to per library
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs10
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs12
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj16
3 files changed, 25 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 23dfb802c..4cfea4c70 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1339,6 +1339,11 @@ namespace MediaBrowser.Controller.Entities
if (string.IsNullOrWhiteSpace(lang))
{
+ lang = LibraryManager.GetLibraryOptions(this).PreferredMetadataLanguage;
+ }
+
+ if (string.IsNullOrWhiteSpace(lang))
+ {
lang = ConfigurationManager.Configuration.PreferredMetadataLanguage;
}
@@ -1369,6 +1374,11 @@ namespace MediaBrowser.Controller.Entities
if (string.IsNullOrWhiteSpace(lang))
{
+ lang = LibraryManager.GetLibraryOptions(this).MetadataCountryCode;
+ }
+
+ if (string.IsNullOrWhiteSpace(lang))
+ {
lang = ConfigurationManager.Configuration.MetadataCountryCode;
}
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index 8e344f76e..24bc5dd11 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -15,6 +15,18 @@
public bool ImportMissingEpisodes { get; set; }
public bool EnableAutomaticSeriesGrouping { get; set; }
+ /// <summary>
+ /// Gets or sets the preferred metadata language.
+ /// </summary>
+ /// <value>The preferred metadata language.</value>
+ public string PreferredMetadataLanguage { get; set; }
+
+ /// <summary>
+ /// Gets or sets the metadata country code.
+ /// </summary>
+ /// <value>The metadata country code.</value>
+ public string MetadataCountryCode { get; set; }
+
public LibraryOptions()
{
EnablePhotos = true;
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index b238e1d8a..e38d30dd9 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -972,9 +972,6 @@
<Content Include="dashboard-ui\wizardlivetvtuner.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\wizardsettings.html">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -1075,11 +1072,6 @@
</Content>
</ItemGroup>
<ItemGroup>
- <Content Include="dashboard-ui\metadata.html">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup>
<Content Include="dashboard-ui\scripts\tvgenres.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -1176,11 +1168,6 @@
</Content>
</ItemGroup>
<ItemGroup>
- <Content Include="dashboard-ui\scripts\metadataconfigurationpage.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup>
<Content Include="dashboard-ui\scripts\loginpage.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -1231,6 +1218,9 @@
</Content>
</ItemGroup>
<ItemGroup>
+ <Content Include="dashboard-ui\wizardsettings.html">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\wizardstart.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>