From 94ee994112dd15d19d349a30acd17a0aaa77e48d Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 11 Mar 2015 05:15:38 +0100 Subject: [PATCH] Updated TomahawkSettings to handle download folder. --- src/libtomahawk/TomahawkSettings.cpp | 18 ++++++++++++++++++ src/libtomahawk/TomahawkSettings.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/libtomahawk/TomahawkSettings.cpp b/src/libtomahawk/TomahawkSettings.cpp index 568610ec5..d2314ca20 100644 --- a/src/libtomahawk/TomahawkSettings.cpp +++ b/src/libtomahawk/TomahawkSettings.cpp @@ -799,6 +799,24 @@ TomahawkSettings::setWatchForChanges( bool watch ) } +QString +TomahawkSettings::downloadsPath() const +{ + QString musicLocation; + if ( scannerPaths().count() ) + musicLocation = scannerPaths().first(); + + return value( "downloadmanager/path", musicLocation ).toString(); +} + + +void +TomahawkSettings::setDownloadsPath( const QString& path ) +{ + setValue( "downloadmanager/path", path ); +} + + bool TomahawkSettings::httpEnabled() const { diff --git a/src/libtomahawk/TomahawkSettings.h b/src/libtomahawk/TomahawkSettings.h index f518dd759..b49eaad7b 100644 --- a/src/libtomahawk/TomahawkSettings.h +++ b/src/libtomahawk/TomahawkSettings.h @@ -57,6 +57,9 @@ public: uint scannerTime() const; void setScannerTime( uint time ); + QString downloadsPath() const; + void setDownloadsPath( const QString& path ); + uint infoSystemCacheVersion() const; void setInfoSystemCacheVersion( uint version ); uint genericCacheVersion() const;