Skip to content

Commit

Permalink
Added xdg and Windows paths to spotifyd .conf detection (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
brian6932 authored Mar 5, 2022
1 parent a687284 commit b592122
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/settingspage/spotify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b592122

Please sign in to comment.