{"record":{"id":"d431974d6329346f","repo":"babalae/better-genshin-impact","slug":"error-d43197","errorCode":null,"errorMessage":"当前在全部歌曲页面，此页面无法运行本任务。请返回到主界面选择专辑列表中以国家为主题的专辑页！","messagePattern":"当前在全部歌曲页面，此页面无法运行本任务。请返回到主界面选择专辑列表中以国家为主题的专辑页！","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoMusicGame/AutoAlbumTask.cs","lineNumber":63,"sourceCode":"        }\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\n        Logger.LogInformation(\"自动音游乐曲难度等级：{Text}\", musicLevel);\n\n        // 遍历4个难度等级\n        var defaultDifficultyLevels = new[]\n        {\n            (\"普通\", 480, 600, RecognitionAssets.Get(\"AutoMusicGame\", \"MusicCanorusLevel1\", ra1)),\n            (\"困难\", 800, 600, RecognitionAssets.Get(\"AutoMusicGame\", \"MusicCanorusLevel2\", ra1)),\n            (\"大师\", 1150, 600, RecognitionAssets.Get(\"AutoMusicGame\", \"MusicCanorusLevel3\", ra1)),\n            (\"传说\", 1400, 600, RecognitionAssets.Get(\"AutoMusicGame\", \"MusicCanorusLevel4\", ra1))","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoMusicGame/AutoAlbumTask.cs#L45-L81","documentation":"Thrown by StartOneAlbum when the album icon IS present but OCR of the region to its right contains '全部', indicating the user is on the all-songs page rather than a single country album. The task cannot run from the all-songs view.","triggerScenarios":"iconRa exists; ocrArea.FindMulti(RecognitionObject.OcrThis) returns at least one region whose Text.Contains(\"全部\") → throw.","commonSituations":"User navigated to the '全部歌曲' (all songs) listing instead of a country album; OCR picks up the '全部' filter/tab text.","solutions":["Return to the album list and select a specific country-themed album (not '全部').","If the in-game layout changed and '全部' appears on valid album pages too, tighten the OCR ROI so it only matches the all-songs header.","Re-run StartOneAlbum once on the correct page."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await StartOneAlbum(ct); }\ncatch (Exception ex) when (ex.Message.Contains(\"全部歌曲页面\"))\n{\n    Logger.LogWarning(\"当前在全部歌曲页面，请在专辑列表中选择国家主题专辑后重试\");\n}","preventionTips":["Select a specific country album, not the '全部' listing, before running.","If '全部' legitimately appears on album pages after a game update, narrow the OCR ROI."],"tags":["ocr","ui","music-game"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}