Mercurial > minori
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 327:b5d6c27c308f | 328:71396ecb6f7e | 
|---|---|
| 1 #ifndef MINORI_LIBRARY_LIBRARY_H_ | 1 #ifndef MINORI_LIBRARY_LIBRARY_H_ | 
| 2 #define MINORI_LIBRARY_LIBRARY_H_ | 2 #define MINORI_LIBRARY_LIBRARY_H_ | 
| 3 | 3 | 
| 4 #include "library/library.h" | 4 #include "library/library.h" | 
| 5 | 5 | 
| 6 #include <string> | 6 #include <filesystem> | 
| 7 #include <unordered_map> | 7 #include <unordered_map> | 
| 8 | 8 | 
| 9 namespace Library { | 9 namespace Library { | 
| 10 | 10 | 
| 11 // int = anime id, map = episode, paths | 11 class Database { | 
| 12 extern std::unordered_map<int, std::unordered_map<int, std::string>> library; | 12 public: | 
| 13 void Refresh(); | |
| 13 | 14 | 
| 14 void SearchLibraryFolders(); | 15 std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items; | 
| 16 }; | |
| 17 | |
| 18 extern Database db; | |
| 15 | 19 | 
| 16 } // namespace Library | 20 } // namespace Library | 
| 17 | 21 | 
| 18 #endif // MINORI_LIBRARY_LIBRARY_H_ | 22 #endif // MINORI_LIBRARY_LIBRARY_H_ | 
