1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-10-31 23:25:18 +00:00
Commit graph

173 commits

Author SHA1 Message Date
Chris Josten f0328e2c80 Update changelog 2024-01-02 15:23:39 +01:00
Chris Josten 9266f65c2f Guess device icons
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.
2024-01-02 15:14:23 +01:00
Chris Josten 1b27847c94 core/RemoteJellyfinPlaybackManager: send media source id
If the mediaSourceId is not sent, Jellyfin Web will simply not take the
audioStreamIndex and subtitleStreamIndex in account when playing the
media.

A bug also surfaced where the application would crash when playing a
video, playing audio afterwards and then clicking on an item in the now
playing queue. This has also been fixed.
2024-01-02 13:02:59 +01:00
Chris Josten 6ed623d0f8 core/RemoteJellyfinPlaybackManager: keep queue in sync
The playback queue is now kept in sync with the playback queue of the
remote jellyfin instance the manager is controlling.

Some additional guards were added in place in the shuffle and playlist
algorithm, since the situation can occur where the now playing index
falls outside of the playing playlist. This happens because when the
an playlist update is received, we need to do another HTTP request
before we know which items are in the queue, while the now playing index
has been updated.

This is a not-optimal way to fix that, but it works well enough for now
and a better solution can be implemented later. (Hello, person in the
future reading the git blame output!)
2024-01-02 00:19:13 +01:00
Chris Josten 61a7eaf52e core: emit signals when playbackmanager changed 2023-01-11 23:55:53 +01:00
Chris Josten 7c6d8486de ui: improve empty state, add remote playback indicator 2023-01-11 23:11:02 +01:00
Chris Josten 3783de9ce7 core: send start index when playing on remote session 2023-01-05 15:53:52 +01:00
Chris Josten 7a7ddc7717 core: remote playback send commands and update state 2023-01-04 21:32:27 +01:00
Chris Josten 77cb5d5957 openapigen: support for 204 No Content endpoints 2023-01-02 20:24:40 +01:00
Chris Josten b257fe60aa Discover remote sessions
Adds a way of discovering remote sessions and in Jellyfin the UI.
2023-01-02 20:05:41 +01:00
Chris Josten b1bd15f2c1
Merge pull request #35 from heartfin/32-abstract-media-playback-implementation-from-viewmodel-playbackmanager
Abstract media playback implementation from ViewModel::PlaybackManager
2022-11-05 18:31:49 +01:00
Chris Josten c72c10bad4
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.
2022-11-05 18:20:23 +01:00
Chris Josten f91e9f88e7
Merge pull request #31 from heartfin/30-deduplicate-qobject-wrapping-code
Move QObject-wrapping code into templates
2022-08-24 17:14:58 +02:00
Chris Josten b8933ddca4 Move QObject-wrapping code into templates
Previously, this pattern was copy-pasted in a few places. This is
undesirable, so the code has been moved into templates.

Fixes #30
2022-08-24 17:00:14 +02:00
Chris Josten 0fafb19c7d Add navigation to artists from tracks
I'm not to happy about the C++ sides. If anyone from the future finds
this commit with "git blame" while debugging this code: I apologise
2022-07-30 01:24:31 +02:00
Chris Josten 3f9661ccb5 Update changelog 2022-07-29 14:30:38 +02:00
Chris Josten fb81913eab
Merge pull request #28 from heartfin/25-music-player-more-specialised-folder-pages
Add more specialised pages
2022-07-29 14:28:00 +02:00
Chris Josten dc9c3ea1b8 Add music library page 2022-07-29 14:26:25 +02:00
Chris Josten 0c0b91dc4b Add artist overview page 2022-07-29 11:45:23 +02:00
Chris Josten 2398cc2997
Merge pull request #23 from heartfin/22-music-player-album-art-with-a-non-11-aspect-ratio-breaks-the-narrow-header
Code deduplication and bug fix in the album cover
2022-07-23 20:04:17 +02:00
Chris Josten 985a65154a
Code deduplication and bug fix
Deduplicated code in the NarrowAlbumCover and WideAlbumCover.

Additionally, this fixes a bug where the NarrowAlbumCover would behave
wrongly with album covers with an aspect ratio not equal to 1.0.

Resolves #22
2022-07-23 20:01:23 +02:00
Chris Josten 4a178ee227
Add better playlist view
I reused the AlbumDetailPage for playlists, as both are very similar. If
they end up being too different, I might want to look into splitting
them up, but for now it will do.
2022-07-23 01:52:26 +02:00
Chris Josten c1e402f411
Fix linebreak in README 2022-07-23 01:31:39 +02:00
Chris Josten 818443dbae
Add Matrix badge 2022-07-23 01:26:40 +02:00
Chris Josten eecebc4ec6
Bump version 0.4.2 2022-07-23 00:50:51 +02:00
Chris Josten ade8866303
Merge pull request #20 from heartfin/19-collections-with-more-than-100-items-loop-back
setRequestStartIndex: actually set start index
2022-07-23 00:42:15 +02:00
Chris Josten dd34e1a087
setRequestStartIndex: actually set start index
It previously modified the limit for some template instances. That
obviously does not work.

