                                           helm-source-emms-dired
                                           helm-source-emms-files))
   :config (progn
-            (require 'emms-setup)
+            (require 'emms)
             (require 'helm-adaptive)))
 
 
  :init (setq emms-source-file-default-directory "~/Documents/media/audio/"
              emms-player-list '(emms-player-mplayer emms-player-mplayer-playlist)
              emms-show-format "NP: %s"
              emms-stream-default-action "play")
  :config (progn
            (emms-all)
            (emms-default-players)

            ;; Reset track description function to personal configuration (it’s
            ;; overwritten by `emms-all’)
            (setq emms-track-description-function 'db/emms-track-description)

            (advice-add 'emms-tag-editor-submit
                        :after (lambda (&rest r)
                                 (ignore r)
                                 (delete-window)))

            (add-hook 'emms-player-started-hook 'emms-show)

            (when (require 'emms-info-mediainfo nil 'no-error)
              (setq emms-info-functions '(emms-info-mediainfo)))

            (emms-mode-line -1)
            (emms-playing-time-enable-display)

            (run-with-timer 0 3600 #'emms-cache-save)

            (unless (eq system-type 'windows-nt)
              (setq emms-source-file-directory-tree-function
                    #'db/emms-source-file-directory-tree-find))

            (add-hook 'emms-playlist-mode-hook
                      (lambda ()
                        (setq emms-playlist-insert-track-function
                              #'db/emms-playlist-mode-insert-track)))

            (run-with-timer 0 3600 #'emms-cache-save)))

;; Make sure emms is up and running when we call functions such as
;; `emms-play-dired’ etc.
(use-package emms-source-file
  :defer t
  :config (require 'emms))

(use-package db-emms
  :commands (db/play-playlist
