Fix a bug. Add some destructors. comment out one that causes problems.
This commit is contained in:
2
run.sh
Normal file → Executable file
2
run.sh
Normal file → Executable file
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
./arbitrateor --docroot /use/share/Wt --http-address 0.0.0.0 --http-port 8080 -c wt_config.xml
|
./arbitrateor --docroot /usr/share/Wt --http-address 0.0.0.0 --http-port 8080 -c wt_config.xml
|
||||||
|
|||||||
@@ -746,11 +746,12 @@ void GroovePlayerMgr::grooveAudioScannerLoop()
|
|||||||
}
|
}
|
||||||
for(std::filesystem::directory_entry p: std::filesystem::directory_iterator(musicScanDir))
|
for(std::filesystem::directory_entry p: std::filesystem::directory_iterator(musicScanDir))
|
||||||
{
|
{
|
||||||
if(addFileToTrackDBIfTagged(&sqlSession, p.path()) == ScanResults::ACCEPTED)
|
ScanResults result = addFileToTrackDBIfTagged(&sqlSession, p.path());
|
||||||
|
if(result == ScanResults::ACCEPTED)
|
||||||
{
|
{
|
||||||
Wt::log("info") << p.path().string() << " was added to DB";
|
Wt::log("info") << p.path().string() << " was added to DB";
|
||||||
}
|
}
|
||||||
else
|
else if(result != ScanResults::DUPLICATE_TRACK && result != ScanResults::WRONG_FILETYPE)
|
||||||
{
|
{
|
||||||
Wt::log("info") << p.path().string() + " was not accepted.";
|
Wt::log("info") << p.path().string() + " was not accepted.";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ AdminInterface::AdminInterface(WebInterface* app)
|
|||||||
addBtn->clicked().connect(this, &AdminInterface::addClicked);
|
addBtn->clicked().connect(this, &AdminInterface::addClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AdminInterface::~AdminInterface()
|
||||||
|
{
|
||||||
|
delete addBtn;
|
||||||
|
delete passwordField;
|
||||||
|
delete usernameField;
|
||||||
|
delete userLayout;
|
||||||
|
}
|
||||||
|
|
||||||
void AdminInterface::addClicked()
|
void AdminInterface::addClicked()
|
||||||
{
|
{
|
||||||
Wt::Dbo::Session sqlSession;
|
Wt::Dbo::Session sqlSession;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class AdminInterface : public Wt::WContainerWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AdminInterface(WebInterface* app);
|
AdminInterface(WebInterface* app);
|
||||||
|
~AdminInterface();
|
||||||
WebInterface* app;
|
WebInterface* app;
|
||||||
|
|
||||||
Wt::WHBoxLayout* userLayout;
|
Wt::WHBoxLayout* userLayout;
|
||||||
|
|||||||
@@ -56,6 +56,18 @@ LoginInterface::LoginInterface(WebInterface* app)
|
|||||||
loginContainer->setWidth(Wt::WLength(50, Wt::WLength::Percentage));
|
loginContainer->setWidth(Wt::WLength(50, Wt::WLength::Percentage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoginInterface::~LoginInterface()
|
||||||
|
{
|
||||||
|
delete loginButton;
|
||||||
|
delete passwordField;
|
||||||
|
delete usernameField;
|
||||||
|
delete passwordContainer;
|
||||||
|
delete usernameContainer;
|
||||||
|
delete loginMessage;
|
||||||
|
delete loginLayout;
|
||||||
|
delete loginContainer;
|
||||||
|
}
|
||||||
|
|
||||||
void LoginInterface::checkSessionValidity()
|
void LoginInterface::checkSessionValidity()
|
||||||
{
|
{
|
||||||
Wt::Dbo::Session sqlSession;
|
Wt::Dbo::Session sqlSession;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class LoginInterface : public Wt::WContainerWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LoginInterface(WebInterface* app);
|
LoginInterface(WebInterface* app);
|
||||||
|
~LoginInterface();
|
||||||
void checkSessionValidity();
|
void checkSessionValidity();
|
||||||
void createUser(Wt::Dbo::Session* session, std::string username, std::string rawPassword, bool isAdmin);
|
void createUser(Wt::Dbo::Session* session, std::string username, std::string rawPassword, bool isAdmin);
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -144,6 +144,40 @@ PlayerInterface::PlayerInterface(WebInterface* app)
|
|||||||
voteTracksLayout->addLayout(track3);
|
voteTracksLayout->addLayout(track3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlayerInterface::~PlayerInterface()
|
||||||
|
{
|
||||||
|
// Keep these out until I have a good reason to use.
|
||||||
|
// delete mainDisplay;
|
||||||
|
// delete requestPane;
|
||||||
|
// delete uploadPane;
|
||||||
|
// delete adminPane;
|
||||||
|
// delete track3vote;
|
||||||
|
// delete track2vote;
|
||||||
|
// delete track1vote;
|
||||||
|
// delete track3votecount;
|
||||||
|
// delete track2votecount;
|
||||||
|
// delete track1votecount;
|
||||||
|
// delete track3details;
|
||||||
|
// delete track2details;
|
||||||
|
// delete track1details;
|
||||||
|
// delete voteTracksLayout;
|
||||||
|
// delete voteTracksContainer;
|
||||||
|
// delete votePanel;
|
||||||
|
// delete voteControlContainer;
|
||||||
|
// delete voteMetaLayout;
|
||||||
|
// delete voteMetaContainer;
|
||||||
|
// delete skipRequest;
|
||||||
|
// delete skipDeny;
|
||||||
|
// delete playpause;
|
||||||
|
// delete currentTrackDetails;
|
||||||
|
// delete trackProgress;
|
||||||
|
// delete currentTrackProgress;
|
||||||
|
// delete skipControls;
|
||||||
|
// delete playControlLayout;
|
||||||
|
// delete playControlWidget;
|
||||||
|
// delete interfaceLayout;
|
||||||
|
}
|
||||||
|
|
||||||
void PlayerInterface::playpauseClicked()
|
void PlayerInterface::playpauseClicked()
|
||||||
{
|
{
|
||||||
if(!isPaused)
|
if(!isPaused)
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class PlayerInterface : public Wt::WContainerWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlayerInterface(WebInterface* app);
|
PlayerInterface(WebInterface* app);
|
||||||
|
~PlayerInterface();
|
||||||
WebInterface* app;
|
WebInterface* app;
|
||||||
|
|
||||||
Wt::WVBoxLayout* interfaceLayout;
|
Wt::WVBoxLayout* interfaceLayout;
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ UploadInterface::UploadInterface(WebInterface* app)
|
|||||||
mainLayout->addWidget(logs);
|
mainLayout->addWidget(logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UploadInterface::~UploadInterface()
|
||||||
|
{
|
||||||
|
delete clearLogs;
|
||||||
|
delete logs;
|
||||||
|
delete fileDrop;
|
||||||
|
delete mainLayout;
|
||||||
|
}
|
||||||
|
|
||||||
void UploadInterface::reInitUploadBox()
|
void UploadInterface::reInitUploadBox()
|
||||||
{
|
{
|
||||||
if(fileDrop != nullptr) delete fileDrop;
|
if(fileDrop != nullptr) delete fileDrop;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class UploadInterface : public Wt::WContainerWidget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UploadInterface(WebInterface* app);
|
UploadInterface(WebInterface* app);
|
||||||
|
~UploadInterface();
|
||||||
WebInterface* app;
|
WebInterface* app;
|
||||||
|
|
||||||
Wt::WVBoxLayout* mainLayout;
|
Wt::WVBoxLayout* mainLayout;
|
||||||
|
|||||||
Reference in New Issue
Block a user