Add code to add track to DB and remove old ones that are gone. Added fingerprint lib to link for id-ing tracks. Make sure DB is logical after these changes. Change music path due to complaints I don't quite understand.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <thread>
|
||||
#include "db/User.h"
|
||||
#include "db/AudioTrack.h"
|
||||
#include <groove/groove.h>
|
||||
#include <experimental/filesystem> //TODO:Change to non-gcc way when officially using c++17
|
||||
namespace std {
|
||||
namespace filesystem = experimental::filesystem;
|
||||
@@ -37,7 +38,7 @@ public:
|
||||
static std::filesystem::path musicScanDir;
|
||||
static GroovePlayer* getInstance() {
|
||||
static GroovePlayer instance("music.db");
|
||||
musicScanDir = std::filesystem::current_path().string()+"/music";
|
||||
musicScanDir = std::filesystem::path("music");
|
||||
return &instance;
|
||||
};
|
||||
GroovePlayer(GroovePlayer const&) = delete;
|
||||
@@ -54,6 +55,7 @@ private:
|
||||
std::thread* grooveAudioScanner;
|
||||
static void grooveAudioScannerLoop();
|
||||
static bool addFileToTrackDBIfTagged(std::filesystem::path file);
|
||||
static void removeOrphanedTracks();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user