A setting has been added to allow users to select which page should be
opened first. This allows for using Sailfin as a music player
exclusively, as proposed in #34
Special care has been taken to avoid the user being locked out from the
app, for when the library selected as home has been deleted on the
server side. It is real tricky to guide the user to delete dconf keys.
Therefore, a pulley menu with access to settings has been added to all
collection pages and to the unknown page. Additionally, when the setting
is changed, it throws away the entire pagestack and replaces it with the
new home page + the settings page, so the user can always navigate back.
The navigation history of the user will get lost, but otherwise the
implementation gets to complex for a feature that is expected to be used
not that often.
This uses more timers than I hoped for, because otherwise things are
undefined for some reason which I do not know and using timers solves
it. :(
Device icons for the local device is now determined by looking at what
the value of the deviceType property of the ApiClient is. This property
was newly introduced, so that applications using JellyfinQt can set
their own device type.
For other devices, a guess is made based on the client name. This guess
has been derived from what Jellyfin Web does.
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.
The QML side attempted to simply pass all items of type 'Audio' to the
PlaybackManager.playItem(). This does not work for folders and it will
crash. This does not fix the presentation of audio folders/playlists,
but it does fix the crash.
* Fixed pulleyindicator staying busy in collectionpage
* PlaybackBar now correctly disables next/previous buttons
* AppWindow now handles the pushing for pages when an items needs to be
visited.
* Clicking on an item of type audio now starts the audio player
* Show the now playing cover when playing an item, otherwise show the
collection cover.
* ItemModelLoaders now correctly expose list properties of non-built-in
Qt objects
* toString is now implemented for lists, fixing some query
construction code.
* PlaybackManager now clears the playlist when playing a single item to
prevent weird behaviour.
* The covers are slightly updated.
* PlaybackManager has been updated to workaround limitiations in
QtMultimedia
* PlaybackManager now sends the DeviceProfile to the server when
determining the playback url. This makes the Jellyfin server send
information back about transcoding.
* The DeviceProfile type has been changed from an QJsonObject into the
DTO generated by the OpenAPI descripton.
* A settings page has been added on SailfishOS that allows the user to
configure the PlaybackManager to their whishes.
* The DebugInfo page on SailfishOS now persists its settings (closes #8)
Besides MPRIS support, this also adds support for hasPrevious() and
hasNext() in several parts to determine whether the
player/playlist/shuffler has a previous or next item.
Covers should now work when at least the playbackManager is playing.
Covers based on the currently displayed item on the page does not work
yet.
The CoverPage has been revamped to use 1 model and 1 PathView to animate
the items for cleaner code.
- 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
* [backend]: Websocket now automatically tries to reconnect if connection was lost, up to 3 times.
* [backend]: Move more playback and resume logic to the backend, to avoid having it in multiple places within the QML. Regression: pausing playback sometimes halts the video player for an unknown reason.
* [playback]: Sailfin will try to play without the server transcoding, if possible.
* [ui]: added a debug page in the settings
I finally got deserializing lists working. Exposing them to QML was not
a trivial task either. Note that I didn't do it the clean way. Nested
lists are not supported. But it works!
Because I got so frustarted at one point trying to implement things the
right way, I restructured the project to seperate the Sailfish code from
the Qt code and created a new, empty desktop project. The Qt code has
been transformed into a happy little library, to which the Sailfish OS
application links.
Note that QMake doesn't seem to strip the library for some reason.