Merge pull request #7172 from SenorSmartyPants/SeasonName

This commit is contained in:
Cody Robibero 2022-01-14 13:15:53 -07:00 committed by GitHub
commit ee32e46dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -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>

View File

@ -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;

View File

@ -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);