From 0dea7c3dad15f397600458ae9a81af29e95752fa Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 30 Apr 2022 21:12:44 +0200 Subject: Make 'super' database, encapsulating both the krecipes one and the gourmet one. Add small vignettes to the recipe list images to indicate from which soucre each item is coming from. --- src/database_krecipes.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/database_krecipes.cc') diff --git a/src/database_krecipes.cc b/src/database_krecipes.cc index fceb59c..bf764b2 100644 --- a/src/database_krecipes.cc +++ b/src/database_krecipes.cc @@ -81,6 +81,7 @@ std::deque DatabaseKrecipes::getRecipes() if(result == SQLITE_ROW) { + item.db = DatabaseSource::KRecipes; item.id = sqlite3_column_int(statement, 0); item.title = getString(statement, 1); @@ -96,7 +97,7 @@ std::deque DatabaseKrecipes::getRecipes() return items; } -Recipe DatabaseKrecipes::getRecipe(std::uint64_t id) +Recipe DatabaseKrecipes::getRecipe(int id) { bool found{false}; Recipe recipe; @@ -119,6 +120,7 @@ Recipe DatabaseKrecipes::getRecipe(std::uint64_t id) if(result == SQLITE_ROW) { + recipe.db = DatabaseSource::KRecipes; recipe.id = sqlite3_column_int(statement, 0); recipe.title = getString(statement, 1); recipe.description = {}; // not used by krecipes -- cgit v1.2.3