diff --git a/src/GroovePlayer.cpp b/src/GroovePlayer.cpp index 240529e4763ee6d6d75507a8a3a44a3551f7ef40..d0cbb4586736a7f6b917a605c744e93c76cef468 100644 --- a/src/GroovePlayer.cpp +++ b/src/GroovePlayer.cpp @@ -46,22 +46,10 @@ GroovePlayerMgr::GroovePlayerMgr (std::string dbFile) : sqliteConnection(dbFile) } groove_init(); - /*bool emptyTrackListing = false; - { - Wt::Dbo::Transaction transaction(sqlSession); - int trackCount = sqlSession.query("select count(fingerprint) from tracks"); - emptyTrackListing = trackCount==0; - } - if(emptyTrackListing) - { - grooveAudioScanner = new std::thread([this](){grooveAudioScannerLoop();}); - grooveEvents = new std::thread([this](){while(!this->finishedLaunchScan){std::this_thread::sleep_for(std::chrono::milliseconds(200));}[this](){grooveEventLoop();};}); - } - else - {*/ - grooveAudioScanner = new std::thread([this](){grooveAudioScannerLoop();}); - grooveEvents = new std::thread([this](){grooveEventLoop();}); - //} + + grooveAudioScanner = new std::thread([this](){grooveAudioScannerLoop();}); + grooveEvents = new std::thread([this](){grooveEventLoop();}); + } std::list GroovePlayerMgr::getNextVoteBatch(Wt::Dbo::Session* session) @@ -503,6 +491,5 @@ void GroovePlayerMgr::grooveAudioScannerLoop() } //Now check for tracks in DB without a file. removeOrphanedTracks(&sqlSession); - finishedLaunchScan = true; } diff --git a/src/GroovePlayer.h b/src/GroovePlayer.h index 5ee15d0f7a18438e2365295529e26a9b5d6e5f81..b03d5f920a8e63541a5023e7c3cb345a32f7065f 100644 --- a/src/GroovePlayer.h +++ b/src/GroovePlayer.h @@ -57,7 +57,6 @@ private: Wt::Dbo::backend::Sqlite3 sqliteConnection; Wt::Dbo::FixedSqlConnectionPool connectionPool; bool continueEventLoop = true; - bool finishedLaunchScan = false; std::list requestQueue; std::list lastInternalEvents;