diff options
Diffstat (limited to 'music.cpp')
-rw-r--r-- | music.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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>()); |