mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
handle overview stripping
This commit is contained in:
parent
6da117f606
commit
4c87979cac
@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
@ -70,7 +71,7 @@ namespace MediaBrowser.Providers.Music
|
||||
private void ProcessResult(MusicArtist item, Artist result)
|
||||
{
|
||||
item.HomePageUrl = result.strWebsite;
|
||||
item.Overview = result.strBiographyEN;
|
||||
item.Overview = (result.strBiographyEN ?? string.Empty).StripHtml();
|
||||
|
||||
if (!string.IsNullOrEmpty(result.strGenre))
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
@ -103,7 +104,7 @@ namespace MediaBrowser.Providers.Music
|
||||
Int32.TryParse(data.bio.yearformed, out yearFormed);
|
||||
if (!artist.LockedFields.Contains(MetadataFields.Overview))
|
||||
{
|
||||
artist.Overview = data.bio.content;
|
||||
artist.Overview = (data.bio.content ?? string.Empty).StripHtml();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.bio.placeformed) && !artist.LockedFields.Contains(MetadataFields.ProductionLocations))
|
||||
{
|
||||
|
@ -773,9 +773,17 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
|
||||
if (fields.Contains(ItemFields.Overview))
|
||||
{
|
||||
var strippedOverview = string.IsNullOrEmpty(item.Overview) ? item.Overview : item.Overview.StripHtml();
|
||||
// TODO: Remove this after a while, since it's been moved to the providers
|
||||
if (item is MusicArtist)
|
||||
{
|
||||
var strippedOverview = string.IsNullOrEmpty(item.Overview) ? item.Overview : item.Overview.StripHtml();
|
||||
|
||||
dto.Overview = strippedOverview;
|
||||
dto.Overview = strippedOverview;
|
||||
}
|
||||
else
|
||||
{
|
||||
dto.Overview = item.Overview;
|
||||
}
|
||||
}
|
||||
|
||||
// If there are no backdrops, indicate what parent has them in case the Ui wants to allow inheritance
|
||||
|
Loading…
x
Reference in New Issue
Block a user