summaryrefslogtreecommitdiff
path: root/music.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'music.cpp')
-rw-r--r--music.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/music.cpp b/music.cpp
index 5292e66..295f5e4 100644
--- a/music.cpp
+++ b/music.cpp
@@ -7,6 +7,8 @@
#include <boost/format.hpp>
#include <boost/algorithm/string/predicate.hpp>
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/split.hpp>
#include <boost/filesystem/fstream.hpp>
#include <soci/soci.h>
@@ -49,6 +51,12 @@ MusicListing::p music::get(const std::vector<std::string>& path) {
return MusicListing::p();
}
+MusicListing::p music::get(const std::string& path) {
+ std::vector<std::string> path_vector;
+ boost::algorithm::split(path_vector, path, boost::algorithm::is_any_of("/\\"));
+ return get(path_vector);
+}
+
std::vector<MusicListing::p> music::find_artist(const std::string artist) {
soci::session sql(config::vm["audist.database"].as<std::string>());