koto/desktop/config/library.hpp
Joshua Strobl 62c99ee67c feat: initial database creation, loading
fixes for cartographer and automatically add track to album when adding to artist
2024-10-05 00:03:50 +03:00

32 lines
735 B
C++

#pragma once
#include <filesystem>
#include <string>
#include "includes/toml.hpp"
namespace fs = std::filesystem;
enum class KotoLibraryType {
Audiobooks,
Music,
Podcasts,
};
KotoLibraryType libraryTypeFromString(const std::string& type);
std::string libraryTypeToString(KotoLibraryType type);
class KotoLibraryConfig {
public:
KotoLibraryConfig(std::string name, fs::path path, KotoLibraryType type);
KotoLibraryConfig(const toml::value& v);
~KotoLibraryConfig();
std::string getName();
fs::path getPath();
KotoLibraryType getType();
toml::ordered_value serialize();
private:
std::string i_name;
fs::path i_path;
KotoLibraryType i_type;
};