de9db599b9
Change Track members: artwork -> std::string, genre -> TagLib::String, and add year File::readFileTag now takes a Track& and fills artist/title/album/trackNr/year/genre/format/length importFolder sets artwork to <folder>/cover.png Rename Database::addSong to addTrack
23 lines
509 B
C++
23 lines
509 B
C++
#pragma once
|
|
|
|
#include "Containers.h"
|
|
|
|
#include <filesystem>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
class File {
|
|
public:
|
|
void importFile( std::string fileName );
|
|
void importFolder( const std::string& folderPath, std::vector<Track>& tracks );
|
|
void readFileTag( Track& t );
|
|
std::string parseFiletype( const std::string& path );
|
|
|
|
private:
|
|
std::string path_;
|
|
fs::path musicFolder_ = "data/";
|
|
std::string fileName_;
|
|
};
|