Fully functional

This commit is contained in:
2026-08-20 11:29:41 -06:00
parent 98d54c58a0
commit 280c84ac6e
3 changed files with 24 additions and 16 deletions
+14
View File
@@ -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;
}