1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-04 01:42:44 +00:00

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
This commit is contained in:
Chris Josten 2021-09-10 03:08:40 +02:00
parent 5d521ee189
commit 40d8a58a5a
No known key found for this signature in database
GPG key ID: A69C050E9FD9FF6A
7 changed files with 35 additions and 17 deletions

View file

@ -28,7 +28,7 @@ import Nemo.KeepAlive 1.2
import "components"
import "pages"
import "." as D
import "."
ApplicationWindow {
id: appWindow
@ -50,7 +50,7 @@ ApplicationWindow {
ApiClient {
id: _apiClient
objectName: "Test"
supportedCommands: [GeneralCommandType.Play, GeneralCommandType.DisplayContent, GeneralCommandType.DisplayMessage]
supportedCommands: [GeneralCommandType.Play, GeneralCommandType.DisplayMessage]
}
PlatformMediaControl {
@ -80,7 +80,8 @@ ApplicationWindow {
//cover: CoverBackground {CoverPlaceholder { icon.source: "icon.png"; text: "Sailfin"}}
cover: {
// Disabled due to buggy Loader behaviour
if ([MediaPlayer.NoMedia, MediaPlayer.InvalidMedia, MediaPlayer.UnknownStatus].indexOf(_playbackManager.mediaStatus) >= 0) {
if ([MediaPlayer.NoMedia, MediaPlayer.InvalidMedia, MediaPlayer.UnknownStatus].indexOf(_playbackManager.mediaStatus) >= 0
|| _playbackManager.playbackState === MediaPlayer.StoppedState) {
return Qt.resolvedUrl("cover/CollectionPage.qml")
} else {
return Qt.resolvedUrl("cover/NowPlayingCover.qml")
@ -155,6 +156,14 @@ ApplicationWindow {
property bool showDebugInfo: false
}
function navigateToItem(jellyfinId, mediaType, type, isFolder) {
if (mediaType === "Audio") {
playbackManager.playItemId(jellyfinId)
} else {
pageStack.push(Utils.getPageUrl(mediaType, type, isFolder), {"itemId": jellyfinId});
}
}
//FIXME: proper error handling
Connections {
target: apiClient