Etz
November 23, 2018, 10:24pm
1
At the moment I'm using mp3tag to export playlists with following:
$filename(%_workingdir%.m3u,utf-8)#EXTM3U
$loop(%_directory%)$loop(%_filename_ext%)%_path%
$loopend()$loopend()
Trick is that for fileserver I would like to replace path during Export, so basically:
\\Server\music\Albums\Something\Something\Somefile.mp3 would become ../Albums/Something/Something/Somefile.mp3 during export.
Any ideas how to do it with the least effort?
Florian
November 24, 2018, 8:24am
2
Instead of using %_path% directly, you do some replacements in the form of:
$replace(%_path%,'\\Server\music','..','\','/')
Etz
November 24, 2018, 9:04am
3
Looks good, any Ideas how to actually avoid, hardcoding \\Server\ part?
..\music.. is always static anyways.
Florian
November 24, 2018, 9:18am
4
It depends a little on where you you store your playlists. It looks like they are on
\\Server\music\Playlists\
so you could try
$replace(%_filename_rel%,'\','/')
Etz
November 24, 2018, 9:28am
5
How did you find that out?
But yes, indeed they are stored in \\Server\music\playlists\ later
Etz
November 24, 2018, 4:13pm
7
Thank you @Florian , settled with:
$filename(\\Server\music\playlists\%_workingdir%.m3u,utf-8)#EXTM3U
$loop(%_directory%)$loop(%_filename_ext%)$replace(%_filename_rel%,'\','/')
$loopend()$loopend()