Merge pull request #319 from AttorneyOnline/in1tiate/music-missingno
Indicate when a song was not found to reduce confusion
This commit is contained in:
commit
e0e2898393
@ -1533,9 +1533,8 @@ void Courtroom::on_chat_return_pressed()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ui_ic_chat_message->blockSignals(true);
|
ui_ic_chat_message->blockSignals(true);
|
||||||
QTimer::singleShot(600, this, [=] {
|
QTimer::singleShot(600, this,
|
||||||
ui_ic_chat_message->blockSignals(false);
|
[=] { ui_ic_chat_message->blockSignals(false); });
|
||||||
});
|
|
||||||
// MS#
|
// MS#
|
||||||
// deskmod#
|
// deskmod#
|
||||||
// pre-emote#
|
// pre-emote#
|
||||||
@ -3159,8 +3158,12 @@ void Courtroom::handle_song(QStringList *p_contents)
|
|||||||
}
|
}
|
||||||
|
|
||||||
music_player->play(f_song, channel, looping, effect_flags);
|
music_player->play(f_song, channel, looping, effect_flags);
|
||||||
if (channel == 0)
|
if (channel == 0) {
|
||||||
ui_music_name->setText(f_song_clear);
|
if (file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song))))
|
||||||
|
ui_music_name->setText(f_song_clear);
|
||||||
|
else
|
||||||
|
ui_music_name->setText(tr("[MISSING] %1").arg(f_song_clear));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QString str_char = char_list.at(n_char).name;
|
QString str_char = char_list.at(n_char).name;
|
||||||
@ -3191,8 +3194,12 @@ void Courtroom::handle_song(QStringList *p_contents)
|
|||||||
append_ic_text(f_song_clear, str_show, tr("has played a song"));
|
append_ic_text(f_song_clear, str_show, tr("has played a song"));
|
||||||
|
|
||||||
music_player->play(f_song, channel, looping, effect_flags);
|
music_player->play(f_song, channel, looping, effect_flags);
|
||||||
if (channel == 0)
|
if (channel == 0) {
|
||||||
ui_music_name->setText(f_song_clear);
|
if (file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song))))
|
||||||
|
ui_music_name->setText(f_song_clear);
|
||||||
|
else
|
||||||
|
ui_music_name->setText(tr("[MISSING] %1").arg(f_song_clear));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user