remove launch scan code I wasn't sure if I wanted.
This commit is contained in:
@@ -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<int>("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<AudioTrack> 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ private:
|
||||
Wt::Dbo::backend::Sqlite3 sqliteConnection;
|
||||
Wt::Dbo::FixedSqlConnectionPool connectionPool;
|
||||
bool continueEventLoop = true;
|
||||
bool finishedLaunchScan = false;
|
||||
|
||||
std::list<AudioTrack> requestQueue;
|
||||
std::list<PlayerEvents> lastInternalEvents;
|
||||
|
||||
Reference in New Issue
Block a user