mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 20:38:24 +02:00
Merge pull request #1704 from nvllsvm/fix_replace_multiple_spaces
Fix replace multiple spaces
This commit is contained in:
commit
852e5e29ca
1 changed files with 2 additions and 8 deletions
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
|
@ -312,14 +313,7 @@ namespace MediaBrowser.Providers.TV.TheTVDB
|
||||||
}
|
}
|
||||||
sb.Replace(", the", string.Empty).Replace("the ", " ").Replace(" the ", " ");
|
sb.Replace(", the", string.Empty).Replace("the ", " ").Replace(" the ", " ");
|
||||||
|
|
||||||
int prevLength;
|
return Regex.Replace(sb.ToString().Trim(), @"\s+", " ");
|
||||||
do
|
|
||||||
{
|
|
||||||
prevLength = sb.Length;
|
|
||||||
sb.Replace(" ", " ");
|
|
||||||
} while (name.Length != prevLength);
|
|
||||||
|
|
||||||
return sb.ToString().Trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MapSeriesToResult(MetadataResult<Series> result, TvDbSharper.Dto.Series tvdbSeries, string metadataLanguage)
|
private void MapSeriesToResult(MetadataResult<Series> result, TvDbSharper.Dto.Series tvdbSeries, string metadataLanguage)
|
||||||
|
|
Loading…
Reference in a new issue