remove launch scan code I wasn't sure if I wanted.

This commit is contained in:
Kevin Whitaker
2017-02-05 19:01:24 -05:00
parent 47670aede8
commit dc37ef9e06
2 changed files with 4 additions and 18 deletions

View File

@@ -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;
}

View File

@@ -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;