Additionally, setRequestStartIndex and setRequestLimit have been
implemented for GetNextUpParams.

Fixes #19
2022-07-23 00:38:15 +02:00
Chris Josten 7ae204bf87
Create FUNDING.yml 2022-07-22 22:38:20 +02:00
Chris Josten 62d9b9a73c
Fix user list not displaying 2022-07-20 23:13:57 +02:00
Chris Josten f34f3484f3
Fix authentication 2022-07-20 23:13:42 +02:00
Chris Josten 69ddb18046
Bump version v0.4.1 2022-04-27 11:07:23 +02:00
Chris Josten 748e5bdf13
Sailfish: do not crash when opening an audio folders
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.
2022-04-27 11:07:06 +02:00
Chris Josten cab5f20469
Sailfish: Fix freeze when connecting via HTTPS 2022-04-26 20:02:29 +02:00
Chris Josten deada4f635 core: Use the public constructor of ClientCapabilitiesDTO
In the ApiClient, the constructor without arguments was used to create a
ClientCapabilitiesDTO. Since this constructor has been made private,
ApiClient now uses the other public constructor to allow the code to
compile once again.
2021-10-25 16:11:10 +02:00
Chris Josten 852e3e928f core: correctly serialize JSON objects
On startup, the DeviceProfile would not be serialized properly to a false
assumption that QJsonValue.toString() returns the JSON representation of
the given value. This now has been fixed by creating a QJsonDocument
converting it to a string.
2021-10-25 16:10:36 +02:00
Chris Josten 90db983c30 Replace not-fully-initializing DTO constructors
There were some constructors in the DTOs which allowed construction of
DTO which weren't fully initialized. These constructors have been made
private, as they are still used in the 'fromJson' methods. Additionally,
a constructor with all required parameters to fully initialize the
class has been added.

Additionally, the Loader class has been modified, since it no longer can
assume it is able to default construct the parameter type. The parameter
is now stored as an optional.

Closes #15
2021-09-25 17:07:12 +02:00
Chris Josten 1e795ae8b6
Bump version v0.4.0 2021-09-10 07:58:42 +02:00
Chris Josten b5f22ec52a
Update licensing 2021-09-10 06:04:29 +02:00
Chris Josten 17400a97e4
Small user interface tweaks 2021-09-10 05:18:05 +02:00
Chris Josten af99b39722
Update UserData based when notified over websocket 2021-09-10 05:17:28 +02:00
Chris Josten 40d8a58a5a
Small UI modifications
* 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
2021-09-10 03:08:40 +02:00
Chris Josten 5d521ee189
Resume playback once again 2021-09-10 03:06:42 +02:00
Chris Josten 2a3bd51def
Add support for handling playstate commands 2021-09-10 01:36:30 +02:00
Chris Josten 7c21eb425d
Fix a few PlaybackManager bugs
The following bugs should have been fixed:

* The PlaybackManager no longer starts playing again after
  PlaybackManager.stop() has been called.
* The PlaybackManager will no longer get into an invalid state when
  next() is called many times fast.
* The PlaybackManager now exposes its error information when the
  PlaybackUrl could not be fetched.
* The PlaybackManager will keep a playbackState of Playing as long
  as it is not stopped and while in a playlist. Previously, it would
  stop and start everytime the next item got loaded.
2021-09-09 22:16:39 +02:00
Henk Kalkwater caf72af999
Fix a few bugs and unimplemented features
* 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.
2021-09-09 06:02:44 +02:00
Henk Kalkwater 60bc90c5fa
Add support for server-side notifications 2021-09-09 02:18:10 +02:00
Henk Kalkwater 357ac89330
Fix sending of DeviceProfileInfo
Due to some errors within DeviceProfile and how nullables were
serialized, an invalid request was made and the
/Sessions/Capabilities/Full would give an 400 response back.

Besides that, ApiClient would generate a DeviceProfile before all
properties from QML were read. This has been fixed by implementing
QQmlParserStatus and only generating the device profile after all
properties are set.
2021-09-08 23:20:12 +02:00
Chris Josten 8a9cb73686 SailfishOS: Small user interface improvements
* Pressing shuffle will now show a notification indicating it is not
  implemented.
* On the initial setup, the discovered settings are displayed somewhat
  more neatly.
* Disable reloading the main view each time the MainPage gets activated.
2021-09-08 22:01:00 +02:00
Chris Josten 14c9de0aac Merge branch 'master' of github.com:HenkKalkwater/harbour-sailfin 2021-09-08 21:52:44 +02:00
Chris Josten 6bfe783bec Add user-configurable playback settings
* 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)
2021-09-08 21:44:42 +02:00