Mercurial > minori
diff src/gui/window.cc @ 135:0a458cb26ff4
filesystem: move to using std::filesystem after C++17 switch
old compilers will croak compiling this, but it's not like we
*really* need to support them (they probably croak compiling
Qt as well)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 09 Nov 2023 18:01:56 -0500 |
parents | 39521c47c7a3 |
children | 28842a8d0c6b |
line wrap: on
line diff
--- a/src/gui/window.cc Thu Nov 09 13:53:04 2023 -0500 +++ b/src/gui/window.cc Thu Nov 09 18:01:56 2023 -0500 @@ -64,11 +64,13 @@ CreateBars(); QTimer* timer = new QTimer(this); + + /* this is very very stinky */ connect(timer, &QTimer::timeout, this, [this] { NowPlayingPage* page = reinterpret_cast<NowPlayingPage*>(stack->widget(static_cast<int>(Pages::NOW_PLAYING))); - Filesystem::Path p = Track::Media::GetCurrentPlaying(); - std::unordered_map<std::string, std::string> elements = Track::Media::GetFileElements(p); + std::filesystem::path path = Track::Media::GetCurrentPlaying(); + std::unordered_map<std::string, std::string> elements = Track::Media::GetFileElements(path); int id = Anime::db.GetAnimeFromTitle(elements["title"]); if (id <= 0) { page->SetDefault();