{"record":{"id":"2f72785798816c29","repo":"JosefNemec/Playnite","slug":"not-supported-in-fullscreen-mode","errorCode":null,"errorMessage":"Not supported in Fullscreen mode.","messagePattern":"Not supported in Fullscreen mode\\.","errorType":"exception","errorClass":"NotSupportedInFullscreenException","httpStatus":null,"severity":"error","filePath":"source/Playnite.FullscreenApp/Api/MainViewAPI.cs","lineNumber":80,"sourceCode":"        }\r\n\r\n        public List<Game> FilteredGames => mainModel.GamesView.CollectionView.Cast<GamesCollectionViewEntry>().Select(a => a.Game).Distinct().ToList();\r\n\r\n        public Dispatcher UIDispatcher => PlayniteApplication.CurrentNative.Dispatcher;\r\n\r\n        public MainViewAPI(FullscreenAppViewModel mainModel)\r\n        {\r\n            this.mainModel = mainModel;\r\n        }\r\n\r\n        public bool OpenPluginSettings(Guid pluginId)\r\n        {\r\n            throw new NotSupportedInFullscreenException(\"Cannot open plugin settings in Fullscreen mode.\");\r\n        }\r\n\r\n        public void SwitchToLibraryView()\r\n        {\r\n            throw new NotSupportedInFullscreenException();\r\n        }\r\n\r\n        public void SelectGame(Guid gameId)\r\n        {\r\n            var game = mainModel.Database.Games.Get(gameId);\r\n            if (game == null)\r\n            {\r\n                logger.Error($\"Can't select game, game ID {gameId} not found.\");\r\n            }\r\n            else\r\n            {\r\n                mainModel.SelectGame(game.Id);\r\n            }\r\n        }\r\n\r\n        public void SelectGames(IEnumerable<Guid> gameIds)\r\n        {\r\n            throw new NotSupportedInFullscreenException();\r","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/JosefNemec/Playnite/blob/5911f4e964e628aa7a69c2030ab35101afa63067/source/Playnite.FullscreenApp/Api/MainViewAPI.cs#L62-L98","documentation":"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.","triggerScenarios":"Calling PlayniteApi.MainView.SwitchToLibraryView() from a plugin/script running inside the FullscreenApp host.","commonSituations":"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.","solutions":["Guard the call with an application-mode check and only run it in Desktop mode.","Catch NotSupportedInFullscreenException and degrade gracefully (no-op or notify the user).","Re-evaluate whether the workflow makes sense in Fullscreen; if not, disable that path."],"exampleFix":"// before\nPlayniteApi.MainView.SwitchToLibraryView();\n\n// after\nif (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Desktop)\n{\n    PlayniteApi.MainView.SwitchToLibraryView();\n}","handlingStrategy":"validation","validationCode":"if (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Desktop)\n{\n    PlayniteApi.MainView.SwitchToLibraryView();\n}","typeGuard":null,"tryCatchPattern":"try { PlayniteApi.MainView.SwitchToLibraryView(); }\ncatch (NotSupportedInFullscreenException) { /* no-op */ }","preventionTips":["Gate view-switching commands on Desktop mode.","Do not expose Desktop-only navigation in Fullscreen UI.","Catch the mode exception to degrade gracefully."],"tags":["api-mode","fullscreen","view","playnite"],"backgroundTag":null,"analyzedSha":"5911f4e964e628aa7a69c2030ab35101afa63067","analyzedAt":"2026-08-13T17:38:25.713Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}