#include <cstdlib>
#include "networkaccess.h"
#include "diskcache.h"
+#include "compatibility/pathsservice.h"
namespace The {
maybeSetSystemProxy();
nam = new QNetworkAccessManager();
QNetworkDiskCache *cache = new DiskCache();
-#if QT_VERSION >= 0x050000
- QString cacheLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/qt5";
-#else
- QString cacheLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
-#endif
- cache->setCacheDirectory(cacheLocation);
+ cache->setCacheDirectory(Paths::getCacheLocation());
nam->setCache(cache);
}
return nam;
}
const QString & YTChannel::getThumbnailDir() {
- static const QString thumbDir = Paths::getDataLocation() + "/channels/";
+ static const QString thumbDir = Paths::getCacheLocation() + "/channels/";
return thumbDir;
}