Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3

Hybrid View

  1. #1
    Senior Member
    Join Date
    Dec 2010
    Posts
    138

    Force LMS to create 'relative' path Playlists ?

    Is it possible to force LMS to create playlists that use 'relative' paths rather than 'absolute' paths?

    As a consequence of moving from the Synology NAS LMS 'package' to the Docker based image I can now not share my playlists with the Synology DS Audio application.

    On my Synology NAS, music is stored in '/volume1/Music/<artist>'

    The LMS Package for Synology would create playlists like:
    Code:
    #CURTRACK 0
    #EXTM3U
    #EXTURL:file:///volume1/Music/The%20Angels/Beyond%20Salvation/01%20The%20Angels%20-%20Dogs%20Are%20Talking.mp3
    #EXTINF:205,Dogs Are Talking
    /volume1/Music/The Angels/Beyond Salvation/01 The Angels - Dogs Are Talking.mp3
    These playlists could be used as-is by both LMS and the Synology DS Audio application.

    But, now with the move to the Docker LMS image on the NAS, and the mapping of /volume1/Music to the container mount of /music, the playlists now get created as:
    Code:
    #CURTRACK 0
    #EXTM3U
    #EXTURL:file:///music/The%20Angels/Beyond%20Salvation/01%20The%20Angels%20-%20Dogs%20Are%20Talking.mp3
    #EXTINF:205,Dogs Are Talking
    /music/The Angels/Beyond Salvation/01 The Angels - Dogs Are Talking.mp3

    This works OK for LMS (in Docker) - but the native Audio player on the Synology - DS Audio (which I use for external NAS Music access) can no longer use these playlists as "/music" doesn't exist on the NAS as it's the container mount point.
    If the playlists are created in relative path format (eg. ../The Angels) DS Audio all works fine.

    Is there a way to force LMS to create playlists using relative paths?

    Thanks.

  2. #2
    Senior Member
    Join Date
    Dec 2020
    Posts
    131
    I'd just use `sed` to rewrite the entries, e.g. you could run the following command hourly through cron:
    Code:
    find /volume1/Music -mmin -60 -type f -exec sed -e "#/volume1/Music/#../#" -e  "#/music/#../#" -i {} \;
    (i.e. search folder `/volume1/Music` for files modified less than 60 minutes ago and replace every instance of `/volume1/Music/` and `/music/` with `../` in each file found)

  3. #3
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,203
    Quote Originally Posted by kidhazy View Post
    Is it possible to force LMS to create playlists that use 'relative' paths rather than 'absolute' paths?
    I don't think so.

    but you can either
    - bind mount (or symlink) /volume1/Music as (to) /music on the NAS
    - mount your music as /volume1/Music instead of /music in the container
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | DB Optimizer | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •