initial Commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user