Merge pull request #7172 from SenorSmartyPants/SeasonName
This commit is contained in:
commit
ee32e46dde
|
@ -22,6 +22,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
|||
/// </summary>
|
||||
public bool ExcludeTagsMovies { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether season name should be imported from TMDb.
|
||||
/// </summary>
|
||||
public bool ImportSeasonName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the maximum number of cast members to fetch for an item.
|
||||
/// </summary>
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
<input is="emby-checkbox" type="checkbox" id="excludeTagsMovies" />
|
||||
<span>Exclude tags/keywords from metadata fetched for movies.</span>
|
||||
</label>
|
||||
<label class="checkboxContainer">
|
||||
<input is="emby-checkbox" type="checkbox" id="importSeasonName" />
|
||||
<span>Import season name from metadata fetched for series.</span>
|
||||
</label>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" id="maxCastMembers" pattern="[0-9]*" required min="0" max="1000" label="Max Cast Members" />
|
||||
<div class="fieldDescription">The maximum number of cast members to fetch for an item.</div>
|
||||
|
@ -98,6 +102,7 @@
|
|||
document.querySelector('#includeAdult').checked = config.IncludeAdult;
|
||||
document.querySelector('#excludeTagsSeries').checked = config.ExcludeTagsSeries;
|
||||
document.querySelector('#excludeTagsMovies').checked = config.ExcludeTagsMovies;
|
||||
document.querySelector('#importSeasonName').checked = config.ImportSeasonName;
|
||||
|
||||
var maxCastMembers = document.querySelector('#maxCastMembers');
|
||||
maxCastMembers.value = config.MaxCastMembers;
|
||||
|
@ -120,6 +125,7 @@
|
|||
config.IncludeAdult = document.querySelector('#includeAdult').checked;
|
||||
config.ExcludeTagsSeries = document.querySelector('#excludeTagsSeries').checked;
|
||||
config.ExcludeTagsMovies = document.querySelector('#excludeTagsMovies').checked;
|
||||
config.ImportSeasonName = document.querySelector('#importSeasonName').checked;
|
||||
config.MaxCastMembers = document.querySelector('#maxCastMembers').value;
|
||||
config.PosterSize = document.querySelector('#selectPosterSize').value;
|
||||
config.BackdropSize = document.querySelector('#selectBackdropSize').value;
|
||||
|
|
|
@ -59,6 +59,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
Overview = seasonResult.Overview
|
||||
};
|
||||
|
||||
if (Plugin.Instance.Configuration.ImportSeasonName)
|
||||
{
|
||||
result.Item.Name = seasonResult.Name;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(seasonResult.ExternalIds?.TvdbId))
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProvider.Tvdb, seasonResult.ExternalIds.TvdbId);
|
||||
|
|
Loading…
Reference in New Issue
Block a user