39 lines
903 B
C++
39 lines
903 B
C++
|
/* mcopy
|
||
|
*
|
||
|
* Rename music by specifying a format
|
||
|
* Licensed under the GNU General Public License version 3.
|
||
|
* See included LICENSE file for copyright and license details.
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
|
||
|
namespace mcopy {
|
||
|
struct Settings {
|
||
|
bool ask{true};
|
||
|
bool quiet{false};
|
||
|
bool strict{false};
|
||
|
bool skip_existing{false};
|
||
|
};
|
||
|
|
||
|
struct FileData {
|
||
|
std::string title{};
|
||
|
std::string album{};
|
||
|
std::string artist{};
|
||
|
std::string track{};
|
||
|
std::string year{};
|
||
|
std::string genre{};
|
||
|
std::string comment{};
|
||
|
std::string extension{};
|
||
|
};
|
||
|
|
||
|
enum class FileStatus {
|
||
|
Success,
|
||
|
Failure,
|
||
|
};
|
||
|
|
||
|
std::pair<FileStatus, FileData> get_metadata_from_file(const std::string& file);
|
||
|
void write_to_file(const Settings& settings, const std::string& format, const std::string& file);
|
||
|
};
|