2 import Sailfish.Silica 1.0
3 import org.nemomobile.configuration 1.0
4 import fi.mikkosoft.xinema 0.1
10 function navigate(dir)
12 var newDir = browseDirectory.directory;
16 browseDirectory.directory = newDir;
21 var newDir = browseDirectory.directory;
22 var slash = newDir.lastIndexOf("/");
24 newDir = newDir.substring(0, slash);
27 browseDirectory.directory = newDir;
38 text: "Set as default location"
40 onClicked: defaultLocation.value = browseDirectory.directory
45 visible: streamControl.title
46 text: streamControl.title
48 onClicked: pageStack.push("PlaybackPage.qml");
54 title: qsTr("Browse files")
57 model: browseDirectory.model
59 delegate: DirectoryEntry
65 if(type==DirectoryModel.ParentDir)
66 return "image://theme/icon-m-back";
67 else if(type==DirectoryModel.SubDir)
68 return "image://theme/icon-m-folder";
77 if(type==DirectoryModel.File)
78 xinemaControl.play_file(browseDirectory.directory+"/"+name);
79 else if(type==DirectoryModel.ParentDir)
81 else if(type==DirectoryModel.SubDir)
86 VerticalScrollDecorator { }
92 control: xinemaControl
95 Component.onCompleted:
97 if(xinemaControl.connected)
98 browseDirectory.directory = defaultLocation.value;
104 control: xinemaControl
105 onPlaybackStateChanged:
107 if(playbackState==StreamControl.Playing && pageContainer.currentPage==page)
109 if(pageContainer.busy)
110 pageContainer.completeAnimation();
111 pageStack.push("PlaybackPage.qml");
119 key: "/fi/mikkosoft/xinema-remote/defaultLocation"