Add support for storing and serving the new comic filters format

It's already implemented on iOS and next is supporting it on Android.
This commit is contained in:
Luis Ángel San Martín
2025-06-14 09:56:33 +02:00
parent a4ab11d44d
commit b7fb45a331
10 changed files with 191 additions and 40 deletions

View File

@ -39,9 +39,9 @@ public:
int bookmark1;
int bookmark2;
int bookmark3;
int brightness;
int contrast;
int gamma;
[[deprecated("Use imageFiltersJson")]] int brightness;
[[deprecated("Use imageFiltersJson")]] int contrast;
[[deprecated("Use imageFiltersJson")]] int gamma;
//-----------------
QVariant title; // string
@ -104,6 +104,12 @@ public:
QVariant review; // string
QVariant tags; // string/list
QVariant imageFiltersJson; // string, JSON with image filters
QVariant lastTimeImageFiltersSet; // integer/date, last time image filters were set
QVariant lastTimeCoverSet; // integer/date, last time cover was set
QVariant usesExternalCover; // bool, whether the cover is external or not
QVariant lastTimeMetadataSet; // integer/date, last time metadata was set
QPixmap getCover(const QString &basePath);
Q_INVOKABLE QStringList getWriters();
@ -208,6 +214,12 @@ public:
Q_PROPERTY(QVariant review MEMBER review CONSTANT)
Q_PROPERTY(QVariant tags MEMBER tags CONSTANT)
Q_PROPERTY(QVariant imageFiltersJson MEMBER imageFiltersJson CONSTANT)
Q_PROPERTY(QVariant lastTimeImageFiltersSet MEMBER lastTimeImageFiltersSet CONSTANT)
Q_PROPERTY(QVariant lastTimeCoverSet MEMBER lastTimeCoverSet CONSTANT)
Q_PROPERTY(QVariant usesExternalCover MEMBER usesExternalCover CONSTANT)
Q_PROPERTY(QVariant lastTimeMetadataSet MEMBER lastTimeMetadataSet CONSTANT)
//-new properties, not loaded from the DB automatically
bool isFavorite;
Q_PROPERTY(bool isFavorite MEMBER isFavorite WRITE setFavorite NOTIFY favoriteChanged)