int mythplugin_init(const char *libversion) { if (!gContext->TestPopupVersion("mythmusic", libversion, MYTH_BINARY_VERSION)) return -1; gCoreContext->ActivateSettingsCache(false); bool upgraded = UpgradeMusicDatabaseSchema(); gCoreContext->ActivateSettingsCache(true); if (!upgraded) { LOG(VB_GENERAL, LOG_ERR, "Couldn't upgrade music database schema, exiting."); return -1; } setupKeys(); Decoder::SetLocationFormatUseTags(); gPlayer = new MusicPlayer(NULL, chooseCD()); gMusicData = new MusicData(); return 0; }
int mythplugin_init(const char *libversion) { if (!gContext->TestPopupVersion("mythmusic", libversion, MYTH_BINARY_VERSION)) return -1; gCoreContext->ActivateSettingsCache(false); bool upgraded = UpgradeMusicDatabaseSchema(); gCoreContext->ActivateSettingsCache(true); if (!upgraded) { VERBOSE(VB_IMPORTANT, "Couldn't upgrade music database schema, exiting."); return -1; } MusicGeneralSettings general; general.Load(); general.Save(); MusicPlayerSettings settings; settings.Load(); settings.Save(); MusicRipperSettings ripper; ripper.Load(); ripper.Save(); setupKeys(); Decoder::SetLocationFormatUseTags(); gPlayer = new MusicPlayer(NULL, chooseCD()); gMusicData = new MusicData(); return 0; }