diff include/library/library.h @ 366:886f66775f31

animone: add preliminary AT-SPI stuff anime_list: finish the regular singular right click menu
author Paper <paper@tflc.us>
date Sun, 17 Nov 2024 19:56:01 -0500
parents 71396ecb6f7e
children
line wrap: on
line diff
--- a/include/library/library.h	Wed Oct 02 23:06:43 2024 -0400
+++ b/include/library/library.h	Sun Nov 17 19:56:01 2024 -0500
@@ -3,16 +3,23 @@
 
 #include "library/library.h"
 
+#include <optional>
 #include <filesystem>
 #include <unordered_map>
 
 namespace Library {
 
-class Database {
+class Database final {
 public:
+	std::optional<std::filesystem::path> GetAnimeFolder(int id);
 	void Refresh();
+	void Refresh(int id);
 
+	// Anime episodes. Indexed as `folders[id][episode]'
 	std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items;
+
+private:
+	void Refresh(std::optional<int> find_id);
 };
 
 extern Database db;