Removed some old testing code

This commit is contained in:
casey langen 2020-10-06 02:28:40 -07:00
parent ab3b425281
commit 3d170d4127
2 changed files with 2 additions and 6 deletions

View File

@ -38,7 +38,6 @@
#include <core/support/Auddio.h> #include <core/support/Auddio.h>
#include <core/support/Common.h> #include <core/support/Common.h>
#include <core/library/query/LyricsQuery.h> #include <core/library/query/LyricsQuery.h>
#include <core/library/RemoteLibrary.h>
#include <cursespp/App.h> #include <cursespp/App.h>
#include <cursespp/Screen.h> #include <cursespp/Screen.h>
#include <cursespp/ToastOverlay.h> #include <cursespp/ToastOverlay.h>
@ -72,9 +71,6 @@ LyricsLayout::LyricsLayout(PlaybackService& playback, ILibraryPtr library)
this->AddWindow(this->infoText); this->AddWindow(this->infoText);
this->LoadLyricsForCurrentTrack(); this->LoadLyricsForCurrentTrack();
this->remoteLibrary = musik::core::library::RemoteLibrary::Create("remote", 0xdeadbeef);
this->remoteLibrary->SetMessageQueue(Window::MessageQueue());
} }
void LyricsLayout::OnLayout() { void LyricsLayout::OnLayout() {
@ -141,7 +137,7 @@ void LyricsLayout::LoadLyricsForCurrentTrack() {
this->SetState(State::Loading); this->SetState(State::Loading);
auto trackExternalId = track->GetString("external_id"); auto trackExternalId = track->GetString("external_id");
auto lyricsDbQuery = std::make_shared<LyricsQuery>(trackExternalId); auto lyricsDbQuery = std::make_shared<LyricsQuery>(trackExternalId);
this->remoteLibrary->Enqueue(lyricsDbQuery, 0, [this, lyricsDbQuery, track](auto q) { this->library->Enqueue(lyricsDbQuery, 0, [this, lyricsDbQuery, track](auto q) {
auto localLyrics = lyricsDbQuery->GetResult(); auto localLyrics = lyricsDbQuery->GetResult();
if (localLyrics.size()) { if (localLyrics.size()) {
this->OnLyricsLoaded(track, localLyrics); this->OnLyricsLoaded(track, localLyrics);

View File

@ -36,7 +36,7 @@ namespace musik { namespace cube {
void UpdateAdapter(const std::string& lyrics); void UpdateAdapter(const std::string& lyrics);
State state { State::NotPlaying }; State state { State::NotPlaying };
musik::core::ILibraryPtr library, remoteLibrary; musik::core::ILibraryPtr library;
musik::core::audio::PlaybackService& playback; musik::core::audio::PlaybackService& playback;
std::shared_ptr<cursespp::SimpleScrollAdapter> adapter; std::shared_ptr<cursespp::SimpleScrollAdapter> adapter;
std::shared_ptr<cursespp::ListWindow> listView; std::shared_ptr<cursespp::ListWindow> listView;