Skip to content

Commit

Permalink
Merge pull request #42 from FlafyDev/fix/allow-select-default
Browse files Browse the repository at this point in the history
fix: Allow selecting the default song without the file downloaded
  • Loading branch information
Fleeym authored Jun 14, 2024
2 parents 72f5ccb + daf8a82 commit 5978563
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/nong_dropdown_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ void NongDropdownLayer::setActiveSong(SongInfo const& song) {
}
int id = m_currentSongID.value();
auto songs = m_data[id];
if (!fs::exists(song.path)) {
auto defaultNong = NongManager::get()->getDefaultNong(id);
auto isDefault = defaultNong.has_value() && defaultNong->path == song.path;
if (!isDefault && !fs::exists(song.path)) {
FLAlertLayer::create("Failed", "Failed to set song: file not found", "Ok")->show();
return;
}
Expand Down

0 comments on commit 5978563

Please sign in to comment.