comparison src/library/library.cc @ 383:27c462bc7815

make the "Now Playing" page actually work
author Paper <paper@tflc.us>
date Thu, 06 Nov 2025 07:10:58 -0500
parents 0265e125f680
children
comparison
equal deleted inserted replaced
382:0265e125f680 383:27c462bc7815
53 53
54 void Database::EventHandler(const std::filesystem::path &path, Filesystem::IWatcher::Event event) 54 void Database::EventHandler(const std::filesystem::path &path, Filesystem::IWatcher::Event event)
55 { 55 {
56 std::string bname = path.filename().u8string(); 56 std::string bname = path.filename().u8string();
57 int aid, ep; 57 int aid, ep;
58
59 std::cout << path << '\n';
60 58
61 if (!GetPathAnimeAndEpisode(bname, &aid, &ep)) 59 if (!GetPathAnimeAndEpisode(bname, &aid, &ep))
62 return; 60 return;
63 61
64 switch (event) { 62 switch (event) {
122 void Database::Refresh(int id) 120 void Database::Refresh(int id)
123 { 121 {
124 Refresh(std::optional<int>(id)); 122 Refresh(std::optional<int>(id));
125 } 123 }
126 124
127 // TODO export to JSON 125 // TODO export to JSON on exit
128 126
129 Database db; 127 Database db;
130 128
131 } // namespace Library 129 } // namespace Library