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
@@ -6,6 +6,7 @@
#include <nlohmann/json.hpp>
#include "database/songRepository.h"
#include "managers/coverArtManager.h"
#include "managers/directory_manager.h"
#include "utilities/metadata_retriever.h"
@@ -34,6 +35,10 @@ void song_manager::saveSong(Song& song)
stockCoverPath.append("/CoverArt.png");
auto cov = covMgr.saveCover(song, coverRootPath, stockCoverPath);
song.coverArtId = cov.id;
songRepository songRepo(exe_path);
songRepo.saveRecord(song);
}
void song_manager::printSong(const Song& song)