Daily episodes that are added via RSS feed will have proper season and episode numbers.

This commit is contained in:
Mark McDowall 2011-11-24 23:56:07 -08:00
commit 290e5d5897
3 changed files with 55 additions and 1 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
@ -51,5 +52,15 @@ namespace NzbDrone.Core
{
return uri.AbsoluteUri.Remove(uri.AbsoluteUri.Length - String.Join("", uri.Segments).Length - uri.Query.Length);
}
public static int MaxOrDefault(this IEnumerable<int> ints)
{
var intList = ints.ToList();
if (intList.Count() == 0)
return 0;
return intList.Max();
}
}
}