mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +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
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue