Files
soundServe/include/File.h
T
fegger 05bd44a354 Refactor tagging and add library scanning
- 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
2026-06-22 11:00:06 +02:00

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_;
};