Jump to content

MPD (music player daemon) client


Recommended Posts

Alfred MPD

 

Control MPD from Alfred.

screenshot.png

Installation

 

Download the latest version from GitHub releases or Packal.

 

Usage

  • mpd [<query>] — View mpd status and search for tracks
    • On actions:       
      •   or ⌘+<NUM> — Perform action
    • On tracks:
      • or ⌘+<NUM> — Queue track
      • ⌘+↩ — Play track
      • ⌥+↩ — Clear queue and play track
      • ^+↩ — Queue album
    • On albums/artists/playlists/types:
      •  , or ⌘+<NUM> — Search within albums/artists/playlists/types

 

Licencing, thanks

 

This workflow is released under the MIT licence.
It is based on the Alfred-Workflow library, which is also released under the MIT licence.

 

Changelog

 

0.1.0

  1. First release
Edited by deanishe
Link to comment
  • 5 years later...
  • 4 weeks later...

Please help me. What is the problem?

I just reinstalled MacOS from scratch, installed Python 2. Installed new versione of MPD.

 

[10:23:39.483] Logging Started...
[10:23:41.890] MPD[Script Filter] Queuing argument ''
[10:23:42.163] MPD[Script Filter] Script with argv '' finished
[10:23:42.166] ERROR: MPD[Script Filter] Code 1: .
10:23:42 workflow.py:2061 DEBUG    ---------- MPD (0.1.3) ----------
10:23:42 workflow.py:1468 DEBUG    reading settings from /Users/daniele/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.mpd/settings.json
10:23:42 workflow.py:2343 DEBUG    update check not due
10:23:42 ampd:686 DEBUG    opts={'--help': False,
 '--version': False,
 '<action>': None,
 '<query>': u'',
 'do': False,
 'search': True,
 'stats': False,
 'status': False}
10:23:42 ampd:687 DEBUG    mpd: host=localhost, port=6600
10:23:42 workflow.py:1695 DEBUG    loading cached data: /Users/daniele/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.mpd/__workflow_latest_version.cpickle
10:23:42 mpd.py:140 DEBUG    mpc command: ['stats']
10:23:42 workflow.py:2080 ERROR    [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/workflow/workflow.py", line 2073, in run
    func(self)
  File "./ampd", line 691, in main
    return do_search(opts)
  File "./ampd", line 485, in do_search
    return do_stats(opts)
  File "./ampd", line 614, in do_stats
    st = mpd.stats()
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/mpd.py", line 260, in stats
    for line in mpc('stats').splitlines():
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/mpd.py", line 144, in mpc
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/Users/daniele/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/Users/daniele/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
10:23:42 workflow.py:2082 INFO     for assistance, see: https://github.com/deanishe/alfred-mpd/issues
10:23:42 workflow.py:2103 DEBUG    ---------- finished in 0.038s ----------
[10:23:42.169] MPD[Script Filter] {
  "items": [
    {
      "valid": false,
      "subtitle": "[Errno 2] No such file or directory",
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      },
      "title": "Error in workflow 'MPD'"
    }
  ]
}

 

Link to comment
6 hours ago, Daniele said:

Please help me. What is the problem?

I just reinstalled MacOS from scratch, installed Python 2. Installed new versione of MPD.

 

[10:23:39.483] Logging Started...
[10:23:41.890] MPD[Script Filter] Queuing argument ''
[10:23:42.163] MPD[Script Filter] Script with argv '' finished
[10:23:42.166] ERROR: MPD[Script Filter] Code 1: .
10:23:42 workflow.py:2061 DEBUG    ---------- MPD (0.1.3) ----------
10:23:42 workflow.py:1468 DEBUG    reading settings from /Users/daniele/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.mpd/settings.json
10:23:42 workflow.py:2343 DEBUG    update check not due
10:23:42 ampd:686 DEBUG    opts={'--help': False,
 '--version': False,
 '<action>': None,
 '<query>': u'',
 'do': False,
 'search': True,
 'stats': False,
 'status': False}
10:23:42 ampd:687 DEBUG    mpd: host=localhost, port=6600
10:23:42 workflow.py:1695 DEBUG    loading cached data: /Users/daniele/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.mpd/__workflow_latest_version.cpickle
10:23:42 mpd.py:140 DEBUG    mpc command: ['stats']
10:23:42 workflow.py:2080 ERROR    [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/workflow/workflow.py", line 2073, in run
    func(self)
  File "./ampd", line 691, in main
    return do_search(opts)
  File "./ampd", line 485, in do_search
    return do_stats(opts)
  File "./ampd", line 614, in do_stats
    st = mpd.stats()
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/mpd.py", line 260, in stats
    for line in mpc('stats').splitlines():
  File "/Volumes/GoogleDrive/Il mio Drive/Alfred.alfredpreferences/workflows/user.workflow.182A2FAE-2750-4640-AF36-4B51A5F96294/lib/mpd.py", line 144, in mpc
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/Users/daniele/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/Users/daniele/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
10:23:42 workflow.py:2082 INFO     for assistance, see: https://github.com/deanishe/alfred-mpd/issues
10:23:42 workflow.py:2103 DEBUG    ---------- finished in 0.038s ----------
[10:23:42.169] MPD[Script Filter] {
  "items": [
    {
      "valid": false,
      "subtitle": "[Errno 2] No such file or directory",
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      },
      "title": "Error in workflow 'MPD'"
    }
  ]
}

 

SOLVED: simply, mpc was installed via brew, so in another dir. Need to specity the correct path for mpc in the workflow configuration. Thanks 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...