aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mpd-currentsong.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/mpd-currentsong.js b/mpd-currentsong.js
index 98b6d4a..df83f9f 100644
--- a/mpd-currentsong.js
+++ b/mpd-currentsong.js
@@ -69,9 +69,11 @@ let INFO = xml`
(function () {
let socketService =
- let (stsvc = Cc['@mozilla.org/network/socket-transport-service;1'])
- let (svc = stsvc.getService())
- svc.QueryInterface(Ci.nsISocketTransportService);
+ (function () {
+ let stsvc = Cc['@mozilla.org/network/socket-transport-service;1'];
+ let svc = stsvc.getService();
+ return svc.QueryInterface(Ci.nsISocketTransportService);
+ })();
function getSongInfo () {
let host = liberator.globalVariables.mpd_currentsong_host || 'localhost';