Commit 6d3625aa authored by kempe's avatar kempe
Browse files

Added visual indication of current playing station

parent 7871c075
......@@ -6,10 +6,17 @@ ListItem {
property string stationTitle: ""
property string stationInfo: ""
property string stationCurrent: ""
property bool isPlaying: false
width: 400
contentHeight: Theme.itemSizeLarge
Rectangle {
color: isPlaying ? Theme.primaryColor : "transparent"
opacity: 0.1
anchors.fill: parent
}
Row {
anchors.fill: parent
spacing: Theme.paddingLarge
......
......@@ -22,7 +22,7 @@ var dbVersions = {
7: 'INSERT INTO station_backup SELECT name, stationLogo, country, genre, id FROM stations',
8: 'DROP TABLE stations',
9: 'CREATE TABLE stations(url TEXT UNIQUE, name TEXT, stationLogo TEXT, \
country TEXT, genre TEXT, radIoId Text)',
country TEXT, genre TEXT, radIoId INTEGER)',
10: 'INSERT INTO stations(url, name, stationLogo, country, genre, radIoId) \
SELECT rowid, name, stationLogo, country, genre, radIoId FROM station_backup',
11: 'DROP TABLE station_backup'
......
......@@ -7,7 +7,7 @@ FavoritesPageForm {
// Recives index as parameter from signal
onPlayFavorite: {
var station = getStation(index);
console.debug("Playing", station)
console.debug("Playing", JSON.stringify(station))
player.play(station)
}
......
......@@ -40,6 +40,7 @@ Page {
stationIcon: stationLogo
stationTitle: name
stationInfo: "From " + country + ": " + genre
isPlaying: player.stationData !== undefined && player.stationData.url === url
menu: FavoritesListContextMenu {
id: contextMenu
......
......@@ -16,7 +16,6 @@ Page {
property var listType: Utils.Favorites
property bool showSearch: false
property string category: ""
property string value: ""
......@@ -60,6 +59,7 @@ Page {
stationTitle: name
stationInfo: qsTr("From") + " " + country + ": " + genresAndTopics.split(",")[0]
stationCurrent: currentTrack ? currentTrack : "-"
isPlaying: player.stationData !== undefined && player.stationData.radIoId == id
menu: StationsListContextMenu {
id: contextMenu
......@@ -82,6 +82,3 @@ Page {
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment