{"record":{"id":"4a196c76aad39f10","repo":"babalae/better-genshin-impact","slug":"error-4a196c","errorCode":null,"errorMessage":"当前未处于主题专辑界面，请在专辑界面运行本任务。注意全部歌曲列表页面无法运行本任务！","messagePattern":"当前未处于主题专辑界面，请在专辑界面运行本任务。注意全部歌曲列表页面无法运行本任务！","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoMusicGame/AutoAlbumTask.cs","lineNumber":54,"sourceCode":"        catch (NormalEndException e)\n        {\n            Logger.LogError(\"手动取消任务 - {Msg}\", e.Message);\n        }\n        catch (Exception e)\n        {\n            Logger.LogError(\"自动音乐专辑任务异常:{Msg}\", e.Message);\n            Logger.LogDebug(e, \"自动音乐专辑任务异常详情\");\n            Notify.Event(NotificationEvent.AlbumError).Error(\"自动音游专辑异常\", e);\n        }\n    }\n\n    public async Task StartOneAlbum(CancellationToken ct)\n    {\n        using var ra1 = CaptureToRectArea();\n        using var iconRa = ra1.Find(RecognitionAssets.Get(\"AutoMusicGame\", \"UiLeftTopAlbumIcon\", ra1));\n        if (!iconRa.IsExist())\n        {\n            throw new Exception(\"当前未处于主题专辑界面，请在专辑界面运行本任务。注意全部歌曲列表页面无法运行本任务！\");\n        }\n        else\n        {\n            // OCR 后再次判断，区分是否是全部歌曲页面\n            using var ocrArea = ra1.DeriveCrop(iconRa.Right, iconRa.Top, ra1.Width * 0.16, iconRa.Height);\n            var ocrRes = ocrArea.FindMulti(RecognitionObject.OcrThis);\n            if (ocrRes.Any(region => region.Text.Contains(\"全部\")))\n            {\n                throw new Exception(\"当前在全部歌曲页面，此页面无法运行本任务。请返回到主界面选择专辑列表中以国家为主题的专辑页！\");\n            }\n        }\n\n        var musicLevel = TaskContext.Instance().Config.AutoMusicGameConfig.MusicLevel;\n        if (string.IsNullOrEmpty(musicLevel))\n        {\n            musicLevel = \"传说\";\n        }\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoMusicGame/AutoAlbumTask.cs#L36-L72","documentation":"Thrown by AutoAlbumTask.StartOneAlbum when the album-icon template (UiLeftTopAlbumIcon) is not found on screen, meaning the game is not currently on a theme-album page. The music task requires being on a country-themed album view to start.","triggerScenarios":"ra1.Find(RecognitionAssets.Get(\"AutoMusicGame\",\"UiLeftTopAlbumIcon\",ra1)).IsExist() returns false.","commonSituations":"User started the task from the wrong page (main menu, all-songs list, a single song); template match threshold too strict; resolution/aspect mismatch; game UI changed.","solutions":["Navigate in-game to a country-themed album page (not the all-songs list) before starting the task.","Update the UiLeftTopAlbumIcon template to match the current game version.","Check resolution is 16:9 and >= 1080p so the template matches.","Confirm the recognition threshold for the Find call."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"using var ra = CaptureToRectArea();\nusing var icon = ra.Find(RecognitionAssets.Get(\"AutoMusicGame\", \"UiLeftTopAlbumIcon\", ra));\nif (!icon.IsExist())\n{\n    throw new InvalidOperationException(\"未处于主题专辑界面，请先在游戏中进入国家主题专辑页\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Guide users to navigate to a country-themed album page before starting.","Keep the UiLeftTopAlbumIcon template updated with the game version.","Run at 16:9 / >=1080p so template matching is reliable."],"tags":["vision-recognition","ui","music-game","template-matching"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}