Post Reply 
Playlists on MacOS
04-12-2024, 09:57
Post: #6
RE: Playlists on MacOS
I have no idea if this will work on macOS, but you could script it:

Code:
PLAYLIST_DIR="/Users/myUser/myMusic/myPlaylists"

RELATIVE_PATH=$(realpath -m --relative-to="$PLAYLIST_DIR" "$PWD")
find . -name "*.flac" -printf "%f\0" | awk -v PATH="${RELATIVE_PATH}/" 'BEGIN {RS="\0"}; {print PATH$0}' > "playlist.m3u8"

If you run this within the folder containing the FLAC files it will generate playlist.m3u8 containing relative paths, which would need moving to the playlist root.

It can be changed to write directly to the playlist folder but I thought it safer to start with to write to the current directory.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Playlists on MacOS - dr-schiemann - 03-12-2024, 09:26
RE: Playlists on MacOS - simoncn - 03-12-2024, 11:21
RE: Playlists on MacOS - dr-schiemann - 03-12-2024, 19:20
RE: Playlists on MacOS - simoncn - 03-12-2024, 22:20
RE: Playlists on MacOS - Charles7 - 04-12-2024, 01:27
RE: Playlists on MacOS - simbun - 04-12-2024 09:57

Forum Jump:


User(s) browsing this thread: 1 Guest(s)