Liquidsoap: how to remove track from playlist?

285 Views Asked by At

I have a goal to stream new files from a directory with Liquidsoap.
1. Inotify tracks target folder and adds all new files to playlist:

#!/bin/bash
inotifywait -e close_write --format '%f' -m "/my/folder" | \
(
while read NEWFILE
do
echo $NEWFILE >> playlist.txt
done
)

2. Liquidsoap plays playlist.txt

#!/usr/bin/liquidsoap
radio = mksafe(playlist(loop=false,mode='normal',reload=0,reload_mode="watch", "playlist.txt"))

3. last step: Liquidsoap should remove track from playlist.txt after it have been played
Need help with removing!

1

There are 1 best solutions below

1
Oleg M On BEST ANSWER

To remove some track after it has been played just add prefix="tmp:"

radio = mksafe(playlist(prefix="tmp:",loop=false,mode='normal',reload=0,reload_mode="watch", "playlist.txt"))