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:
parent
5d521ee189
commit
40d8a58a5a
7 changed files with 35 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue