« get me outta code hell

heck around with socat stuff - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/players.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-02-04 22:21:48 -0400
committerFlorrie <towerofnix@gmail.com>2020-02-04 22:22:14 -0400
commit4923c4d2b06cda8d1ba0710602f205e9cd3d9d5d (patch)
treed18890e3061a9669500c2d3ef2812802dc369da1 /players.js
parent6a257c10b58af844c8505cb121c090071be9bf64 (diff)
heck around with socat stuff
Diffstat (limited to 'players.js')
-rw-r--r--players.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/players.js b/players.js
index 07b711c..cc0006c 100644
--- a/players.js
+++ b/players.js
@@ -122,7 +122,8 @@ module.exports.ControllableMPVPlayer = class extends module.exports.MPVPlayer {
   playFile(file) {
     let path
     do {
-      path = '/tmp/mtui-socket-' + Math.floor(Math.random() * 10000)
+      // path = '/tmp/mtui-socket-' + Math.floor(Math.random() * 10000)
+      path = './mtui-socket-' + Math.floor(Math.random() * 10000)
     } while (this.existsSync(path))
 
     this.socat = new Socat(path)
@@ -260,11 +261,14 @@ module.exports.SoXPlayer = class extends Player {
 
 module.exports.getPlayer = async function() {
   if (await commandExists('mpv')) {
+    /*
     if (await commandExists('socat')) {
       return new module.exports.ControllableMPVPlayer()
     } else {
       return new module.exports.MPVPlayer()
     }
+    */
+    return new module.exports.ControllableMPVPlayer()
   } else if (await commandExists('play')) {
     return new module.exports.SoXPlayer()
   } else {