feat: complete QML shell migration and ship 0.0.8 Arch package
Replace the Widgets main shell with AppShellHost + QML routes, add a QML independent player window, and remove the legacy player/page Widgets stack. Also wire settings cache/proxy actions, fix quit-time engine teardown, improve list/home scroll performance, and update Arch packaging to 0.0.8.
This commit is contained in:
@@ -9,48 +9,47 @@
|
||||
|
||||
class QEmbyCore;
|
||||
class QProcess;
|
||||
class PlayerWindow;
|
||||
class IndependentPlayerHost;
|
||||
class QTimer;
|
||||
struct MediaSourceInfo;
|
||||
|
||||
|
||||
|
||||
|
||||
class PlaybackManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static PlaybackManager* instance();
|
||||
|
||||
|
||||
void init(QEmbyCore* core);
|
||||
|
||||
|
||||
// Whether an in-shell embedded player host exists to receive
|
||||
// requestEmbeddedPlay (AppShellHost + PlayerRouteController). When false,
|
||||
// the embedded branch falls back to IndependentPlayerHost (QML window).
|
||||
void setEmbeddedHostAvailable(bool available);
|
||||
|
||||
void startPlayback(const QString& mediaId, const QString& title,
|
||||
const QString& streamUrl, long long startPositionTicks,
|
||||
const QVariant& extraData = QVariant());
|
||||
|
||||
|
||||
void startExternalPlayback(const QString& playerPath,
|
||||
const QString& mediaId, const QString& title,
|
||||
const QString& streamUrl, long long startPositionTicks,
|
||||
const QVariant& extraData = QVariant());
|
||||
|
||||
|
||||
void startInternalPlayback(const QString& mediaId, const QString& title,
|
||||
const QString& streamUrl, long long startPositionTicks,
|
||||
const QVariant& extraData = QVariant());
|
||||
|
||||
|
||||
void stopExternalPlayer();
|
||||
|
||||
// Stop independent QML player window and/or external process before quit.
|
||||
// Returns true if something was stopped (caller may defer quit briefly).
|
||||
bool stopActivePlaybackForQuit();
|
||||
|
||||
signals:
|
||||
|
||||
void requestEmbeddedPlay(const QString& mediaId, const QString& title,
|
||||
const QString& streamUrl, long long startPositionTicks,
|
||||
const QVariant& extraData);
|
||||
|
||||
|
||||
void playbackFinished();
|
||||
|
||||
private:
|
||||
@@ -66,11 +65,8 @@ private:
|
||||
const QString& streamUrl, long long startPositionTicks,
|
||||
const QVariant& extraData);
|
||||
|
||||
|
||||
|
||||
static PlayerType identifyPlayerType(const QString& playerPath);
|
||||
|
||||
|
||||
static QStringList buildPlayerArgs(PlayerType type,
|
||||
long long startPositionTicks,
|
||||
int audioStreamIndex,
|
||||
@@ -78,34 +74,27 @@ private:
|
||||
bool subtitleDisabled,
|
||||
const MediaSourceInfo* sourceInfo);
|
||||
|
||||
|
||||
static QString ticksToTimeString(long long ticks);
|
||||
|
||||
|
||||
static double ticksToSeconds(long long ticks);
|
||||
|
||||
|
||||
static int computeRelativeStreamIndex(const MediaSourceInfo& source,
|
||||
const QString& streamType,
|
||||
int globalIndex);
|
||||
|
||||
|
||||
static QString generateIpcEndpoint(PlayerType type);
|
||||
|
||||
|
||||
void cleanupExternalPlayerState();
|
||||
|
||||
|
||||
QEmbyCore* m_core = nullptr;
|
||||
QPointer<QProcess> m_extProcess;
|
||||
QPointer<PlayerWindow> m_independentWindow;
|
||||
bool m_embeddedHostAvailable = true;
|
||||
QPointer<QProcess> m_extProcess;
|
||||
QPointer<IndependentPlayerHost> m_independentHost;
|
||||
|
||||
|
||||
ExternalPlayerIPC* m_ipc = nullptr;
|
||||
QTimer* m_progressTimer = nullptr;
|
||||
QString m_currentMediaId;
|
||||
QString m_currentMediaSourceId;
|
||||
QString m_currentPlaySessionId;
|
||||
ExternalPlayerIPC* m_ipc = nullptr;
|
||||
QTimer* m_progressTimer = nullptr;
|
||||
QString m_currentMediaId;
|
||||
QString m_currentMediaSourceId;
|
||||
QString m_currentPlaySessionId;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user