Skip to content

Commit

Permalink
do not use series overview when the episode overview is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
huihuimoe authored and kookxiang committed Oct 2, 2024
1 parent d8b09f6 commit 5399da1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Emby.Plugin.Bangumi/ExternalIdProvider/EpisodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@ public async Task<MetadataResult<Episode>> GetMetadata(EpisodeInfo info, Cancell
if (series == null)
return result;

// use title and overview from special episode subject if episode data is empty
// use title from special episode subject if episode data is empty
if (string.IsNullOrEmpty(result.Item.Name))
result.Item.Name = series.Name;
if (string.IsNullOrEmpty(result.Item.OriginalTitle))
result.Item.OriginalTitle = series.OriginalName;
if (string.IsNullOrEmpty(result.Item.Overview))
result.Item.Overview = series.Summary;

return result;
}
Expand Down
4 changes: 1 addition & 3 deletions Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,11 @@ public async Task<MetadataResult<Episode>> GetMetadata(EpisodeInfo info, Cancell
if (series == null)
return result;

// use title and overview from special episode subject if episode data is empty
// use title from special episode subject if episode data is empty
if (string.IsNullOrEmpty(result.Item.Name))
result.Item.Name = series.Name;
if (string.IsNullOrEmpty(result.Item.OriginalTitle))
result.Item.OriginalTitle = series.OriginalName;
if (string.IsNullOrEmpty(result.Item.Overview))
result.Item.Overview = series.Summary;

var seasonNumber = parent is Season ? parent.IndexNumber : 1;
if (!string.IsNullOrEmpty(episode.AirDate) && string.Compare(episode.AirDate, series.AirDate, StringComparison.Ordinal) < 0)
Expand Down

0 comments on commit 5399da1

Please sign in to comment.