Mercurial > minori
diff src/gui/window.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 | 47c9f8502269 |
| children |
line wrap: on
line diff
--- a/src/gui/window.cc Thu Nov 06 03:16:55 2025 -0500 +++ b/src/gui/window.cc Thu Nov 06 07:10:58 2025 -0500 @@ -107,9 +107,15 @@ sidebar_.SetCurrentItem(static_cast<int>(Pages::ANIME_LIST)); setCentralWidget(&main_widget_); + /* This is disgusting */ NowPlayingPage *page = reinterpret_cast<NowPlayingPage *>(stack_.widget(static_cast<int>(Pages::NOW_PLAYING))); connect(&playing_thread_, &MainWindowPlayingThread::Done, this, [page](const std::vector<std::string> &files) { + if (!files.size()) { + page->SetDefault(); + return; + } + for (const auto &file : files) { anitomy::Anitomy anitomy; anitomy.Parse(file); @@ -135,6 +141,7 @@ }); #ifdef MACOSX + /* Anitomy needs specific permissions for window title grabbing */ if (!osx::AskForPermissions()) return; #endif
