Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/ddc4c359cb11a0f92080ad5e220f940ede7e010a
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
16 additions and
7 deletions
@ -20,6 +20,7 @@ namespace NzbDrone.Core.Test.TvTests
[TestCase("The Mentalist", "mentalist")]
[TestCase("The Good Wife", "good wife")]
[TestCase("The Newsroom (2012)", "newsroom 2012")]
[TestCase("Special Agent Oso", "special agent oso")]
public void should_normalize_title ( String title , String expected )
{
SeriesTitleNormalizer . Normalize ( title , 0 ) . Should ( ) . Be ( expected ) ;
@ -323,13 +323,20 @@ namespace NzbDrone.Core.Parser
return MultiPartCleanupRegex . Replace ( title , string . Empty ) . Trim ( ) ;
}
public static string NormalizeEpisodeTitle ( string title )
{
return SpecialEpisodeWordRegex . Replace ( title , String . Empty )
. Trim ( )
. ToLower ( ) ;
}
public static string NormalizeTitle ( string title )
{
string singleSpaces = WordDelimiterRegex . Replace ( title , " " ) ;
string noPunctuation = PunctuationRegex . Replace ( singleSpaces , String . Empty ) ;
string noCommonWords = CommonWordRegex . Replace ( noPunctuation , String . Empty ) ;
string normalized = SpecialEpisodeWordRegex . Replace ( noCommonWords , String . Empty ) ;
return normalized . Trim ( ) . ToLower ( ) ;
title = WordDelimiterRegex . Replace ( title , " " ) ;
title = PunctuationRegex . Replace ( title , String . Empty ) ;
title = CommonWordRegex . Replace ( title , String . Empty ) ;
return title . Trim ( ) . ToLower ( ) ;
}
public static string ParseReleaseGroup ( string title )
@ -106,12 +106,13 @@ namespace NzbDrone.Core.Tv
public Episode FindEpisodeByName ( int seriesId , int seasonNumber , string episodeTitle )
{
// TODO: can replace this search mechanism with something smarter/faster/better
var search = Parser . Parser . NormalizeTitle ( episodeTitle ) ;
var search = Parser . Parser . NormalizeEpisodeTitle ( episodeTitle ) ;
return _episodeRepository . GetEpisodes ( seriesId , seasonNumber )
. FirstOrDefault ( e = >
{
// normalize episode title
string title = Parser . Parser . Normaliz eTitle( e . Title ) ;
var title = Parser . Parser . Normaliz eEpisod eTitle( e . Title ) ;
// find episode title within search string
return ( title . Length > 0 ) & & search . Contains ( title ) ;
} ) ;