cmus / cmus

Small, fast and powerful console music player for Unix-like operating systems.
https://cmus.github.io/
GNU General Public License v2.0
5.57k stars 468 forks source link

feature: accept relative paths in files/m3u #791

Open f1-outsourcing opened 6 years ago

f1-outsourcing commented 6 years ago

1) uname -a:

CentOS release 6.9 (Final)
Linux svr 4.15.9-1.el6.elrepo.x86_64 #1 SMP Sun Mar 11 16:36:41 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux

2) cmus --version:

cmus v2.4.1
Copyright 2004-2006 Timo Hirvonen
Copyright 2008-2011 Various Authors

3) cmus --plugins:

Input Plugins: /usr/lib64/cmus/ip
  mad:
    Priority: 55
    File Types: mp3 mp2
    MIME Types: audio/mpeg audio/x-mp3 audio/x-mpeg
  mpc:
    Priority: 50
    File Types: mpc mpp mp+
    MIME Types: audio/x-musepack
  modplug:
    Priority: 50
    File Types: mod s3m xm it 669 amf ams dbm dmf dsm far mdl med mtm okt ptm stm ult umx mt2 psm
    MIME Types:
  wav:
    Priority: 50
    File Types: wav
    MIME Types:
  aac:
    Priority: 50
    File Types: aac
    MIME Types: audio/aac audio/aacp
  mp4:
    Priority: 50
    File Types: mp4 m4a m4b
    MIME Types:
  vorbis:
    Priority: 50
    File Types: ogg
    MIME Types: application/ogg audio/x-ogg
  flac:
    Priority: 50
    File Types: flac fla
    MIME Types:
  wavpack:
    Priority: 50
    File Types: wv
    MIME Types: audio/x-wavpack
  ffmpeg:
    Priority: 30
    File Types: ac3 aif aifc aiff ape au mka shn tta wma aac fla flac m4a m4b mp+ mp2 mp3 mp4 mpc mpp ogg wav wv
    MIME Types:

Output Plugins: /usr/lib64/cmus/op
  pulse
  alsa
  oss
  ao

I have created m3u files with relative paths to sound files and stored them in the root folder of a tree with these sound files. And this works quite nicely with vlc and dlna.

this works

cmus-remote playlist-test.m3u

pwd 
/mnt/audio

cat playlist-test.m3u
/mnt/audio/test1.wav
/mnt/audio/test2.wav

This does not

cmus-remote playlist-test.m3u

pwd 
/mnt/audio

cat playlist-test.m3u
test1.wav
test2.wav
f1-outsourcing commented 6 years ago

As a work a round i am using now this, but this minor change would be nice

while read i; do cmus-remote "$i"; done < playlist-test.m3u