mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
[3/3] update openapi spec: update code interacting with generated code
Adjusted C++ code to handle with new and renamed objects, as well as properties with different types. As a result of changing types, the QML side had to be updated as well. I hope I found everything by manually testing. Additionally, the Qt Quick application has been updated to test the remote sessions more easily and to make it launch again.
This commit is contained in:
parent
9e1a20cd3a
commit
0c72906f88
39 changed files with 366 additions and 317 deletions
|
@ -248,8 +248,8 @@ extern template int extractTotalRecordCount(const QList<DTO::BaseItemDto> &resul
|
|||
extern template void setRequestLimit(Loader::GetLatestMediaParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetLatestMediaParams ¶ms, int offset);
|
||||
|
||||
extern template void setRequestLimit(Loader::GetItemsByUserIdParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetItemsByUserIdParams ¶ms, int offset);
|
||||
extern template void setRequestLimit(Loader::GetItemsParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetItemsParams ¶ms, int offset);
|
||||
|
||||
extern template void setRequestLimit(Loader::GetResumeItemsParams ¶ms, int limit);
|
||||
extern template bool setRequestStartIndex(Loader::GetResumeItemsParams ¶ms, int offset);
|
||||
|
@ -332,7 +332,6 @@ protected:
|
|||
R result = m_loader->result();
|
||||
QList<D> records = extractRecords<D, R>(result);
|
||||
int totalRecordCount = extractTotalRecordCount<R>(result);
|
||||
qDebug() << "Total record count: " << totalRecordCount << ", records in request: " << records.size();
|
||||
// If totalRecordCount < 0, it is not supported for this endpoint
|
||||
if (totalRecordCount < 0) {
|
||||
totalRecordCount = records.size();
|
||||
|
@ -549,7 +548,6 @@ protected:
|
|||
void loadingFinished() override {
|
||||
Q_ASSERT(m_loader != nullptr);
|
||||
std::pair<QList<T*>, int> result = m_loader->result();
|
||||
qDebug() << "Results loaded: index: " << result.second << ", count: " << result.first.size();
|
||||
if (result.second == -1) {
|
||||
clear();
|
||||
} else if (result.second == m_array.size()) {
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Jellyfin {
|
|||
namespace DTO {
|
||||
class UserItemDataDto;
|
||||
class PlaystateRequest;
|
||||
class SessionInfo;
|
||||
class SessionInfoDto;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,14 +43,14 @@ signals:
|
|||
* @param itemId The id of the item which was updated.
|
||||
* @param userData The new userData
|
||||
*/
|
||||
void itemUserDataUpdated(const QString &itemId, const DTO::UserItemDataDto &userData);
|
||||
void itemUserDataUpdated(const QString &itemId, const Jellyfin::DTO::UserItemDataDto &userData);
|
||||
|
||||
/**
|
||||
* @brief The information about a session has been updated
|
||||
* @param sessionId The id of the session
|
||||
* @param sessionInfo The associated information
|
||||
*/
|
||||
void sessionInfoUpdated(const QString &sessionId, const DTO::SessionInfo &sessionInfo);
|
||||
void sessionInfoUpdated(const QString &sessionId, const Jellyfin::DTO::SessionInfoDto &sessionInfo);
|
||||
|
||||
/**
|
||||
* @brief The server has requested to display an message to the user
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <QScopedPointer>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "JellyfinQt/dto/sessioninfo.h"
|
||||
#include "JellyfinQt/dto/sessioninfodto.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
|
||||
|
@ -105,7 +105,7 @@ private:
|
|||
class ControllableJellyfinSession : public ControllableSession {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllableJellyfinSession(QSharedPointer<DTO::SessionInfo> info, ApiClient &apiClient, QObject *parent = nullptr);
|
||||
ControllableJellyfinSession(QSharedPointer<DTO::SessionInfoDto> info, ApiClient &apiClient, QObject *parent = nullptr);
|
||||
QString id() const override;
|
||||
QString name() const override;
|
||||
QString appName() const override;
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
QString userName() const override;
|
||||
PlaybackManager *createPlaybackManager() const override;
|
||||
private:
|
||||
QSharedPointer<DTO::SessionInfo> m_data;
|
||||
QSharedPointer<DTO::SessionInfoDto> m_data;
|
||||
ApiClient &m_apiClient;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <JellyfinQt/dto/generalcommandtype.h>
|
||||
#include <JellyfinQt/dto/playcommand.h>
|
||||
#include <JellyfinQt/dto/playstatecommand.h>
|
||||
#include <JellyfinQt/dto/sessioninfo.h>
|
||||
#include <JellyfinQt/dto/sessioninfodto.h>
|
||||
#include <JellyfinQt/model/playbackmanager.h>
|
||||
#include <JellyfinQt/support/loader.h>
|
||||
|
||||
|
@ -69,7 +69,7 @@ public slots:
|
|||
void seek(qint64 pos) override;
|
||||
private slots:
|
||||
void onPositionTimerFired();
|
||||
void onSessionInfoUpdated(const QString &sessionId, const DTO::SessionInfo &sessionInfo);
|
||||
void onSessionInfoUpdated(const QString &sessionId, const DTO::SessionInfoDto &sessionInfo);
|
||||
private:
|
||||
void sendPlaystateCommand(DTO::PlaystateCommand command, qint64 seekTicks = -1);
|
||||
void sendGeneralCommand(DTO::GeneralCommandType command, QJsonObject arguments = QJsonObject());
|
||||
|
@ -88,7 +88,7 @@ private:
|
|||
void updateQueue(QList<QueueItem> itemIds);
|
||||
ApiClient &m_apiClient;
|
||||
QString m_sessionId;
|
||||
std::optional<DTO::SessionInfo> m_lastSessionInfo;
|
||||
std::optional<DTO::SessionInfoDto> m_lastSessionInfo;
|
||||
QTimer *m_positionTimer;
|
||||
qint64 m_position = 0;
|
||||
};
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
Q_PROPERTY(QString playlistItemId READ playlistItemId NOTIFY playlistItemIdChanged)
|
||||
Q_PROPERTY(QDateTime dateCreated READ dateCreated NOTIFY dateCreatedChanged)
|
||||
Q_PROPERTY(QDateTime dateLastMediaAdded READ dateLastMediaAdded NOTIFY dateLastMediaAddedChanged)
|
||||
Q_PROPERTY(QString extraType READ extraType NOTIFY extraTypeChanged)
|
||||
Q_PROPERTY(Jellyfin::DTO::ExtraTypeClass::Value extraType READ extraType NOTIFY extraTypeChanged)
|
||||
Q_PROPERTY(int airsBeforeSeasonNumber READ airsBeforeSeasonNumber NOTIFY airsBeforeSeasonNumberChanged)
|
||||
Q_PROPERTY(int airsAfterSeasonNumber READ airsAfterSeasonNumber NOTIFY airsAfterSeasonNumberChanged)
|
||||
Q_PROPERTY(int airsBeforeEpisodeNumber READ airsBeforeEpisodeNumber NOTIFY airsBeforeEpisodeNumberChanged)
|
||||
|
@ -143,7 +143,7 @@ public:
|
|||
Q_PROPERTY(int indexNumber READ indexNumber NOTIFY indexNumberChanged)
|
||||
Q_PROPERTY(int indexNumberEnd READ indexNumberEnd NOTIFY indexNumberEndChanged)
|
||||
Q_PROPERTY(bool isFolder READ isFolder NOTIFY isFolderChanged)
|
||||
Q_PROPERTY(QString type READ type NOTIFY typeChanged)
|
||||
Q_PROPERTY(Jellyfin::DTO::BaseItemKindClass::Value type READ type NOTIFY typeChanged)
|
||||
Q_PROPERTY(QString parentBackdropItemId READ parentBackdropItemId NOTIFY parentBackdropItemIdChanged)
|
||||
Q_PROPERTY(QStringList parentBackdropImageTags READ parentBackdropImageTags NOTIFY parentBackdropImageTagsChanged)
|
||||
Q_PROPERTY(Jellyfin::ViewModel::UserData *userData READ userData NOTIFY userDataChanged)
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
Q_PROPERTY(double primaryImageAspectRatio READ primaryImageAspectRatio NOTIFY primaryImageAspectRatioChanged)
|
||||
Q_PROPERTY(QStringList artists READ artists NOTIFY artistsChanged)
|
||||
Q_PROPERTY(QList<QObject *> artistItems READ artistItems NOTIFY artistItemsChanged);
|
||||
Q_PROPERTY(QString collectionType READ collectionType NOTIFY collectionTypeChanged)
|
||||
Q_PROPERTY(Jellyfin::DTO::CollectionTypeClass::Value collectionType READ collectionType NOTIFY collectionTypeChanged)
|
||||
// Why is this a QJsonObject? Well, because I couldn't be bothered to implement the deserialisations of
|
||||
// a QHash at the moment.
|
||||
Q_PROPERTY(QJsonObject imageTags READ imageTags NOTIFY imageTagsChanged)
|
||||
|
@ -178,7 +178,7 @@ public:
|
|||
Q_PROPERTY(int albumCount READ albumCount NOTIFY albumCountChanged)
|
||||
Q_PROPERTY(int artistCount READ artistCount NOTIFY artistCountChanged)
|
||||
Q_PROPERTY(int musicVideoCount READ musicVideoCount NOTIFY musicVideoCountChanged)
|
||||
Q_PROPERTY(QString mediaType READ mediaType NOTIFY mediaTypeChanged)
|
||||
Q_PROPERTY(Jellyfin::DTO::MediaTypeClass::Value mediaType READ mediaType NOTIFY mediaTypeChanged)
|
||||
Q_PROPERTY(QDateTime endDate READ endDate NOTIFY endDateChanged)
|
||||
Q_PROPERTY(QDateTime startDate READ startDate NOTIFY startDateChanged)
|
||||
Q_PROPERTY(int width READ width NOTIFY widthChanged)
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
QString playlistItemId() const { return m_data->playlistItemId(); }
|
||||
QDateTime dateCreated() const { return m_data->dateCreated(); }
|
||||
QDateTime dateLastMediaAdded() const { return m_data->dateLastMediaAdded(); }
|
||||
QString extraType() const { return m_data->extraType(); }
|
||||
ExtraType extraType() const { return m_data->extraType(); }
|
||||
int airsBeforeSeasonNumber() const { return m_data->airsBeforeSeasonNumber().value_or(0); }
|
||||
int airsAfterSeasonNumber() const { return m_data->airsAfterSeasonNumber().value_or(999); }
|
||||
int airsBeforeEpisodeNumber() const { return m_data->airsBeforeEpisodeNumber().value_or(0); }
|
||||
|
@ -204,7 +204,7 @@ public:
|
|||
int indexNumber() const { return m_data->indexNumber().value_or(-1); }
|
||||
int indexNumberEnd() const { return m_data->indexNumberEnd().value_or(-1); }
|
||||
bool isFolder() const { return m_data->isFolder().value_or(false); }
|
||||
QString type() const { return m_data->type(); }
|
||||
BaseItemKind type() const { return m_data->type(); }
|
||||
QString parentBackdropItemId() const { return m_data->parentBackdropItemId(); }
|
||||
QStringList parentBackdropImageTags() const { return m_data->parentBackdropImageTags(); }
|
||||
UserData *userData() const { return m_userData; }
|
||||
|
@ -223,11 +223,11 @@ public:
|
|||
double primaryImageAspectRatio() const { return m_data->primaryImageAspectRatio().value_or(1.0); }
|
||||
QStringList artists() const { return m_data->artists(); }
|
||||
QList<QObject *> artistItems() const{ return this->m_artistItems; }
|
||||
QString collectionType() const { return this->m_data->collectionType(); }
|
||||
CollectionType collectionType() const { return this->m_data->collectionType(); }
|
||||
QJsonObject imageTags() const { return m_data->imageTags(); }
|
||||
QStringList backdropImageTags() const { return m_data->backdropImageTags(); }
|
||||
QJsonObject imageBlurHashes() const { return m_data->imageBlurHashes(); }
|
||||
QString mediaType() const { return m_data->mediaType(); }
|
||||
MediaType mediaType() const { return m_data->mediaType(); }
|
||||
QDateTime endDate() const { return m_data->endDate(); }
|
||||
QDateTime startDate() const { return m_data->startDate(); }
|
||||
Item *currentProgram() const { return m_currentProgram; }
|
||||
|
@ -281,7 +281,7 @@ signals:
|
|||
void indexNumberChanged(int newIndexNumber);
|
||||
void indexNumberEndChanged(int newIndexNumberEnd);
|
||||
void isFolderChanged(bool newIsFolder);
|
||||
void typeChanged(const QString &newType);
|
||||
void typeChanged(const BaseItemKind &newType);
|
||||
void parentBackdropItemIdChanged();
|
||||
void parentBackdropImageTagsChanged();
|
||||
void userDataChanged(UserData *newUserData);
|
||||
|
@ -313,7 +313,7 @@ signals:
|
|||
void albumCountChanged(int newAlbumCount);
|
||||
void artistCountChanged(int newArtistCount);
|
||||
void musicVideoCountChanged(int newMusicVideoCount);
|
||||
void mediaTypeChanged(const QString &newMediaType);
|
||||
void mediaTypeChanged(const MediaType &newMediaType);
|
||||
void endDateChanged();
|
||||
void startDateChanged();
|
||||
void widthChanged(int newWidth);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
public: \
|
||||
Q_PROPERTY(type propName READ propName WRITE set##propSetName NOTIFY propName##Changed) \
|
||||
type propName() const { return this->m_parameters.propName(); } \
|
||||
void set##propSetName(type newValue) { \
|
||||
void set##propSetName(const type &newValue) { \
|
||||
this->m_parameters.set##propSetName( newValue ); \
|
||||
emit propName##Changed(); \
|
||||
autoReloadIfNeeded(); \
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
this->connect(this, &BaseModelLoader::apiClientChanged, this, &AbstractUserParameterLoader<T, D, R, P>::apiClientChanged);
|
||||
}
|
||||
protected:
|
||||
virtual bool canReload() const override {
|
||||
bool canReload() const override {
|
||||
return BaseModelLoader::canReload() && !this->m_parameters.userId().isNull();
|
||||
}
|
||||
private:
|
||||
|
@ -125,7 +125,7 @@ public:
|
|||
|
||||
FWDPROP(bool, includeExternalContent, IncludeExternalContent)
|
||||
FWDPROP(bool, includeHidden, IncludeHidden)
|
||||
FWDPROP(QStringList, presetViews, PresetViews)
|
||||
FWDLISTPROP(Jellyfin::DTO::CollectionType, presetViews, PresetViews)
|
||||
};
|
||||
|
||||
using LatestMediaBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, QList<DTO::BaseItemDto>, Jellyfin::Loader::GetLatestMediaParams>;
|
||||
|
@ -141,12 +141,12 @@ public:
|
|||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
FWDPROP(bool, groupItems, GroupItems)
|
||||
FWDPROP(qint32, imageTypeLimit, ImageTypeLimit)
|
||||
FWDPROP(QStringList, includeItemTypes, IncludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, includeItemTypes, IncludeItemTypes)
|
||||
FWDPROP(bool, isPlayed, IsPlayed)
|
||||
FWDPROP(QString, parentId, ParentId)
|
||||
};
|
||||
|
||||
using UserItemsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetItemsByUserIdParams>;
|
||||
using UserItemsLoaderBase = AbstractUserParameterLoader<Model::Item, DTO::BaseItemDto, DTO::BaseItemDtoQueryResult, Jellyfin::Loader::GetItemsParams>;
|
||||
class UserItemsLoader : public UserItemsLoaderBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -166,7 +166,7 @@ public:
|
|||
FWDPROP(bool, enableUserData, EnableUserData)
|
||||
FWDPROP(QStringList, excludeArtistIds, ExcludeArtistIds)
|
||||
FWDPROP(QStringList, excludeItemIds, ExcludeItemIds)
|
||||
FWDPROP(QStringList, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDPROP(QList<Jellyfin::DTO::LocationTypeClass::Value>, excludeLocationTypes, ExcludeLocationTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFilterClass::Value, filters, Filters)
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
FWDPROP(QStringList, ids, Ids)
|
||||
FWDPROP(qint32, imageTypeLimit, ImageTypeLimit)
|
||||
FWDLISTPROP(Jellyfin::DTO::ImageTypeClass::Value, imageTypes, ImageTypes)
|
||||
FWDPROP(QStringList, includeItemTypes, IncludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, includeItemTypes, IncludeItemTypes)
|
||||
FWDPROP(bool, is3D, Is3D)
|
||||
FWDPROP(bool, is4K, Is4K)
|
||||
FWDPROP(bool, isFavorite, IsFavorite)
|
||||
|
@ -201,13 +201,13 @@ public:
|
|||
FWDPROP(QString, maxOfficialRating, MaxOfficialRating)
|
||||
FWDPROP(QDateTime, maxPremiereDate, MaxPremiereDate)
|
||||
FWDPROP(qint32, maxWidth, MaxWidth)
|
||||
FWDPROP(QStringList, mediaTypes, MediaTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::MediaTypeClass::Value, mediaTypes, MediaTypes)
|
||||
FWDPROP(qint32, minHeight, MinHeight)
|
||||
FWDPROP(QString, minOfficialRating, MinOfficialRating)
|
||||
FWDPROP(QDateTime, minPremiereDate, MinPremiereDate)
|
||||
FWDPROP(qint32, minWidth, MinWidth)
|
||||
FWDPROP(QString, sortBy, SortBy)
|
||||
FWDPROP(QString, sortOrder, SortOrder)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemSortByClass::Value, sortBy, SortBy)
|
||||
FWDLISTPROP(Jellyfin::DTO::SortOrderClass::Value, sortOrder, SortOrder)
|
||||
FWDPROP(QStringList, tags, Tags)
|
||||
FWDPROP(QList<qint32>, years, Years)
|
||||
|
||||
|
@ -227,11 +227,11 @@ public:
|
|||
FWDPROP(bool, enableImages, EnableImages)
|
||||
FWDPROP(bool, enableTotalRecordCount, EnableTotalRecordCount)
|
||||
FWDPROP(bool, enableUserData, EnableUserData)
|
||||
FWDPROP(QStringList, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
FWDPROP(qint32, imageTypeLimit, ImageTypeLimit)
|
||||
FWDPROP(QStringList, includeItemTypes, IncludeItemTypes)
|
||||
FWDPROP(QStringList, mediaTypes, MediaTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, includeItemTypes, IncludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::MediaTypeClass::Value, mediaTypes, MediaTypes)
|
||||
FWDPROP(QString, parentId, ParentId)
|
||||
FWDPROP(QString, searchTerm, SearchTerm)
|
||||
};
|
||||
|
@ -269,7 +269,7 @@ public:
|
|||
FWDPROP(bool, isMissing, IsMissing)
|
||||
FWDPROP(qint32, season, Season)
|
||||
FWDPROP(QString, seasonId, SeasonId)
|
||||
FWDPROP(QString, sortBy, SortBy)
|
||||
FWDPROP(Jellyfin::DTO::ItemSortByClass::Value, sortBy, SortBy)
|
||||
FWDPROP(QString, startItemId, StartItemId)
|
||||
};
|
||||
|
||||
|
@ -281,7 +281,7 @@ public:
|
|||
|
||||
FWDPROP(bool, disableFirstEpisode, DisableFirstEpisode)
|
||||
FWDLISTPROP(Jellyfin::DTO::ImageTypeClass::Value, enableImageTypes, EnableImageTypes);
|
||||
FWDPROP(bool, enableImges, EnableImges)
|
||||
FWDPROP(bool, enableImages, EnableImages)
|
||||
FWDPROP(bool, enableTotalRecordCount, EnableTotalRecordCount)
|
||||
FWDPROP(bool, enableUserData, EnableUserData)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
|
@ -300,16 +300,16 @@ public:
|
|||
FWDPROP(bool, enableImages, EnableImages)
|
||||
FWDPROP(bool, enableTotalRecordCount, EnableTotalRecordCount)
|
||||
FWDPROP(bool, enableUserData, EnableUserData)
|
||||
FWDPROP(QStringList, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, excludeItemTypes, ExcludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFilterClass::Value, filters, Filters)
|
||||
FWDPROP(QStringList, genreIds, GenreIds)
|
||||
FWDPROP(QStringList, genres, Genres)
|
||||
FWDPROP(qint32, imageTypeLimit, ImageTypeLimit)
|
||||
FWDPROP(QStringList, includeItemTypes, IncludeItemTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::BaseItemKindClass::Value, includeItemTypes, IncludeItemTypes)
|
||||
FWDPROP(bool, isFavorite, IsFavorite)
|
||||
FWDPROP(int, limit, Limit)
|
||||
FWDPROP(QStringList, mediaTypes, MediaTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::MediaTypeClass::Value, mediaTypes, MediaTypes)
|
||||
FWDPROP(double, minCommunityRating, MinCommunityRating)
|
||||
FWDPROP(QString, nameLessThan, NameLessThan)
|
||||
FWDPROP(QString, nameStartsWith, NameStartsWith)
|
||||
|
@ -347,7 +347,7 @@ public:
|
|||
FWDLISTPROP(Jellyfin::DTO::ImageTypeClass::Value, enableImageTypes, EnableImageTypes)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemFieldsClass::Value, fields, Fields)
|
||||
FWDPROP(bool, enableUserData, EnableUserData)
|
||||
FWDPROP(QStringList, sortBy, SortBy)
|
||||
FWDLISTPROP(Jellyfin::DTO::ItemSortByClass::Value, sortBy, SortBy)
|
||||
FWDPROP(Jellyfin::DTO::SortOrderClass::Value, sortOrder, SortOrder)
|
||||
FWDPROP(bool, enableFavoriteSorting, EnableFavoriteSorting)
|
||||
FWDPROP(bool, addCurrentProgram, AddCurrentProgram)
|
||||
|
@ -405,7 +405,7 @@ public:
|
|||
|
||||
explicit ItemModel (QObject *parent = nullptr);
|
||||
|
||||
virtual QHash<int, QByteArray> roleNames() const override {
|
||||
QHash<int, QByteArray> roleNames() const override {
|
||||
return {
|
||||
JFRN(jellyfinId),
|
||||
JFRN(name),
|
||||
|
@ -450,7 +450,7 @@ public:
|
|||
QSharedPointer<Model::Item> itemAt(int index);
|
||||
private slots:
|
||||
void onInsertItems(const QModelIndex &parent, int start, int end);
|
||||
void onUserDataUpdated(const DTO::UserItemDataDto &newUserData);
|
||||
void onUserDataUpdated(const Jellyfin::DTO::UserItemDataDto &newUserData);
|
||||
};
|
||||
#undef JFRN
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
Q_PROPERTY(QString comment READ comment NOTIFY commentChanged);
|
||||
Q_PROPERTY(QString timeBase READ timeBase NOTIFY timeBaseChanged);
|
||||
Q_PROPERTY(QString title READ title NOTIFY titleChanged);
|
||||
Q_PROPERTY(QString videoRange READ videoRange NOTIFY videoRangeChanged);
|
||||
Q_PROPERTY(Jellyfin::DTO::VideoRangeClass::Value videoRange READ videoRange NOTIFY videoRangeChanged);
|
||||
Q_PROPERTY(QString localizedUndefined READ localizedUndefined NOTIFY localizedUndefinedChanged);
|
||||
Q_PROPERTY(QString localizedDefault READ localizedDefault NOTIFY localizedDefaultChanged);
|
||||
Q_PROPERTY(QString localizedForced READ localizedForced NOTIFY localizedForcedChanged);
|
||||
|
@ -78,7 +78,7 @@ public:
|
|||
QString comment() const { return m_data->comment(); }
|
||||
QString timeBase() const { return m_data->timeBase(); }
|
||||
QString title() const { return m_data->title(); }
|
||||
QString videoRange() const { return m_data->videoRange(); }
|
||||
DTO::VideoRange videoRange() const { return m_data->videoRange(); }
|
||||
QString localizedUndefined() const { return m_data->localizedUndefined(); }
|
||||
QString localizedDefault() const { return m_data->localizedDefault(); }
|
||||
QString localizedForced() const { return m_data->localizedForced(); }
|
||||
|
@ -116,7 +116,7 @@ signals:
|
|||
void commentChanged(const QString &newComment);
|
||||
void timeBaseChanged(const QString &newTimeBase);
|
||||
void titleChanged(const QString &newTitle);
|
||||
void videoRangeChanged(const QString &newVideoRanged);
|
||||
void videoRangeChanged(const DTO::VideoRange &newVideoRanged);
|
||||
void localizedUndefinedChanged(const QString &newLocalizedUndefined);
|
||||
void localizedDefaultChanged(const QString &newLocalizedDefault);
|
||||
void localizedForcedChanged(const QString &newLocalizedForced);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue