Fixed: Restore playlist after charselect

fix-media-player
Nimetu 5 years ago
parent 6993a2731f
commit 36187626a9

@ -1044,6 +1044,10 @@ void CInterfaceManager::initInGame()
gc->setTarget(gc->getSavedTarget());
}
// rebuild mp3 player playlist if user reselected a char (songs are already scanned)
CAHManager::getInstance()->runActionHandler("music_player", NULL, "update_playlist");
CAHManager::getInstance()->runActionHandler("music_player", NULL, "stop");
CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHATLOG_STATE", false);
if (node)
{

@ -240,8 +240,8 @@ void releaseMainLoopReselect()
// alredy called from farTPMainLoop()
// --R2::getEditor().autoConfigRelease(IsInRingSession);
// Pause any user played music
MusicPlayer.pause();
// stop any user played music
MusicPlayer.stop();
// only really needed at exit
// --STRING_MANAGER::CStringManagerClient::instance()->flushStringCache();
@ -390,8 +390,8 @@ void releaseMainLoop(bool closeConnection)
// Release R2 editor if applicable
R2::getEditor().autoConfigRelease(IsInRingSession);
// Pause any user played music
MusicPlayer.pause();
// stop any user played music
MusicPlayer.stop();
// flush the server string cache
STRING_MANAGER::CStringManagerClient::instance()->flushStringCache();

Loading…
Cancel
Save