mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
core: Split PlaybackManager up into smaller parts
The PlaybackManager was a giant class that handled UI bindings, fetching stream URLS, playback logic. It now has been split up into: - ViewModel::PlaybackManager, which handles UI interfacing and allowing to swap out the Model::Playback implementation on the fly. - Model::PlaybackManager, which is an interface for what a PlaybackManager must do, handling queues/playlists, and controlling a player. - Model::LocalPlaybackManager, which is an Model::PlaybackManager implementation for playing back Jellyfin media within the application. - Model::PlaybackReporter, which reports the current playback state to the Jellyfin server, for keeping track of played items. - Model::Player, which handles playing back media from an URL and the usual play/pause et cetera. In a future commit, this would allow for introducing a Model::RemoteJellyfinPlaybackManager, to control other Jellyfin instances.
This commit is contained in:
parent
f91e9f88e7
commit
c72c10bad4
20 changed files with 1916 additions and 684 deletions
|
@ -16,6 +16,8 @@
|
|||
#include <QtCore/QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QMediaPlayer>
|
||||
#include "JellyfinQt/model/player.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QByteArray;
|
||||
template<class T> class QList;
|
||||
|
@ -190,9 +192,9 @@ private:
|
|||
ViewModel::PlatformMediaControl *m_mediaControl;
|
||||
void notifyPropertiesChanged(QStringList properties);
|
||||
private slots:
|
||||
void onCurrentItemChanged(ViewModel::Item *newItem);
|
||||
void onPlaybackStateChanged(QMediaPlayer::State state);
|
||||
void onMediaStatusChanged(QMediaPlayer::MediaStatus status);
|
||||
void onCurrentItemChanged();
|
||||
void onPlaybackStateChanged(Jellyfin::Model::PlayerStateClass::Value state);
|
||||
void onMediaStatusChanged(Jellyfin::Model::MediaStatusClass::Value status);
|
||||
void onPositionChanged(qint64 position);
|
||||
void onSeekableChanged(bool seekable);
|
||||
void onPlaybackManagerChanged(ViewModel::PlaybackManager *newPlaybackManager);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue