Starting to switch Metadata portion to c++. Switching from TagLibSharp to Taglib (c++)
This commit is contained in:
+3
-1
@@ -7,12 +7,14 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(SOURCES
|
||||
src/directory_manager.cpp
|
||||
src/metadata_retriever.cpp
|
||||
)
|
||||
set(HEADERS
|
||||
include/models.h
|
||||
include/directory_manager.h
|
||||
include/metadata_retriever.h
|
||||
)
|
||||
|
||||
add_library(icarus SHARED ${SOURCES} ${HEADERS})
|
||||
include_directories(include)
|
||||
target_link_libraries(icarus "-lstdc++fs")
|
||||
target_link_libraries(icarus "-lstdc++fs" tag)
|
||||
|
||||
@@ -3,3 +3,10 @@
|
||||
#include <string>
|
||||
|
||||
std::string create_directory_process(Song, const char*);
|
||||
std::string read_cover_art(const char*);
|
||||
|
||||
void copy_stock_to_root(const char*, const std::string);
|
||||
void copy_song_to_path(const char*, const char*);
|
||||
void delete_cover_art_file(const std::string);
|
||||
void delete_directories(Song song, const char*);
|
||||
void delete_song(Song song);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "models.h"
|
||||
|
||||
Song fetch_metadata(const char*);
|
||||
@@ -0,0 +1,26 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "metadata_retriever.h"
|
||||
|
||||
Song fetch_metadata(const char *song_path)
|
||||
{
|
||||
Song sng;
|
||||
std::string title = "ddd";
|
||||
sng.Title = (char*)title.c_str();
|
||||
sng.SongPath = (char*)song_path;
|
||||
|
||||
return sng;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
Song retrieve_metadata(const char*);
|
||||
|
||||
Song retrieve_metadata(const char* song_path)
|
||||
{
|
||||
return fetch_metadata(song_path);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user