first commit
This commit is contained in:
@@ -4,6 +4,50 @@
|
||||
#include <QDateTime>
|
||||
#include "imagestructs.h"
|
||||
#include <QVector>
|
||||
#include <vector>
|
||||
|
||||
struct ImmichConfig {
|
||||
bool enabled = false;
|
||||
std::string url = "";
|
||||
std::string apiKey = "";
|
||||
std::vector<std::string> albumIds;
|
||||
std::string size = "fullsize";
|
||||
std::string order = "desc";
|
||||
int pageSize = 200;
|
||||
int maxAssets = 1000;
|
||||
std::string cachePath = "";
|
||||
int cacheMaxMB = 512;
|
||||
bool includeArchived = false;
|
||||
|
||||
bool operator==(const ImmichConfig &b) const
|
||||
{
|
||||
if (enabled != b.enabled)
|
||||
return false;
|
||||
if (url != b.url || apiKey != b.apiKey)
|
||||
return false;
|
||||
if (size != b.size || order != b.order)
|
||||
return false;
|
||||
if (pageSize != b.pageSize || maxAssets != b.maxAssets)
|
||||
return false;
|
||||
if (cachePath != b.cachePath || cacheMaxMB != b.cacheMaxMB)
|
||||
return false;
|
||||
if (includeArchived != b.includeArchived)
|
||||
return false;
|
||||
if (albumIds.size() != b.albumIds.size())
|
||||
return false;
|
||||
for (size_t i = 0; i < albumIds.size(); ++i)
|
||||
{
|
||||
if (albumIds[i] != b.albumIds[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(const ImmichConfig &b) const
|
||||
{
|
||||
return !operator==(b);
|
||||
}
|
||||
};
|
||||
|
||||
// configuration options that apply to an image/folder of images
|
||||
struct Config {
|
||||
@@ -21,6 +65,7 @@ struct PathEntry {
|
||||
std::string imageList = "";
|
||||
bool exclusive = false; // only use this entry when it is valid, skip others
|
||||
|
||||
ImmichConfig immich;
|
||||
bool recursive = false;
|
||||
bool shuffle = false;
|
||||
bool sorted = false;
|
||||
@@ -40,6 +85,8 @@ struct PathEntry {
|
||||
return true;
|
||||
if (b.path != path || b.imageList != imageList)
|
||||
return true;
|
||||
if (b.immich != immich)
|
||||
return true;
|
||||
if (b.baseDisplayOptions.timeWindows.count() != baseDisplayOptions.timeWindows.count())
|
||||
return true;
|
||||
for(int i = 0; i < baseDisplayOptions.timeWindows.count(); ++i)
|
||||
@@ -83,4 +130,4 @@ Config getConfigurationForFolder(const std::string &folderPath, const Config &cu
|
||||
ImageAspectScreenFilter parseAspectFromString(char aspect);
|
||||
QString getAppConfigFilePath(const std::string &configPath);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user