2 import Sailfish.Silica 1.0
3 import org.nemomobile.configuration 1.0
4 import fi.mikkosoft.xinema 0.1
11 function navigate(dir)
13 var newDir = browseDirectory.directory;
17 browseDirectory.directory = newDir;
22 var newDir = browseDirectory.directory;
23 var slash = newDir.lastIndexOf("/");
25 newDir = newDir.substring(0, slash);
28 browseDirectory.directory = newDir;
39 text: "Set as default location"
41 onClicked: defaultLocation.value = browseDirectory.directory
46 visible: streamControl.title
47 text: streamControl.title
49 onClicked: pageStack.push("PlaybackPage.qml");
55 title: qsTr("Browse files")
58 model: browseDirectory.model
60 delegate: DirectoryEntry
66 if(type==DirectoryModel.ParentDir)
67 return "image://theme/icon-m-back";
68 else if(type==DirectoryModel.SubDir)
69 return "image://theme/icon-m-folder";
78 if(type==DirectoryModel.File)
79 xinemaControl.play_file(browseDirectory.directory+"/"+name);
80 else if(type==DirectoryModel.ParentDir)
82 else if(type==DirectoryModel.SubDir)
87 VerticalScrollDecorator { }
93 control: xinemaControl
96 Component.onCompleted:
98 if(xinemaControl.connected)
99 browseDirectory.directory = defaultLocation.value;
105 control: xinemaControl
106 onPlaybackStateChanged:
108 if(playbackState==StreamControl.Playing && pageContainer.currentPage==page)
110 if(pageContainer.busy)
111 pageContainer.completeAnimation();
112 pageStack.push("PlaybackPage.qml");
120 key: "/fi/mikkosoft/xinema-remote/defaultLocation"