Added feature to upload all songs from a directory (optional recursive). Need to document the use of it as well as how to even use this CLI
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#ifndef UPLOAD_H_
|
||||
#define UPLOAD_H_
|
||||
|
||||
#include<filesystem>
|
||||
#include<string>
|
||||
#include<vector>
|
||||
|
||||
#include<nlohmann/json.hpp>
|
||||
|
||||
@@ -11,6 +13,8 @@
|
||||
#include"Models/Token.h"
|
||||
#include"Models/UploadForm.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
namespace Syncers
|
||||
{
|
||||
@@ -20,15 +24,22 @@ namespace Syncers
|
||||
Upload();
|
||||
Upload(Models::API);
|
||||
|
||||
void uploadSong(const Models::Token, Models::Song);
|
||||
Models::Song uploadSong(const Models::Token&, Models::Song&);
|
||||
void uploadSongsFromDirectory(const Models::Token&, const std::string&, bool);
|
||||
private:
|
||||
Managers::FileManager fMgr;
|
||||
Models::API api;
|
||||
Models::Song song;
|
||||
|
||||
std::vector<Models::Song> retrieveAllSongsFromDirectory(const std::string&,
|
||||
bool);
|
||||
|
||||
std::string retrieveUrl();
|
||||
|
||||
Models::Song retrieveSongPath(fs::directory_entry&);
|
||||
|
||||
void printSongDetails();
|
||||
void printSongDetails(std::vector<Models::Song>&);
|
||||
void printJsonData(nlohmann::json);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user