initial Commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "Metadata.h"
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#define MUSIC_FOLDER = {"data/"};
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
class File {
|
||||
public:
|
||||
void importFile( std::string fileName );
|
||||
void importFolder( std::string folderPath );
|
||||
std::vector<std::string> filenames_;
|
||||
private:
|
||||
std::string path_;
|
||||
fs::path musicFolder_ MUSIC_FOLDER;
|
||||
std::string fileName_;
|
||||
fs::path fp_ = musicFolder_ / fileName_;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <taglib/tag.h>
|
||||
|
||||
struct Metadata {
|
||||
TagLib::String artist;
|
||||
TagLib::String title;
|
||||
TagLib::String album;
|
||||
TagLib::String albumArtist;
|
||||
unsigned int year;
|
||||
std::string artwork;
|
||||
TagLib::String genre;
|
||||
unsigned int trackNr;
|
||||
double length;
|
||||
std::string format;
|
||||
unsigned int sampleRate;
|
||||
unsigned int bitRate;
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "Metadata.h"
|
||||
#include <taglib/tstring.h>
|
||||
#include <taglib/fileref.h>
|
||||
|
||||
|
||||
class Tag {
|
||||
public:
|
||||
void readTag( TagLib::FileName fileName );
|
||||
Metadata getMetadata() const;
|
||||
|
||||
std::string& getFilePath() const;
|
||||
private:
|
||||
Metadata metadata_;
|
||||
std::string filePath_;
|
||||
};
|
||||
+95864
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user