From d2ab0a84f2d38a8f730299a249ee1441cec06b37 Mon Sep 17 00:00:00 2001 From: casey langen Date: Wed, 2 May 2018 22:07:41 -0700 Subject: [PATCH] Fixed Linux compile... but getting an "Invalid API Key" error. --- CMakeLists.txt | 4 ++-- src/core/io/HttpClient.h | 6 +----- src/core/support/Common.cpp | 4 ++-- src/musikcube/CMakeLists.txt | 4 +++- src/musikcube/app/layout/SettingsLayout.cpp | 2 +- src/musikcube/app/overlay/LastFmOverlay.cpp | 2 +- src/musikcube/app/overlay/LastFmOverlay.h | 3 ++- src/musikcube/app/util/LastFm.cpp | 4 +--- 8 files changed, 13 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46f5c3cfc..39bc4590e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,9 +55,9 @@ link_directories ( ${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib) if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} curl pthread) + set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} curl pthread crypto) else() - set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} dl curl pthread) + set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} dl curl pthread crypto) endif() include_directories ( diff --git a/src/core/io/HttpClient.h b/src/core/io/HttpClient.h index ea3fcff7c..121a0de48 100644 --- a/src/core/io/HttpClient.h +++ b/src/core/io/HttpClient.h @@ -365,8 +365,4 @@ namespace musik { namespace core { namespace io { } } - template - const T& Stream() { - return this->ostream; - } -} } } \ No newline at end of file +} } } diff --git a/src/core/support/Common.cpp b/src/core/support/Common.cpp index 14a750858..a198d7ffb 100644 --- a/src/core/support/Common.cpp +++ b/src/core/support/Common.cpp @@ -310,10 +310,10 @@ namespace musik { namespace core { #ifdef WIN32 ShellExecuteA(nullptr, nullptr, path.c_str(), nullptr, nullptr, SW_SHOWNORMAL); #elif __APPLE__ - string command = "open " + path; + std::string command = "open " + path; system(command.c_str()); #else - string command = "xdg-open " + path; + std::string command = "xdg-open " + path; system(command.c_str()); #endif } diff --git a/src/musikcube/CMakeLists.txt b/src/musikcube/CMakeLists.txt index 757c5d7a4..143086362 100644 --- a/src/musikcube/CMakeLists.txt +++ b/src/musikcube/CMakeLists.txt @@ -13,6 +13,7 @@ set (CUBE_SRCS ./app/model/DirectoryAdapter.cpp ./app/overlay/BrowseOverlays.cpp ./app/overlay/ColorThemeOverlay.cpp + ./app/overlay/LastFmOverlay.cpp ./app/overlay/LocaleOverlay.cpp ./app/overlay/PlaybackOverlays.cpp ./app/overlay/PlayQueueOverlays.cpp @@ -20,8 +21,9 @@ set (CUBE_SRCS ./app/overlay/PreampOverlay.cpp ./app/overlay/ServerOverlay.cpp ./app/overlay/VisualizerOverlay.cpp - ./app/util/Hotkeys.cpp ./app/util/GlobalHotkeys.cpp + ./app/util/Hotkeys.cpp + ./app/util/LastFm.cpp ./app/util/PreferenceKeys.cpp ./app/util/Playback.cpp ./app/util/UpdateCheck.cpp diff --git a/src/musikcube/app/layout/SettingsLayout.cpp b/src/musikcube/app/layout/SettingsLayout.cpp index 69899e13c..17062bc02 100755 --- a/src/musikcube/app/layout/SettingsLayout.cpp +++ b/src/musikcube/app/layout/SettingsLayout.cpp @@ -256,7 +256,7 @@ void SettingsLayout::OnTransportDropdownActivate(cursespp::TextLabel* label) { } void SettingsLayout::OnLastFmDropdownActivate(cursespp::TextLabel* label) { - LastFmOverlay::Show(); + LastFmOverlay::Start(); } void SettingsLayout::OnPluginsDropdownActivate(cursespp::TextLabel* label) { diff --git a/src/musikcube/app/overlay/LastFmOverlay.cpp b/src/musikcube/app/overlay/LastFmOverlay.cpp index 27f629aac..1d77466fe 100644 --- a/src/musikcube/app/overlay/LastFmOverlay.cpp +++ b/src/musikcube/app/overlay/LastFmOverlay.cpp @@ -55,7 +55,7 @@ static std::map stateToText = { { LastFmOverlay::State::RegisterError, "settings_last_fm_dialog_message_register_error" } }; -void LastFmOverlay::Show() { +void LastFmOverlay::Start() { std::shared_ptr overlay(new LastFmOverlay()); App::Overlays().Push(overlay); } diff --git a/src/musikcube/app/overlay/LastFmOverlay.h b/src/musikcube/app/overlay/LastFmOverlay.h index 2a5632801..5e6a02a89 100644 --- a/src/musikcube/app/overlay/LastFmOverlay.h +++ b/src/musikcube/app/overlay/LastFmOverlay.h @@ -56,7 +56,8 @@ namespace musik { namespace cube { RegisterError = 6 }; - static void Show(); + static void Start(); + virtual ~LastFmOverlay(); virtual void ProcessMessage(musik::core::runtime::IMessage &message); diff --git a/src/musikcube/app/util/LastFm.cpp b/src/musikcube/app/util/LastFm.cpp index d2cdc5fd6..5ce24affb 100644 --- a/src/musikcube/app/util/LastFm.cpp +++ b/src/musikcube/app/util/LastFm.cpp @@ -32,8 +32,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#pragma once - #include "stdafx.h" #include "LastFm.h" #include @@ -233,4 +231,4 @@ namespace musik { namespace cube { namespace lastfm { } } -} } } \ No newline at end of file +} } }