1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-01 08:52:45 +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:
Chris Josten 2022-01-05 21:24:52 +01:00 committed by Henk Kalkwater
parent f91e9f88e7
commit c72c10bad4
No known key found for this signature in database
GPG key ID: A69C050E9FD9FF6A
20 changed files with 1916 additions and 684 deletions

View file

@ -15,6 +15,9 @@ include(GeneratedSources.cmake)
set(JellyfinQt_SOURCES
src/model/deviceprofile.cpp
src/model/item.cpp
src/model/player.cpp
src/model/playbackmanager.cpp
src/model/playbackreporter.cpp
src/model/playlist.cpp
src/model/shuffle.cpp
src/model/user.cpp
@ -48,6 +51,9 @@ list(APPEND JellyfinQt_SOURCES ${openapi_SOURCES})
set(JellyfinQt_HEADERS
include/JellyfinQt/model/deviceprofile.h
include/JellyfinQt/model/item.h
include/JellyfinQt/model/player.h
include/JellyfinQt/model/playbackmanager.h
include/JellyfinQt/model/playbackreporter.h
include/JellyfinQt/model/playlist.h
include/JellyfinQt/model/shuffle.h
include/JellyfinQt/model/user.h