move metadata language to per library

This commit is contained in:
Luke Pulverenti 2017-01-21 18:37:38 -05:00
parent 2ef30a3ba8
commit ceab0be20b
3 changed files with 25 additions and 13 deletions

View File

@ -1337,6 +1337,11 @@ namespace MediaBrowser.Controller.Entities
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
} }
if (string.IsNullOrWhiteSpace(lang))
{
lang = LibraryManager.GetLibraryOptions(this).PreferredMetadataLanguage;
}
if (string.IsNullOrWhiteSpace(lang)) if (string.IsNullOrWhiteSpace(lang))
{ {
lang = ConfigurationManager.Configuration.PreferredMetadataLanguage; lang = ConfigurationManager.Configuration.PreferredMetadataLanguage;
@ -1367,6 +1372,11 @@ namespace MediaBrowser.Controller.Entities
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
} }
if (string.IsNullOrWhiteSpace(lang))
{
lang = LibraryManager.GetLibraryOptions(this).MetadataCountryCode;
}
if (string.IsNullOrWhiteSpace(lang)) if (string.IsNullOrWhiteSpace(lang))
{ {
lang = ConfigurationManager.Configuration.MetadataCountryCode; lang = ConfigurationManager.Configuration.MetadataCountryCode;

View File

@ -15,6 +15,18 @@
public bool ImportMissingEpisodes { get; set; } public bool ImportMissingEpisodes { get; set; }
public bool EnableAutomaticSeriesGrouping { 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() public LibraryOptions()
{ {
EnablePhotos = true; EnablePhotos = true;

View File

@ -972,9 +972,6 @@
<Content Include="dashboard-ui\wizardlivetvtuner.html"> <Content Include="dashboard-ui\wizardlivetvtuner.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\wizardsettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\index.html"> <Content Include="dashboard-ui\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@ -1074,11 +1071,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="dashboard-ui\metadata.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="dashboard-ui\scripts\tvgenres.js"> <Content Include="dashboard-ui\scripts\tvgenres.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@ -1175,11 +1167,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="dashboard-ui\scripts\metadataconfigurationpage.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="dashboard-ui\scripts\loginpage.js"> <Content Include="dashboard-ui\scripts\loginpage.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@ -1231,6 +1218,9 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="dashboard-ui\wizardsettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\wizardstart.html"> <Content Include="dashboard-ui\wizardstart.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>