Konstantin <[email protected]> writes:

> Hello,
>
> Thank you for the emms.
>
> My entire music collection is on the remote server, to which i have
> access trough ssh.

I think of this as a file-system level issue. Why not mount the remote
directory instead?

> I can access it through tramp(emacs) and add a file to emms
> playlist.
> As the result, in the playlist buffer i get a file, for example:
> /ssh:Server:/home/user/1.mp3
> (One can use other protocols /rsync:, /sshx:, /sftp:)
>
> But emms-mpv does not play such files.
> I would like to ask a question is it possible to fix it?
>
> As i see it, there are two reasons why mpv doesn't play such files.
> (As i understand vlc also)
> 1. Mpv uses different naming scheme than tramp.
> So instead of /sftp: one should write sftp://
>
> 2. mpv does not support protocols rsync, sshx, ssh only sftp
>
> I would suggest changing few lines in emms-player-mpv-start.
> (Although i did it through advice-add)
>
> --- emms-player-mpv.el        2024-12-02 17:19:18.807604784 +0100
> +++ emms-player-mpv-new.el    2024-12-04 15:36:39.132959493 +0100
> @@ -722,7 +722,10 @@
>    (setq emms-player-mpv-stopped nil)
>    (emms-player-mpv-proc-playing nil)
>    (let*
> -      ((track-name (emms-track-get track 'name))
> +      ((name-origin (emms-track-get track 'name))
> +       (track-name  (if (string-match 
> "^/ssh:\\|^/sshx:\\|^/rsync:\\|^/sftp:" name-origin)
> +                        (replace-match "sftp://"; nil nil name-origin)
> +                      name-origin))
>         (track-playlist-option
>          (and emms-player-mpv-use-playlist-option
>               (memq (emms-track-get track 'type)
>
> What would be better solution?

Perhaps this is a good solution (taking the above into consideration); I
haven't looked into it yet. I would like to read Mike Kazantsev's view
on it first.

-- 
   "Cut your own wood and it will warm you twice"

Reply via email to