DailySeries.CSV now has series name along with series Id.

pull/7/merge
Mark McDowall 13 years ago
parent 69ddeeb0e3
commit 86c5e73f81

@ -0,0 +1,2 @@
71256,The Daily Show
82483,The Soup
1 71256 The Daily Show
2 82483 The Soup

@ -20,8 +20,8 @@ namespace NzbDrone.Core.Test.ProviderTests
// ReSharper disable InconsistentNaming
public class ReferenceDataProviderTest : CoreTest
{
private string validSeriesIds = String.Format("1{0}2{0}3{0}4{0}5", Environment.NewLine);
private string invalidSeriesIds = String.Format("1{0}2{0}NaN{0}4{0}5", Environment.NewLine);
private string validSeriesIds = String.Format("1,Test{0}2,Test{0}3,Test{0}4,Test{0}5,Test", Environment.NewLine);
private string invalidSeriesIds = String.Format("1,Test{0}2,Test{0}NaN,Test{0}4,Test{0}5,Test", Environment.NewLine);
[Test]
public void GetDailySeriesIds_should_return_list_of_int_when_all_are_valid()

@ -55,7 +55,10 @@ namespace NzbDrone.Core.Providers
{
int seriesId;
if (Int32.TryParse(line, out seriesId))
//Split CSV, first item should be the seriesId
var split = line.Split(',');
if (Int32.TryParse(split[0], out seriesId))
seriesIds.Add(seriesId);
}
}

Loading…
Cancel
Save