Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Setting playlists to relative.
#1
Hi,

I'm new to Moode, but familiar with mpd. I'm just setting up my installation, which has all been easy, so far. I've got a question on playlists. I have a large playlist which has be set up to be relative to the music directory. If I save a test playlist, it saves it as absolute. mpd.conf does not have the line in 'save_absolute_paths_in_playlists "yes"', and, as far as I know the default for mpd is relative playlists, so unsure why absolute playlists are being used.

I was going to try setting 'save_absolute_paths_in_playlists "no"' in mpd.conf, but didnt want to put a contradicory configuration in, if it's set somewhere else.

Any help would be appreciated.

Thanks
Reply
#2
What are steps to reproduce the issue?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Install latest Moodle. Configure sound board. Configure music directory by attaching NAS drive via NFS. Load a song to the current queue via mpc. Save current queue as a test playlist via mpc. Have a look at playlist, and it's absolute.
Reply
#4
(08-04-2025, 02:50 PM)DWC-Imagery Wrote: Install latest Moodle. Configure sound board. Configure music directory by attaching NAS drive via NFS. Load a song to the current queue via mpc. Save current queue as a test playlist via mpc. Have a look at playlist, and it's absolute.

Not in my system, it isn't.

In /etc/mpd.conf we find

Code:
rho@moodex:/var/lib/mpd/playlists $ more /etc/mpd.conf
#########################################
# This file is managed by moOde          
#########################################

music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
...

If we examine the /var/lib/mpd/music directory

Code:
rho@moodex:/var/lib/mpd/playlists $ ls -l /var/lib/mpd/music
total 16
lrwxrwxrwx 1 root root     8 Jun  6 12:08 NAS -> /mnt/NAS
lrwxrwxrwx 1 root root     9 Jun  6 12:08 NVME -> /mnt/NVME
lrwxrwxrwx 1 root root    11 Jun  6 12:08 OSDISK -> /mnt/OSDISK
drwxrwxrwx 2 root root 16384 Jul 28 07:19 RADIO
lrwxrwxrwx 1 root root     9 Jun  6 12:08 SATA -> /mnt/SATA
lrwxrwxrwx 1 root root    11 Jun  6 12:08 SDCARD -> /mnt/SDCARD
lrwxrwxrwx 1 root root     6 Jun  6 12:08 USB -> /media

And finally, looking at the Favorites playlist after I added a few tracks

Code:
rho@moodex:~ $ more /var/lib/mpd/playlists/Favorites.m3u
#EXTGENRE:Various
#EXTIMG:local
OSDISK/TomLehrerRevisited/2 I Wanna Go Back to Dixie.mp3
OSDISK/TomLehrerRevisited/6 Lobachevsky.mp3

This all looks relative to me.

Regards,
Kent
Reply
#5
I'm not able to repro

Example from USB stick
Code:
pi@lcd:~ $ mpc add "USB/VFAT64/Test/DSF/Dsf_6/2L-45_stereo_01_DSF_5644k_1b.dsf"
pi@lcd:~ $ mpc save tim
pi@lcd:~ $ cat /var/lib/mpd/playlists/tim.m3u
OSDISK/Stereo Test/LRMonoPhase4.flac
USB/VFAT64/Test/DSF/Dsf_6/2L-45_stereo_01_DSF_5644k_1b.dsf
pi@lcd:~ $

Are there other steps?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
Thanks TheOldPresbyope & Tim. That's also what I'm seeing, but I thought that was absolute. The playlists I'd created on my old mpd install look like this:

500wonproject/500wonproject - Luvstory.mp3

But saved on Moodle, it looks like this, as do yours:

NAS/Music/500wonproject/500wonproject - Luvstory.mp3

I was trying to avoid having to alter 40000 lines of a playlist, if I could get away with it.

Thanks
Reply
#7
(08-04-2025, 03:05 PM)TheOldPresbyope Wrote:
Code:
rho@moodex:~ $ more /var/lib/mpd/playlists/Favorites.m3u
#EXTGENRE:Various
#EXTIMG:local
OSDISK/TomLehrerRevisited/2 I Wanna Go Back to Dixie.mp3
OSDISK/TomLehrerRevisited/6 Lobachevsky.mp3

This all looks relative to me.

Regards,
Kent

Off topic but:  In honor of Tom Lehrer, a great playlist.
Reply
#8
Looks like I'm going to have to write a bash script to alter the playlist, unless someone's got one handy.
Reply
#9
@DWC-Imagery

Sorry, I don't, but it doesn't look very challenging to do so.

@nosferatu_cat

I'm old enough to remember Tom Lehrer from before he worked as a songwriter for the "That Was the Week That Was" show here in the USA.

When he died a week or so ago, I realized I had disposed of his LPs as part of my downsizing some years ago. Thankfully, he put many of his recordings online, expressly free to the public.

The easiest path is to download the album RAR files from https://tomlehrersongs.com/albums/

Use unrar to extract the album, add cover art from, say, discogs.com, and you're in for an evening of fun. 

The between-songs commentary during his live performances is a treat. I especially enjoy his introduction of himself on  the "Tom Lehrer Revisited" album.

Regards,
Kent
Reply
#10
Here's the script that I used:

FILENAME=bigplaylist.m3u
typeset TMP_FILE=$( mktemp )

touch "${TMP_FILE}"
cp -p $FILENAME "${TMP_FILE}"
sed -e 's/^/NAS\/Music\//' "${TMP_FILE}" > $FILENAME
Reply


Forum Jump: