Cover art record saved in the database. Next is to save the song record to the database and then try to download the song afterwards

This commit is contained in:
kdeng00
2019-08-24 18:41:01 -04:00
parent 9281293fad
commit 1db3eb2f8c
11 changed files with 205 additions and 9 deletions
+5
View File
@@ -1,6 +1,7 @@
#include "managers/coverArtManager.h"
#include "database/coverArtRepository.h"
#include "types/coverFilter.h"
#include "utilities/metadata_retriever.h"
coverArtManager::coverArtManager(const std::string& configPath) : path(configPath)
@@ -16,6 +17,10 @@ Cover coverArtManager::saveCover(const Song& song, std::string& rootPath, const
cov.songTitle = song.title;
coverArtRepository covRepo(path);
std::cout << "saving record to the database" << std::endl;
covRepo.saveRecord(cov);
std::cout << "retrieving record from database" << std::endl;
cov = covRepo.retrieveRecord(cov, coverFilter::songTitle);
return cov;
}