diff --git a/sound_serve.db b/sound_serve.db index 08668b6..e27ca13 100644 Binary files a/sound_serve.db and b/sound_serve.db differ diff --git a/src/Database.cpp b/src/Database.cpp index ac9c321..b287255 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -252,7 +252,7 @@ std::optional db::getAlbumId( const std::string& albumTitle ) { if (sqlite3_step( stmt ) == SQLITE_ROW ) { id = sqlite3_column_int( stmt, 0 ); } - + return id; } std::optional db::getArtistId( const std::string& artistName ) { @@ -264,8 +264,9 @@ std::optional db::getArtistId( const std::string& artistName ) { std::optional id; if (sqlite3_step( stmt ) == SQLITE_ROW ) { - id = sqlite3_column_int( stmt, 0 ); + return sqlite3_column_int( stmt, 0 ); } + return id; } std::optional db::getGenreId( const std::string& genre ) { @@ -279,4 +280,5 @@ std::optional db::getGenreId( const std::string& genre ) { if (sqlite3_step( stmt ) == SQLITE_ROW ) { id = sqlite3_column_int( stmt, 0 ); } + return id; } diff --git a/src/PlayerLocal.cpp b/src/PlayerLocal.cpp index e96b7ba..8530f8f 100644 --- a/src/PlayerLocal.cpp +++ b/src/PlayerLocal.cpp @@ -4,7 +4,6 @@ #include "../include/Database.h" #include "../include/Containers.h" -#include using db = Database;