Skip to content

Commit

Permalink
fixed: TVDB data scraper crashes if actor name or role is Nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCooper committed Mar 8, 2016
1 parent 1e9c435 commit e8b9403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Addons/scraper.Data.TVDB/Scraper/clsScrapeTVDB.vb
Expand Up @@ -221,7 +221,7 @@ Namespace TVDBs
'Actors
If FilteredOptions.bMainActors Then
If TVShowInfo.Actors IsNot Nothing Then
For Each aCast As TVDB.Model.Actor In TVShowInfo.Actors.OrderBy(Function(f) f.SortOrder)
For Each aCast As TVDB.Model.Actor In TVShowInfo.Actors.Where(Function(f) f.Name IsNot Nothing AndAlso f.Role IsNot Nothing).OrderBy(Function(f) f.SortOrder)
nTVShow.Actors.Add(New MediaContainers.Person With {.Name = aCast.Name,
.Order = aCast.SortOrder,
.Role = aCast.Role,
Expand Down Expand Up @@ -441,7 +441,7 @@ Namespace TVDBs
'Actors
If FilteredOptions.bEpisodeActors Then
If TVShowInfo.Actors IsNot Nothing Then
For Each aCast As TVDB.Model.Actor In TVShowInfo.Actors.OrderBy(Function(f) f.SortOrder)
For Each aCast As TVDB.Model.Actor In TVShowInfo.Actors.Where(Function(f) f.Name IsNot Nothing AndAlso f.Role IsNot Nothing).OrderBy(Function(f) f.SortOrder)
nEpisode.Actors.Add(New MediaContainers.Person With {.Name = aCast.Name,
.Order = aCast.SortOrder,
.Role = aCast.Role,
Expand Down

0 comments on commit e8b9403

Please sign in to comment.