Skip to content

Commit

Permalink
possibly fix #81 ?
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatix committed Feb 12, 2025
1 parent 7db9434 commit 865e555
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/agbplay/ProfileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ void ProfileManager::ApplyScanResultsToProfiles(
/* If no scan results are found make sure profiles are restricted to the ones,
* which have a manual song table and song count. */
auto filterFunc = [](std::shared_ptr<Profile> &profile) {
// TODO, this filters only profiles with manual songtable.
// This may need to change once we change the scanner to support partial scanning
const bool manualTable = profile->songTableInfoConfig.pos != SongTableInfo::POS_AUTO;
const bool manualCount = profile->songTableInfoConfig.count != SongTableInfo::COUNT_AUTO;
return !(manualTable && manualCount);
Expand All @@ -50,6 +52,8 @@ void ProfileManager::ApplyScanResultsToProfiles(
throw Xcept(
"Scanner could not find MP2K data. Existing matching profiles were found, but none manually specify song table and song count."
);
for (std::shared_ptr<Profile> &profileCandidate : profiles)
profileCandidate->ApplyScanToPlayback();
}

for (size_t tableIdx = 0; tableIdx < scanResults.size(); tableIdx++) {
Expand Down

0 comments on commit 865e555

Please sign in to comment.