branch: externals/emms commit c83157d9707cc84fc9bbbd8b330484850044a4f5 Author: Yoni Rabkin <y...@gnu.org> Commit: Yoni Rabkin <y...@gnu.org>
* emms-source-playlist.el: add native playlist to cache The function for parsing native playlists doesn't use the emms-track constructor because the data is already in the correct format. However this means that it misses the call to `emms-cache-set-function`, meaning that the playlist doesn't get added to the cache and the emms-browser. Patch by Leo Okawa Ericson. --- emms-source-playlist.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/emms-source-playlist.el b/emms-source-playlist.el index aca63b798f..e23f1b8d74 100644 --- a/emms-source-playlist.el +++ b/emms-source-playlist.el @@ -209,9 +209,16 @@ See `emms-source-playlist-formats' for a list of supported formats." (defun emms-source-playlist-parse-native (file) "Parse the native EMMS playlist in the current buffer." (ignore file) - (save-excursion - (goto-char (point-min)) - (read (current-buffer)))) + (let ((tracks (save-excursion + (goto-char (point-min)) + (read (current-buffer))))) + (mapc (lambda (track) + (funcall emms-cache-set-function + (emms-track-type track) + (emms-track-name track) + track)) + tracks) + tracks)) (defun emms-source-playlist-unparse-native (in out) "Unparse a native playlist from IN to OUT.