Commit 5ccc5d30 authored by Camilo Higuita's avatar Camilo Higuita

more fixes and done for tonight

parent 270ca957
......@@ -104,13 +104,17 @@ function appendTrack(track)
{
if(track)
{
var empty = root.mainPlaylist.list.count
root.mainPlaylist.list.model.append(track)
if(empty === 0 && root.mainPlaylist.list.count>0)
var empty = root.mainPlaylist.list.count
if((empty > 0 && track.url !== root.mainPlaylist.list.model.get(root.mainPlaylist.list.count-1).url) || empty === 0)
{
root.mainPlaylist.list.currentIndex = 0
playTrack(root.mainPlaylist.list.model.get(0))
root.mainPlaylist.list.model.append(track)
if(empty === 0 && root.mainPlaylist.list.count>0)
{
root.mainPlaylist.list.currentIndex = 0
playTrack(root.mainPlaylist.list.model.get(0))
}
}
}
}
......
......@@ -72,12 +72,10 @@ ItemDelegate
Layout.fillHeight: true
Layout.row: 1
Layout.column: 2
Layout.rowSpan: 2
Layout.alignment: Qt.AlignCenter
verticalAlignment: Qt.AlignVCenter
text: track
font.bold: true
elide: Text.ElideRight
......
......@@ -61,7 +61,7 @@ Item
Layout.fillWidth: true
Layout.preferredHeight: columnWidth
Layout.maximumHeight: 300
visible: list.count>0
visible: list.count > 0
Rectangle
{
......
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