[-]
[+]
|
Changed |
_service:tar_git:harbour-piratefm.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,7 @@
<service name="tar_git">
<param name="url">https://github.com/kimmoli/piratefm.git</param>
<param name="branch">master</param>
- <param name="revision">4a0cd63b054de10b0fd7fc12d4921d56a5d5d864</param>
+ <param name="revision">6754789fefefc794727648f90648d6390db96f76</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-piratefm-0.0.4.tar.bz2/qml/piratefm.qml
^
|
@@ -2,18 +2,67 @@
import Sailfish.Silica 1.0
import QtMultimedia 5.0
import QtQuick.LocalStorage 2.0
+import org.nemomobile.dbus 2.0
ApplicationWindow
{
initialPage: Qt.resolvedUrl("pages/Tuner.qml")
cover: Qt.resolvedUrl("cover/CoverPage.qml")
-
+
Radio
{
id: radio
band: Radio.FM
}
+ Component.onCompleted:
+ {
+ radio.stop()
+ rmeftimer.start()
+ }
+
+ Timer
+ {
+ id: rmeftimer
+ interval: 500
+ onTriggered:
+ {
+ radio.start()
+ routeManager.enableFmRadio()
+ }
+ }
+
+ DBusInterface
+ {
+ // dbus-send --system --type=method_call --print-reply
+ // --dest=org.nemomobile.Route.Manager /org/nemomobile/Route/Manager
+ // org.nemomobile.Route.Manager.Enable string:fmradioloopback
+
+ id: routeManager
+
+ bus: DBus.SystemBus
+ service: 'org.nemomobile.Route.Manager'
+ path: '/org/nemomobile/Route/Manager'
+ iface: 'org.nemomobile.Route.Manager'
+
+ signalsEnabled: true
+
+ function enableFmRadio()
+ {
+ call('Enable', "fmradioloopback")
+ }
+
+ function audioRouteChanged(a, b)
+ {
+ if (a == "headphone")
+ {
+ radio.stop()
+ rmeftimer.start()
+ }
+ }
+ }
+
+
ListModel
{
id: stations
|