diff --git a/NzbDrone.Core/Jobs/BannerDownloadJob.cs b/NzbDrone.Core/Jobs/BannerDownloadJob.cs index 614a4aa36..8ab075077 100644 --- a/NzbDrone.Core/Jobs/BannerDownloadJob.cs +++ b/NzbDrone.Core/Jobs/BannerDownloadJob.cs @@ -46,7 +46,7 @@ namespace NzbDrone.Core.Jobs if (options != null) { - var series = _seriesProvider.GetSeries(options.SeriesId); + Series series = _seriesProvider.GetSeries(options.SeriesId); if (series != null && !String.IsNullOrEmpty(series.BannerUrl)) { diff --git a/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs b/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs index 4d142eef0..5501dbd6b 100644 --- a/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs +++ b/NzbDrone.Core/Jobs/ConvertEpisodeJob.cs @@ -5,6 +5,7 @@ using NLog; using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Providers; using NzbDrone.Core.Providers.Converting; +using NzbDrone.Core.Repository; namespace NzbDrone.Core.Jobs { @@ -41,7 +42,7 @@ namespace NzbDrone.Core.Jobs if (options == null || options.EpisodeId <= 0) throw new ArgumentNullException(options); - var episode = _episodeProvider.GetEpisode(options.EpisodeId); + Episode episode = _episodeProvider.GetEpisode(options.EpisodeId); notification.CurrentMessage = String.Format("Starting Conversion for {0}", episode); var outputFile = _handbrakeProvider.ConvertFile(episode, notification); diff --git a/NzbDrone.Core/Jobs/RenameSeasonJob.cs b/NzbDrone.Core/Jobs/RenameSeasonJob.cs index f236c5822..f442fa372 100644 --- a/NzbDrone.Core/Jobs/RenameSeasonJob.cs +++ b/NzbDrone.Core/Jobs/RenameSeasonJob.cs @@ -54,7 +54,7 @@ namespace NzbDrone.Core.Jobs notification.CurrentMessage = String.Format("Renaming episodes for {0} Season {1}", series.Title, options.SeasonNumber); logger.Debug("Getting episodes from database for series: {0} and season: {1}", options.SeriesId, options.SeasonNumber); - var episodeFiles = _mediaFileProvider.GetSeasonFiles(options.SeriesId, options.SeasonNumber); + IList episodeFiles = _mediaFileProvider.GetSeasonFiles(options.SeriesId, options.SeasonNumber); if (episodeFiles == null || !episodeFiles.Any()) { diff --git a/NzbDrone.Web/Global.asax.cs b/NzbDrone.Web/Global.asax.cs index 3ec25ec5a..f666ceebb 100644 --- a/NzbDrone.Web/Global.asax.cs +++ b/NzbDrone.Web/Global.asax.cs @@ -26,12 +26,17 @@ namespace NzbDrone.Web routes.IgnoreRoute("{*robotstxt}", new { robotstxt = @"(.*/)?robots.txt(/.*)?" }); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); + routes.MapRouteLowercase( + name: "WithSeasonNumber", + url: "{controller}/{action}/{seriesId}/{seasonNumber}", + defaults: new { controller = "Series", action = "Index", seriesId = UrlParameter.Optional, seasonNumber = UrlParameter.Optional } + ); routes.MapRouteLowercase( - "Default", // Route name - "{controller}/{action}/{id}", // URL with parameters - new { controller = "Series", action = "Index", id = UrlParameter.Optional } // Parameter defaults - ); + name: "SeriesId", + url: "{controller}/{action}/{seriesId}", + defaults: new { controller = "Series", action = "Index", seriesId = UrlParameter.Optional } + ); } protected override void OnApplicationStarted() diff --git a/NzbDrone.Web/Views/Missing/Index.cshtml b/NzbDrone.Web/Views/Missing/Index.cshtml index 51a9b01aa..363e57f61 100644 --- a/NzbDrone.Web/Views/Missing/Index.cshtml +++ b/NzbDrone.Web/Views/Missing/Index.cshtml @@ -40,7 +40,7 @@ function seriesTitle (source, type, val) { // 'display' and 'filter' use our fancy naming if (type === 'display' || type === 'filter') { - return "" + source["SeriesTitle"] + ""; + return "" + source["SeriesTitle"] + ""; } // 'sort' and 'type' both just use the raw data return source["SeriesTitleSorter"]; diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 688b882ec..632f1b259 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -146,7 +146,7 @@ { sWidth: 'auto', "mDataProp": function (source, type, val) { // 'display' and 'filter' use our fancy naming if (type === 'display' || type === 'filter') { - return "" + source["Title"] + ""; + return "" + source["Title"] + ""; } // 'sort' and 'type' both just use the raw data return source["TitleSorter"]; diff --git a/NzbDrone.Web/Views/Series/Season.cshtml b/NzbDrone.Web/Views/Series/Season.cshtml index 6472f8563..0c9b125c4 100644 --- a/NzbDrone.Web/Views/Series/Season.cshtml +++ b/NzbDrone.Web/Views/Series/Season.cshtml @@ -23,9 +23,9 @@ @*Commands Column*@ - @Ajax.IconActionLink("icon-search gridAction", "", "SearchSeason", "Episode", new { SeriesId = Model.SeriesId, SeasonNumber = Model.SeasonNumber }, null, new { title = "Search for all episodes in this season" }) + @Ajax.IconActionLink("icon-search gridAction", "", "SearchSeason", "Episode", new { SeriesId = Model.SeriesId, seasonnumber = Model.SeasonNumber }, null, new { title = "Search for all episodes in this season" }) - @Ajax.IconActionLink("icon-pencil gridAction", "", "RenameSeason", "Episode", new { SeriesId = Model.SeriesId, SeasonNumber = Model.SeasonNumber }, null, new { Title = "Rename all episodes in this season" }) + @Ajax.IconActionLink("icon-pencil gridAction", "", "RenameSeason", "Episode", new { SeriesId = Model.SeriesId, seasonnumber = Model.SeasonNumber }, null, new { Title = "Rename all episodes in this season" })