1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-23 08:22:39 +00:00

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

This commit is contained in:
Mark McDowall 2011-12-19 17:15:15 -08:00
parent 69ddeeb0e3
commit 86c5e73f81
3 changed files with 8 additions and 3 deletions

2
DailySeries.csv Normal file
View file

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

View file

@ -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()

View file

@ -55,7 +55,10 @@ public List<int> GetDailySeriesIds()
{
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);
}
}