From b5921221924438a6294aad2db6fd9b973563ce1b Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 5 Mar 2022 05:07:35 -0500 Subject: [PATCH] Added xdg and Windows paths to spotifyd .conf detection (#154) https://github.com/Spotifyd/spotifyd/blob/master/docs/src/config/File.md#configuration-file <- xdg paths https://github.com/Spotifyd/spotifyd/pull/602#issue-637236835 <- Windows paths --- src/settingspage/spotify.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/settingspage/spotify.cpp b/src/settingspage/spotify.cpp index 0d40e12bf..5b086267d 100644 --- a/src/settingspage/spotify.cpp +++ b/src/settingspage/spotify.cpp @@ -311,10 +311,12 @@ void SettingsPage::Spotify::startClientToggle(int state) auto SettingsPage::Spotify::sptConfigExists() -> bool { - // Config is either ~/.config/spotifyd/spotifyd.conf or /etc/spotifyd/spotifyd.conf + // Config is either ~/.config/spotifyd/spotifyd.conf or /etc/spotifyd/spotifyd.conf or /etc/xdg/spotifyd/spotifyd.conf or ~\AppData\Roaming\spotifyd\spotifyd.conf return QFile(QString("%1/.config/spotifyd/spotifyd.conf") .arg(QStandardPaths::standardLocations(QStandardPaths::HomeLocation)[0])).exists() - || QFile("/etc/spotifyd/spotifyd.conf").exists(); + || QFile("/etc/spotifyd/spotifyd.conf").exists() + || QFile("/etc/xdg/spotifyd/spotifyd.conf").exists() + || QFile("%1\\AppData\\Roaming\\spotifyd\\spotifyd.conf").exists(); } auto SettingsPage::Spotify::backends() -> QStringList