Added albumArtist field memeber to Song model. Automatically apply disc value 1 for song's metadata that have an empty disc field. Switched from TagLib::FileRef to TagLib::MPEG::File

This commit is contained in:
kdeng00
2019-11-04 22:26:03 -05:00
parent c7bbdfe581
commit 9b4a0db67a
16 changed files with 236 additions and 231 deletions
+3 -8
View File
@@ -19,6 +19,7 @@
#include "database/AlbumRepository.h"
#include "dto/AlbumDto.hpp"
#include "dto/conversion/DtoConversions.h"
#include "manager/AlbumManager.h"
#include "manager/TokenManager.h"
#include "model/Models.h"
@@ -57,10 +58,7 @@ public:
auto albums = oatpp::data::mapping::type::List<dto::AlbumDto::ObjectWrapper>::createShared();
for (auto& albDb : albsDb) {
auto alb = dto::AlbumDto::createShared();
alb->id = albDb.id;
alb->title = albDb.title.c_str();
alb->year = albDb.year;
auto alb = dto::conversion::DtoConversions::toAlbumDto(albDb);
albums->pushBack(alb);
}
@@ -85,10 +83,7 @@ public:
std::cout << "album exists" << std::endl;
albDb = albRepo.retrieveRecord(albDb, type::AlbumFilter::id);
auto album = dto::AlbumDto::createShared();
album->id = albDb.id;
album->title = albDb.title.c_str();
album->year = albDb.year;
auto album = dto::conversion::DtoConversions::toAlbumDto(albDb);
return createDtoResponse(Status::CODE_200, album);
}