mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-29 06:21:56 +01:00
Merge pull request #5356 from cvium/fix_provideridextensions
return false when providerid is null or empty
(cherry picked from commit ddc62a89ba)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
5e18ab3604
commit
046dd7fa60
@@ -22,7 +22,7 @@ namespace MediaBrowser.Model.Entities
|
||||
throw new ArgumentNullException(nameof(instance));
|
||||
}
|
||||
|
||||
return instance.ProviderIds?.ContainsKey(name) ?? false;
|
||||
return instance.TryGetProviderId(name, out _);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,7 +56,15 @@ namespace MediaBrowser.Model.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
return instance.ProviderIds.TryGetValue(name, out id);
|
||||
var foundProviderId = instance.ProviderIds.TryGetValue(name, out id);
|
||||
// This occurs when searching with Identify (and possibly in other places)
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
id = null;
|
||||
foundProviderId = false;
|
||||
}
|
||||
|
||||
return foundProviderId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user