 (require 'seq)
 (require 'emms)
 (require 'emms-source-file)
+(require 'emms-playlist-sort)
+(require 'emms-info)
 (require 'hydra)
 (require 'db-emms)
 

                      emms-source-file-default-directory))))))

(defun db/play-auto-playlist-from-git-annex-find ()
  "Interactively query user for a git-annex match expression and
  play resulting list of audio files.

See `db/playlist-files-from-git-annex-find’ for more details."
  (interactive)
  (db/-emms-playlist-from-files
   (call-interactively #'db/playlist-files-from-git-annex-find)))

;; Autogeneration of Playlist

(defcustom db/auto-playlist-file-function #'db/play-auto-playlist-from-git-annex-find
  "Function returning all music files of an automatically generated playlist.

This function should return a list of file names of music files."
  :group 'db-music
  :type 'function)

(defun db/play-auto-playlist ()
  "Automatically generate playlist and play it.

Will use `db/auto-playlist-file-function’ for generating that
playlist.  Current backend is EMMS."
  (interactive)
  (db/-emms-playlist-from-files (funcall db/auto-playlist-file-function)))

