Update Jellyfin.Api/Controllers/DashboardController.cs

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
David 2020-06-21 18:22:17 +02:00 committed by GitHub
parent fae510308e
commit 4eb94b8fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,12 +259,12 @@ namespace Jellyfin.Api.Controllers
private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages(IPlugin plugin)
{
if (!(plugin is IHasWebPages))
if (!(plugin is IHasWebPages hasWebPages))
{
return new List<Tuple<PluginPageInfo, IPlugin>>();
}
return (plugin as IHasWebPages)!.GetPages().Select(i => new Tuple<PluginPageInfo, IPlugin>(i, plugin));
return hasWebPages.GetPages().Select(i => new Tuple<PluginPageInfo, IPlugin>(i, plugin));
}
private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages()