diff options
| author | Mister Rajoy <danielarezdiaz@gmail.com> | 2021-03-13 20:33:05 +0100 |
|---|---|---|
| committer | Mister Rajoy <danielarezdiaz@gmail.com> | 2021-03-13 20:33:05 +0100 |
| commit | 4cc3b938fa7913bccf7229dafce4b9f1d369dd16 (patch) | |
| tree | fc5ec40c80a942887c29b6bef75df822a2755189 /Emby.Server.Implementations/Collections/CollectionManager.cs | |
| parent | 18cd634ec8316fe5978d7ad3867de66b85cd5fba (diff) | |
Change Guid.Parse to Guid.TryParse
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionManager.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 449f8872f..b5d95134b 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -348,11 +348,13 @@ namespace Emby.Server.Implementations.Collections foreach (var child in item.GetMediaSources(true)) { - if (results.ContainsKey(Guid.Parse(child.Id))) + if (Guid.TryParse(child.Id, out var id) && results.ContainsKey(id)) { alreadyInResults = true; + break; } } + if (!alreadyInResults) { |
