05bd44a354
- Replace `Tag` class with utility helpers for hashing and file type parsing - Change `Track.artwork` from `std::string` to `TagLib::VariantMap` - Add `importArtwork`, rename `importFolder` to `scanFolder` - Add `scanLibrary`, `updateLibrary`, `editMetadata`, and `seek` methods to `Player` hierarchy - Remove obsolete `Tag.h`/`Tag.cpp` files
26 lines
639 B
C++
26 lines
639 B
C++
#pragma once
|
|
|
|
#include "Containers.h"
|
|
|
|
#include <filesystem>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
class File {
|
|
public:
|
|
Track importFile( const std::string& filePath );
|
|
void scanFolder( const std::string& folderPath, std::vector<Track>& tracks );
|
|
void readFileTag( Track& t );
|
|
TagLib::VariantMap importArtwork( Track& t );
|
|
std::string parseFiletype( const std::string& path );
|
|
void updateLibrary();
|
|
uint64_t hashString( Track t );
|
|
|
|
private:
|
|
std::string path_;
|
|
fs::path musicFolder_ = "data/";
|
|
std::string fileName_;
|
|
};
|