Added functionality to check if the song already exists when uploading

This commit is contained in:
kdeng00
2019-11-13 20:22:29 -05:00
parent 3b0f199dca
commit ca1fcb801d
5 changed files with 56 additions and 27 deletions
+3 -2
View File
@@ -4,12 +4,14 @@
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <nlohmann/json.hpp>
#include "dto/SongDto.hpp"
#include "model/Models.h"
#include "type/SongChanged.h"
#include "type/SongUpload.h"
namespace manager {
class SongManager
@@ -17,14 +19,13 @@ namespace manager {
public:
SongManager(const model::BinaryPath&);
std::pair<bool, type::SongUpload> saveSong(model::Song&);
bool didSongChange(const model::Song&, const model::Song&);
bool requiresFilesystemChange(const model::Song&, const model::Song&);
bool deleteSong(model::Song&);
bool updateSong(model::Song&);
void saveSong(model::Song&);
static void printSong(const model::Song&);
private:
std::map<type::SongChanged, bool> changesInSong(const model::Song&, const model::Song&);