diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2025-03-12 18:14:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-12 18:14:04 -0400 |
| commit | f87150bb3d32b708a886547c28e56fdd38b5115e (patch) | |
| tree | b4c73319032ef4b62d6f00e4bc9ff8971b504793 /MediaBrowser.Controller/Entities/BaseItem.cs | |
| parent | 237e7bd44b3c9a6f76892be1c6a925bcde64bdbf (diff) | |
| parent | a5f3d942f691b914b67b098f7a64406bea569aad (diff) | |
Merge pull request #9560 from IDisposable/sort-nfo-data
Sort embedded collections in Nfo files
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 55553da49..a331f7983 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -919,7 +919,7 @@ namespace MediaBrowser.Controller.Entities // Remove from middle if surrounded by spaces sortable = sortable.Replace(" " + search + " ", " ", StringComparison.Ordinal); - // Remove from end if followed by a space + // Remove from end if preceeded by a space if (sortable.EndsWith(" " + search, StringComparison.Ordinal)) { sortable = sortable.Remove(sortable.Length - (search.Length + 1)); @@ -1775,7 +1775,6 @@ namespace MediaBrowser.Controller.Entities public void AddStudio(string name) { ArgumentException.ThrowIfNullOrEmpty(name); - var current = Studios; if (!current.Contains(name, StringComparison.OrdinalIgnoreCase)) @@ -1794,7 +1793,7 @@ namespace MediaBrowser.Controller.Entities public void SetStudios(IEnumerable<string> names) { - Studios = names.Distinct().ToArray(); + Studios = names.Trimmed().Distinct().ToArray(); } /// <summary> |
