2023-07-19 22:12:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
#include "flactomp3.h"
|
|
|
|
|
2023-07-21 21:32:24 +00:00
|
|
|
class TaskManager;
|
|
|
|
|
2023-07-19 22:12:18 +00:00
|
|
|
class Collection {
|
|
|
|
public:
|
2023-07-21 21:32:24 +00:00
|
|
|
Collection(const std::string& path, TaskManager* tm = nullptr);
|
|
|
|
Collection(const std::filesystem::path& path, TaskManager* tm = nullptr);
|
2023-07-19 22:12:18 +00:00
|
|
|
~Collection();
|
|
|
|
|
|
|
|
void list() const;
|
|
|
|
uint32_t countMusicFiles() const;
|
2023-07-21 21:32:24 +00:00
|
|
|
void convert(const std::string& outPath);
|
2023-07-19 22:12:18 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
static bool isMusic(const std::filesystem::path& path);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::filesystem::path path;
|
|
|
|
mutable uint32_t countMusical;
|
|
|
|
mutable bool counted;
|
2023-07-21 21:32:24 +00:00
|
|
|
TaskManager* taskManager;
|
2023-07-19 22:12:18 +00:00
|
|
|
};
|
|
|
|
|