Fixing a bug with libraries that didn't have any providers

This commit is contained in:
Zoe Roux 2020-03-02 23:58:33 +01:00
parent f081c1cf66
commit 4ed7451004

View File

@ -21,6 +21,9 @@ namespace Kyoo.Controllers
{
T ret = new T();
if (library.Providers == null)
return ret;
foreach (IMetadataProvider provider in _providers.OrderBy(provider => Array.IndexOf(library.Providers, provider.Name)))
{
try
@ -38,6 +41,9 @@ namespace Kyoo.Controllers
{
List<T> ret = new List<T>();
if (library.Providers == null)
return ret;
foreach (IMetadataProvider provider in _providers.OrderBy(provider => Array.IndexOf(library.Providers, provider.Name)))
{
try