diff include/library/library.h @ 328:71396ecb6f7e

library: convert to class + database it also stores std::filesystem::paths now...
author Paper <paper@paper.us.eu.org>
date Fri, 14 Jun 2024 00:37:45 -0400
parents 3ec7804abf17
children 886f66775f31
line wrap: on
line diff
--- a/include/library/library.h	Thu Jun 13 01:49:18 2024 -0400
+++ b/include/library/library.h	Fri Jun 14 00:37:45 2024 -0400
@@ -3,15 +3,19 @@
 
 #include "library/library.h"
 
-#include <string>
+#include <filesystem>
 #include <unordered_map>
 
 namespace Library {
 
-// int = anime id, map = episode, paths
-extern std::unordered_map<int, std::unordered_map<int, std::string>> library;
+class Database {
+public:
+	void Refresh();
 
-void SearchLibraryFolders();
+	std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items;
+};
+
+extern Database db;
 
 } // namespace Library