1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fix issue with IMDb lists (some not all) not parsing properly causing an issue when trying to add them

This commit is contained in:
nitsua 2020-10-14 14:02:34 -04:00 committed by Qstick
parent b7aa1df219
commit 27354507cb

View File

@ -32,9 +32,9 @@ public override IList<ImportListMovie> ParseResponse(ImportListResponse importLi
if (_settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase))
{
//Parse TSV response from IMDB export
var row = importResponse.Content.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
var rows = importResponse.Content.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
movies = row.Skip(1).SelectList(m => new ImportListMovie { ImdbId = m.Split(',')[1] });
movies = rows.Skip(1).SelectList(m => m.Split(',')).Where(m => m.Length > 1).SelectList(i => new ImportListMovie { ImdbId = i[1] });
return movies;
}