mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
fixes #309 - TVDB episode XML ingestion of Writer and Director elements not dropping leading spaces
This commit is contained in:
parent
ee60e85bfc
commit
c5dc02ec43
@ -313,6 +313,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
var actors = doc.SafeGetString("//GuestStars");
|
var actors = doc.SafeGetString("//GuestStars");
|
||||||
if (actors != null)
|
if (actors != null)
|
||||||
{
|
{
|
||||||
|
// Sometimes tvdb actors have leading spaces
|
||||||
foreach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
foreach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||||
.Select(str => new PersonInfo { Type = PersonType.GuestStar, Name = str.Trim() }))
|
.Select(str => new PersonInfo { Type = PersonType.GuestStar, Name = str.Trim() }))
|
||||||
@ -325,6 +326,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
var directors = doc.SafeGetString("//Director");
|
var directors = doc.SafeGetString("//Director");
|
||||||
if (directors != null)
|
if (directors != null)
|
||||||
{
|
{
|
||||||
|
// Sometimes tvdb actors have leading spaces
|
||||||
foreach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
foreach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||||
.Select(str => new PersonInfo { Type = PersonType.Director, Name = str.Trim() }))
|
.Select(str => new PersonInfo { Type = PersonType.Director, Name = str.Trim() }))
|
||||||
@ -337,6 +339,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
var writers = doc.SafeGetString("//Writer");
|
var writers = doc.SafeGetString("//Writer");
|
||||||
if (writers != null)
|
if (writers != null)
|
||||||
{
|
{
|
||||||
|
// Sometimes tvdb actors have leading spaces
|
||||||
foreach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
foreach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||||
.Select(str => new PersonInfo { Type = PersonType.Writer, Name = str.Trim() }))
|
.Select(str => new PersonInfo { Type = PersonType.Writer, Name = str.Trim() }))
|
||||||
|
@ -469,6 +469,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
string actorRole = p.SafeGetString("Role");
|
string actorRole = p.SafeGetString("Role");
|
||||||
if (!string.IsNullOrWhiteSpace(actorName))
|
if (!string.IsNullOrWhiteSpace(actorName))
|
||||||
{
|
{
|
||||||
|
// Sometimes tvdb actors have leading spaces
|
||||||
series.AddPerson(new PersonInfo { Type = PersonType.Actor, Name = actorName.Trim(), Role = actorRole });
|
series.AddPerson(new PersonInfo { Type = PersonType.Actor, Name = actorName.Trim(), Role = actorRole });
|
||||||
|
|
||||||
if (ConfigurationManager.Configuration.SaveLocalMeta && actorsNode != null)
|
if (ConfigurationManager.Configuration.SaveLocalMeta && actorsNode != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user