mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Merge pull request #48 from fedoranimus/develop
Harden parsing of imported movie titles
This commit is contained in:
commit
00d4bfd712
1 changed files with 4 additions and 1 deletions
|
@ -192,9 +192,12 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
|
|
||||||
private string StripTrailingTheFromTitle(string title)
|
private string StripTrailingTheFromTitle(string title)
|
||||||
{
|
{
|
||||||
if(title.EndsWith(", the") || title.EndsWith(",the"))
|
if(title.EndsWith(",the"))
|
||||||
{
|
{
|
||||||
title = title.Substring(title.Length - 4);
|
title = title.Substring(title.Length - 4);
|
||||||
|
} else if(title.EndsWith(", the"))
|
||||||
|
{
|
||||||
|
title = title.Substring(title.Length - 5);
|
||||||
}
|
}
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue