Fully functional
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include <string>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "playlist.hpp"
|
||||
#include "video.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
@@ -135,3 +137,15 @@ auto moveAndSortTmpFilesToFolder(const std::string& folder, const std::string& a
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
auto autoDetermineRip(const std::string& musicFolder, const std::string& url) -> bool {
|
||||
if (std::regex_search(url, std::regex("youtube.com/playlist"))) {
|
||||
return Playlist(url).rip(musicFolder);
|
||||
}
|
||||
|
||||
if (std::regex_search(url, std::regex("youtube.com/watch"))) {
|
||||
return Video(url).rip(musicFolder);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user