//
// MusicBrowser::onUpdateLibrary from 0x581558 to 0x581598 (64 bytes)
//
// 2 xrefs:
// > MusicBrowser::setupMusicBrowser @ 0x581c6e
// > MusicBrowser::musicActionFinished @ 0x5826ca
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void MusicBrowser::onUpdateLibrary(MusicBrowser *a1, cocos2d::CCObject *a2)
{
MusicDownloadManager *v3; // r0
MusicDownloadManager *v4; // r0
a1->m_autoUpdating = a2 == nullptr;
if ( *((_DWORD *)MusicDownloadManager::sharedState()->m_customContentURL.m_data.m_data - 3) )
{
a1->m_gettingURL = 0;
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::tryUpdateMusicLibrary(v4);
}
else
{
a1->m_gettingURL = 1;
v3 = MusicDownloadManager::sharedState();
MusicDownloadManager::getCustomContentURL(v3);
}
}