Browse Source

Merge branch 'master' of l3kn/mpdel into master

Awesome! Thank you.
master
Damien Cassou 3 months ago
parent
commit
bd84203091
3 changed files with 22 additions and 0 deletions
  1. +6
    -0
      README.org
  2. +10
    -0
      mpdel-core.el
  3. +6
    -0
      mpdel-tablist.el

+ 6
- 0
README.org View File

@@ -214,6 +214,12 @@ If your music files are hosted on the computer where MPDel is running,
you can configure ~libmpdel-music-directory~ to navigate to a music
file with ~C-x C-j~ from any MPDel buffer.

** Filter Expressions

The command ~mpdel-core-search-by-filter~ can be used to search for
songs using a [[https://www.musicpd.org/doc/html/protocol.html#filters][MPD filter expression]].

This requires a MPD version >= 0.21.
** License

See [[file:COPYING][COPYING]]. Copyright (c) 2018 Damien Cassou.

+ 10
- 0
mpdel-core.el View File

@@ -126,6 +126,16 @@ Interactively, ask for TITLE."
(interactive (list (read-from-minibuffer "Search for title: ")))
(mpdel-core-open (libmpdel-search-criteria-create :type "title" :what title)))

;;;###autoload
(defun mpdel-core-search-by-filter (filter)
"Display all songs matching the mpd filter expression FILTER.
Interactively, ask for FILTER.

Example: ((artist == 'name') AND (any contains 'text'))
Documentation: https://www.musicpd.org/doc/html/protocol.html#filters"
(interactive (list (read-from-minibuffer "Search with filter: ")))
(mpdel-core-open (libmpdel-filter-create :text filter)))

;;; Mode


+ 6
- 0
mpdel-tablist.el View File

@@ -72,6 +72,9 @@
(navigel-method mpdel navigel-entity-tablist-mode ((_entity libmpdel-search-criteria))
(mpdel-tablist-mode))

(navigel-method mpdel navigel-entity-tablist-mode ((_entity libmpdel-filter))
(mpdel-tablist-mode))

(navigel-method mpdel navigel-entity-tablist-mode ((_entity libmpdel-artist))
(mpdel-tablist-mode))

@@ -118,6 +121,9 @@
(navigel-method mpdel navigel-tablist-format ((_entity libmpdel-search-criteria))
(mpdel-tablist--song-format))

(navigel-method mpdel navigel-tablist-format ((_entity libmpdel-filter))
(mpdel-tablist--song-format))

(navigel-method mpdel navigel-tablist-format ((_entity (eql current-playlist)))
(mpdel-tablist--song-format))


Loading…
Cancel
Save