mirror of https://github.com/Radarr/Radarr
Cleaned up some unused code and a bit more exception handling for GetDirectories.
This commit is contained in:
parent
50e91c0043
commit
d3f6c685cd
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
|
|
||||||
|
@ -48,8 +49,9 @@ namespace NzbDrone.Web.Controllers
|
||||||
dirs = _diskProvider.GetDirectories(term.Substring(0, index + 1));
|
dirs = _diskProvider.GetDirectories(term.Substring(0, index + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
return Json(new List<string>(), JsonRequestBehavior.AllowGet);
|
||||||
//Swallow the exceptions so proper JSON is returned to the client (Empty results)
|
//Swallow the exceptions so proper JSON is returned to the client (Empty results)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,13 +213,5 @@ namespace NzbDrone.Web.Controllers
|
||||||
|
|
||||||
return episodes;
|
return episodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetSeasonString(int seasonNumber)
|
|
||||||
{
|
|
||||||
if (seasonNumber == 0)
|
|
||||||
return "Specials";
|
|
||||||
|
|
||||||
return String.Format("Season #{0}", seasonNumber);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue