1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-04 09:42:45 +00:00

WIP: HttpLoader seems to work, Model still borked

This commit is contained in:
Chris Josten 2021-03-28 04:00:00 +02:00
parent e421adf733
commit 729e343661
1412 changed files with 13967 additions and 33794 deletions

View file

@ -41,6 +41,10 @@
#include "JellyfinQt/dto/songinfo.h"
#include "JellyfinQt/support/jsonconv.h"
namespace Jellyfin {
// Forward declaration
class ApiClient;
}
namespace Jellyfin {
namespace DTO {
@ -57,7 +61,7 @@ public:
static AlbumInfo fromJson(QJsonObject source);
void setFromJson(QJsonObject source);
QJsonObject toJson();
QJsonObject toJson() const;
// Properties
/**
@ -107,11 +111,11 @@ public:
/**
* @brief Gets or sets the provider ids.
*/
std::optional<QJsonObject> providerIds() const;
QJsonObject providerIds() const;
/**
* @brief Gets or sets the provider ids.
*/
void setProviderIds(std::optional<QJsonObject> newProviderIds);
void setProviderIds(QJsonObject newProviderIds);
bool providerIdsNull() const;
void setProviderIdsNull();
@ -166,11 +170,11 @@ public:
/**
* @brief Gets or sets the artist provider ids.
*/
std::optional<QJsonObject> artistProviderIds() const;
QJsonObject artistProviderIds() const;
/**
* @brief Gets or sets the artist provider ids.
*/
void setArtistProviderIds(std::optional<QJsonObject> newArtistProviderIds);
void setArtistProviderIds(QJsonObject newArtistProviderIds);
bool artistProviderIdsNull() const;
void setArtistProviderIdsNull();
@ -187,17 +191,29 @@ protected:
QString m_path;
QString m_metadataLanguage;
QString m_metadataCountryCode;
std::optional<QJsonObject> m_providerIds = std::nullopt;
QJsonObject m_providerIds;
std::optional<qint32> m_year = std::nullopt;
std::optional<qint32> m_indexNumber = std::nullopt;
std::optional<qint32> m_parentIndexNumber = std::nullopt;
QDateTime m_premiereDate;
bool m_isAutomated;
QStringList m_albumArtists;
std::optional<QJsonObject> m_artistProviderIds = std::nullopt;
QJsonObject m_artistProviderIds;
QList<SongInfo> m_songInfos;
};
} // NS DTO
namespace Support {
using AlbumInfo = Jellyfin::DTO::AlbumInfo;
template <>
AlbumInfo fromJsonValue(const QJsonValue &source, convertType<AlbumInfo>);
template<>
QJsonValue toJsonValue(const AlbumInfo &source, convertType<AlbumInfo>);
} // NS DTO
} // NS Jellyfin