JosefNemec/Playnite · error · NotSupportedInFullscreenException

Not supported in Fullscreen mode.

Error message

Not supported in Fullscreen mode.

What it means

Thrown by Fullscreen-mode MainViewAPI.SwitchToLibraryView. The Fullscreen host's main view model does not expose a 'library view' switch, so the shared-contract method is a stub that throws NotSupportedInFullscreenException. It exists only to satisfy the IMainViewAPI interface implemented by both hosts.

Source

Thrown at source/Playnite.FullscreenApp/Api/MainViewAPI.cs:80

        }

        public List<Game> FilteredGames => mainModel.GamesView.CollectionView.Cast<GamesCollectionViewEntry>().Select(a => a.Game).Distinct().ToList();

        public Dispatcher UIDispatcher => PlayniteApplication.CurrentNative.Dispatcher;

        public MainViewAPI(FullscreenAppViewModel mainModel)
        {
            this.mainModel = mainModel;
        }

        public bool OpenPluginSettings(Guid pluginId)
        {
            throw new NotSupportedInFullscreenException("Cannot open plugin settings in Fullscreen mode.");
        }

        public void SwitchToLibraryView()
        {
            throw new NotSupportedInFullscreenException();
        }

        public void SelectGame(Guid gameId)
        {
            var game = mainModel.Database.Games.Get(gameId);
            if (game == null)
            {
                logger.Error($"Can't select game, game ID {gameId} not found.");
            }
            else
            {
                mainModel.SelectGame(game.Id);
            }
        }

        public void SelectGames(IEnumerable<Guid> gameIds)
        {
            throw new NotSupportedInFullscreenException();

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Guard the call with an application-mode check and only run it in Desktop mode.
  2. Catch NotSupportedInFullscreenException and degrade gracefully (no-op or notify the user).
  3. Re-evaluate whether the workflow makes sense in Fullscreen; if not, disable that path.

Example fix

// before
PlayniteApi.MainView.SwitchToLibraryView();

// after
if (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Desktop)
{
    PlayniteApi.MainView.SwitchToLibraryView();
}
Defensive patterns

Strategy: validation

Validate before calling

if (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Desktop)
{
    PlayniteApi.MainView.SwitchToLibraryView();
}

Try / catch

try { PlayniteApi.MainView.SwitchToLibraryView(); }
catch (NotSupportedInFullscreenException) { /* no-op */ }

Prevention

When it happens

Trigger: Calling PlayniteApi.MainView.SwitchToLibraryView() from a plugin/script running inside the FullscreenApp host.

Common situations: A library-navigation command authored for Desktop is invoked by a user in Fullscreen mode; an extension assumes the same view-switching API works in both hosts.

Related errors


AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13). Data as JSON: /api/errors/2f72785798816c29. Report an issue: GitHub.