From e0693475d735810f6f9b83b26e81c0bd57a28d8b Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 20 May 2012 16:24:08 -0400 Subject: [PATCH] Don't re-install spotify on each restart on windows ;) --- src/accounts/spotify/SpotifyAccount.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/accounts/spotify/SpotifyAccount.cpp b/src/accounts/spotify/SpotifyAccount.cpp index cfbb34bc6..39c957238 100644 --- a/src/accounts/spotify/SpotifyAccount.cpp +++ b/src/accounts/spotify/SpotifyAccount.cpp @@ -158,12 +158,16 @@ SpotifyAccount::hookupResolver() } -bool SpotifyAccount::checkForResolver() +bool +SpotifyAccount::checkForResolver() { -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) const QDir path = QCoreApplication::applicationDirPath(); QFile file( path.absoluteFilePath( "spotify_tomahawkresolver" ) ); return file.exists(); +#else if defined(Q_OS_WIN) + QDir appDataDir = TomahawkUtils::appDataDir(); + return appDataDir.exists( QString( "atticaresolvers/%1/spotify_tomahawkresolver.exe" ).arg( s_resolverId ) ); #endif return false;