about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/sqliteinterface.cpp9
-rw-r--r--src/sqliteinterface.hpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/sqliteinterface.cpp b/src/sqliteinterface.cpp
index 87cb854..ec1a978 100644
--- a/src/sqliteinterface.cpp
+++ b/src/sqliteinterface.cpp
@@ -3,7 +3,9 @@
 #include <cstring>
 #include <filesystem>
 #include <stdexcept>
+
 #include "sqliteinterface.hpp"
+#include "video.hpp"
 
 namespace fs = std::filesystem;
 using namespace std;
@@ -27,6 +29,7 @@ void SqliteInterface::openDB()
     }
 
     fs::path filename = appdata / "ytcpp.db";
+    cout << filename.c_str() << endl;
     int rc = sqlite3_open(filename.c_str(), &db);
 
     if (rc)
@@ -42,6 +45,7 @@ void SqliteInterface::closeDB()
 {
 
     sqlite3_close(db);
+    db = nullptr;
 }
 
 static int callback(void *NotUsed, int argc, char **argv, char **azColName) {
@@ -67,6 +71,11 @@ void SqliteInterface::createTables()
 
 }
 
+void SqliteInterface::saveVideo() {
+
+
+}
+
 SqliteInterface::SqliteInterface()
 {
 
diff --git a/src/sqliteinterface.hpp b/src/sqliteinterface.hpp
index 5be355e..617ebd3 100644
--- a/src/sqliteinterface.hpp
+++ b/src/sqliteinterface.hpp
@@ -10,6 +10,7 @@ class SqliteInterface {
         void openDB();
         void closeDB();
         void createTables();
+        void saveVideo();
     private:
         sqlite3* db;
 };