mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Improve PlaybackManager stability, added PlaybackBar
- PlaybackManager now takes ownership of set items - PlaybackManager can play items just by their itemId, avoids useless item creation on the QML side of things. - Allow calling Jellyfin::registerTypes with a different URI - Minor code cleanup
This commit is contained in:
parent
7e77abc173
commit
b699f6e74d
12 changed files with 170 additions and 16 deletions
|
@ -10,7 +10,7 @@
|
|||
#include "JellyfinQt/jellyfinplaybackmanager.h"
|
||||
|
||||
namespace Jellyfin {
|
||||
void registerTypes();
|
||||
void registerTypes(const char *uri = "nl.netsoj.chris.Jellyfin");
|
||||
}
|
||||
|
||||
#endif // JELLYFIN_H
|
||||
|
|
|
@ -302,6 +302,7 @@ class Item : public RemoteData {
|
|||
Q_OBJECT
|
||||
public:
|
||||
Q_INVOKABLE explicit Item(QObject *parent = nullptr);
|
||||
Item(QString itemId, ApiClient *apiClient, QObject *parent = nullptr);
|
||||
|
||||
Q_PROPERTY(QString jellyfinId READ jellyfinId WRITE setJellyfinId NOTIFY jellyfinIdChanged)
|
||||
|
||||
|
@ -473,7 +474,7 @@ protected:
|
|||
QString getDataUrl() const override;
|
||||
bool canReload() const override;
|
||||
|
||||
QString m_id;
|
||||
QString m_id = QStringLiteral("");
|
||||
QString m_name;
|
||||
QString m_originalTitle;
|
||||
QString m_serverId;
|
||||
|
|
|
@ -89,6 +89,12 @@ signals:
|
|||
|
||||
public slots:
|
||||
void updatePlaybackInfo();
|
||||
/**
|
||||
* @brief playItem Plays the item with the given id. This will construct the Jellyfin::Item internally
|
||||
* and delete it later.
|
||||
* @param itemId The id of the item to play.
|
||||
*/
|
||||
void playItem(const QString &itemId);
|
||||
private slots:
|
||||
void mediaPlayerStateChanged(QMediaPlayer::State newState);
|
||||
void mediaPlayerPositionChanged(qint64 position);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue