Refactor Player, fix playing indicator
Some checks failed
Build / build-linux (push) Failing after 17s
Build / build-windows (push) Has been cancelled

This commit is contained in:
Dark Steveneq
2025-10-14 13:36:21 +02:00
parent def26f8fda
commit d46d37c465
4 changed files with 107 additions and 69 deletions

View File

@@ -19,20 +19,45 @@ ApplicationWindow {
Layout.fillWidth: true
Label {
text: "QYR"
text: "QYouRadio"
heading: "h3"
font.bold: true
}
Item {
Layout.fillWidth: true
}
// Item {
// Layout.fillWidth: true
// }
Label {
visible: Player.playing
text: "Playback active"
heading: "h4"
font.bold: true
Rectangle {
Layout.leftMargin: 20
visible: Player.currentIndex != null
color: Colors.primary
radius: 5
clip: true
width: 320
height: 36
Label {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 1
anchors.leftMargin: 4
anchors.rightMargin: 4
text: (Player.loading ? "Loading " : "Playing ") + (Player.currentIndex != null ? qsTr(Player.currentStream.name) : "")
heading: "h2"
}
Label {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottomMargin: 1
anchors.leftMargin: 4
anchors.rightMargin: 4
text: "Title will go here"
heading: "h4"
}
}
Item {
@@ -79,8 +104,7 @@ ApplicationWindow {
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Autoradio")
streamURL: "https://youradio.nonamesoft.xyz/api/autoradio"
index: 0
}
}
Loader {
@@ -88,8 +112,7 @@ ApplicationWindow {
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Live Mix")
streamURL: "https://youradio.nonamesoft.xyz/api/live"
index: 1
}
}
Loader {
@@ -97,8 +120,7 @@ ApplicationWindow {
asynchronous: true
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Deep Bass")
streamURL: "https://youradio.nonamesoft.xyz/api/bassboosted"
index: 2
}
}
}