37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
#include "include/Tag.h"
|
|
#include "include/File.h"
|
|
|
|
//#include <filesystem>
|
|
#include <iostream>
|
|
|
|
#include <taglib/fileref.h>
|
|
|
|
//namespace fs = std::filesystem;
|
|
|
|
int main() {
|
|
File file;
|
|
Tag tag;
|
|
//fs::path folderPath{ "data" };
|
|
file.importFolder( "/home/fegger/Projects/soundServe/data/" );
|
|
for ( auto& fp : file.filenames_) {
|
|
std::cout << fp << "\n";
|
|
}
|
|
|
|
for ( auto& file : file.filenames_ ) {
|
|
const char* fp = file.c_str();
|
|
tag.readTag( fp );
|
|
Metadata meta = tag.getMetadata();
|
|
std::cout << "Artist: " << meta.artist
|
|
<< "\nTitle: " << meta.title
|
|
<< "\nAlbum: " << meta.album
|
|
<< "\nTrack: " << meta.trackNr
|
|
<< "\nYear: " << meta.year
|
|
<< "\nGenre: " << meta.genre
|
|
<< "\nSamplerate: " << meta.sampleRate
|
|
<< "\nBitrate: " << meta.bitRate
|
|
<< "\nLength: " << meta.length;
|
|
std::cout << "\n----------------------------------------------------------------------\n";
|
|
}
|
|
return 0;
|
|
}
|