Skip to content

Commit fd3b6f0

Browse files
committed
play recursive work in progress
1 parent e1dd956 commit fd3b6f0

13 files changed

+98
-78
lines changed

htdocs/cardEdit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
$exec = "rm ".$fileshortcuts."; echo '".$post['audiofolder']."' > ".$fileshortcuts."; chmod 777 ".$fileshortcuts;
130130
exec($exec);
131131
// success message
132-
$messageSuccess = "<p>".$lang['cardRegisterFolder2Card']." ".$lang['globalFolder']." '".$post['streamFolderName']."' ".$lang['globalCardId']." '".$post['cardID']."'</p>";
132+
$messageSuccess = "<p>".$lang['cardRegisterFolder2Card']." ".$lang['globalFolder']." '".$post['audiofolder']."' ".$lang['globalCardId']." '".$post['cardID']."'</p>";
133133
}
134134
} else {
135135
/*

htdocs/cardRegisterNew.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
$exec = "rm ".$fileshortcuts."; echo '".$post['audiofolder']."' > ".$fileshortcuts."; chmod 777 ".$fileshortcuts;
153153
exec($exec);
154154
// success message
155-
$messageSuccess = "<p>".$lang['cardRegisterFolder2Card']." ".$lang['globalFolder']." '".$post['streamFolderName']."' ".$lang['globalCardId']." '".$post['cardID']."'</p>";
155+
$messageSuccess = "<p>".$lang['cardRegisterFolder2Card']." ".$lang['globalFolder']." '".$post['audiofolder']."' ".$lang['globalCardId']." '".$post['cardID']."'</p>";
156156
}
157157
} else {
158158
/*

htdocs/func.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ function index_folders_print($item, $key, $level=0)
225225
<h3>";
226226
if($contentTree[$key]['count_files'] > 0) {
227227
print "
228-
<a href='?play=".$contentTree[$key]['path_abs']."' class='btn-panel-big' title='Play folder'><i class='mdi mdi-play-box-outline'></i></a>";
228+
<a href='?play=".$contentTree[$key]['path_rel']."' class='btn-panel-big' title='Play folder'><i class='mdi mdi-play-box-outline'></i></a>";
229229
}
230230
if($contentTree[$key]['count_subdirs'] > 0) {
231231
print "
232-
<a href='?play=".$contentTree[$key]['path_abs']."&recursive=true' class='btn-panel-big' title='Play (sub)folders'><i class='mdi mdi-animation-play-outline'></i></a>";
232+
<a href='?play=".$contentTree[$key]['path_rel']."&recursive=true' class='btn-panel-big' title='Play (sub)folders'><i class='mdi mdi-animation-play-outline'></i></a>";
233233
}
234234
print "
235235
<span class='mb-0' data-toggle='collapse' data-target='#collapse".$contentTree[$key]['id']."' aria-expanded='true' aria-controls='collapse".$contentTree[$key]['id']."' style='cursor:pointer;' title='Show contents'>
@@ -259,9 +259,9 @@ function index_folders_print($item, $key, $level=0)
259259
}
260260
if( $foundResume == "OFF" ) {
261261
// do stuff
262-
print "<a href='?enableresume=".$contentTree[$key]['path_abs']."' class='btn btn-warning '>".$lang['globalResume'].": ".$lang['globalOff']." <i class='mdi mdi-toggle-switch-off-outline' aria-hidden='true'></i></a> ";
262+
print "<a href='?enableresume=".$contentTree[$key]['path_rel']."' class='btn btn-warning '>".$lang['globalResume'].": ".$lang['globalOff']." <i class='mdi mdi-toggle-switch-off-outline' aria-hidden='true'></i></a> ";
263263
} elseif($foundResume == "ON") {
264-
print "<a href='?disableresume=".$contentTree[$key]['path_abs']."' class='btn btn-success '>".$lang['globalResume'].": ".$lang['globalOn']." <i class='mdi mdi-toggle-switch' aria-hidden='true'></i></a>";
264+
print "<a href='?disableresume=".$contentTree[$key]['path_rel']."' class='btn btn-success '>".$lang['globalResume'].": ".$lang['globalOn']." <i class='mdi mdi-toggle-switch' aria-hidden='true'></i></a> ";
265265
}
266266
}
267267

@@ -277,9 +277,9 @@ function index_folders_print($item, $key, $level=0)
277277
}
278278
if( $foundShuffle == "OFF" ) {
279279
// do stuff
280-
print "<a href='?enableshuffle=".$contentTree[$key]['path_abs']."' class='btn btn-warning '>".$lang['globalShuffle'].": ".$lang['globalOff']." <i class='mdi mdi-toggle-switch-off-outline' aria-hidden='true'></i></a></span> ";
280+
print "<a href='?enableshuffle=".$contentTree[$key]['path_rel']."' class='btn btn-warning '>".$lang['globalShuffle'].": ".$lang['globalOff']." <i class='mdi mdi-toggle-switch-off-outline' aria-hidden='true'></i></a> ";
281281
} elseif($foundShuffle == "ON") {
282-
print "<a href='?disableshuffle=".$contentTree[$key]['path_abs']."' class='btn btn-success '>".$lang['globalShuffle'].": ".$lang['globalOn']." <i class='mdi mdi-toggle-switch' aria-hidden='true'></i></a>";
282+
print "<a href='?disableshuffle=".$contentTree[$key]['path_rel']."' class='btn btn-success '>".$lang['globalShuffle'].": ".$lang['globalOn']." <i class='mdi mdi-toggle-switch' aria-hidden='true'></i></a> ";
283283
}
284284
}
285285
print "
@@ -292,7 +292,7 @@ function index_folders_print($item, $key, $level=0)
292292
if(in_array($contentTree[$key]['basename'], $shortcuts)) {
293293
foreach ($shortcuts as $IDkey => $IDvalue) {
294294
if($IDvalue == $contentTree[$key]['basename']) {
295-
$IDchips .= " <a href='cardEdit.php?cardID=$key'>".$IDkey." <i class='mdi mdi-wrench'></i></a> | ";
295+
$IDchips .= " <a href='cardEdit.php?cardID=$IDkey'>".$IDkey." <i class='mdi mdi-wrench'></i></a> | ";
296296
}
297297
}
298298
$IDchips = rtrim($IDchips, "| "); // get rid of trailing slash

htdocs/inc.formCardEdit.php

+49-25
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
foreach ($shortcutstemp as $shortcuttemp) {
2828
$shortcuts[basename($shortcuttemp)] = trim(file_get_contents($shortcuttemp));
2929
}
30+
//print "<pre>"; print_r($shortcuts); print "</pre>"; //???
3031
?>
3132

3233
<span class="help-block"><?php print $fdata['streamURL_help']; ?></span>
@@ -45,30 +46,57 @@
4546
<select id="audiofolder" name="audiofolder" class="form-control">
4647
<option value="false"><?php print $lang['cardFormFolderSelectDefault']; ?></option>
4748
<?php
48-
// read the subfolders of $Audio_Folders_Path
49-
$audiofolders = array_filter(glob($Audio_Folders_Path.'/*'), 'is_dir');
50-
usort($audiofolders, 'strcasecmp');
49+
/*
50+
* read the subfolders of $Audio_Folders_Path
51+
*/
52+
$audiofolders_abs = dir_list_recursively($Audio_Folders_Path);
53+
usort($audiofolders_abs, 'strcasecmp');
54+
/*
55+
* get relative paths for pulldown
56+
*/
57+
$audiofolders = array();
58+
foreach($audiofolders_abs as $audiofolder){
59+
/*
60+
* get the relative path as value, set the absolute path as key
61+
*/
62+
$relpath = substr($audiofolder, strlen($Audio_Folders_Path) + 1, strlen($audiofolder));
63+
if($relpath != "") {
64+
$audiofolders[$audiofolder] = substr($audiofolder, strlen($Audio_Folders_Path) + 1, strlen($audiofolder));
65+
}
66+
}
67+
//print "<pre>"; print_r($audiofolders); print "</pre>"; //???
68+
69+
70+
/*
71+
// counter for ID of each folder
72+
$idcounter = 0;
73+
// go through all folders
74+
foreach($audiofolders as $keyfolder => $audiofolder) {
75+
if($post['folder'] != $keyfolder) {
76+
print " <option value='".$keyfolder."'";
77+
print ">".$audiofolder."</option>\n";
78+
}
79+
}
80+
*/
81+
82+
83+
// counter for ID of each folder
84+
$idcounter = 0;
5185

5286
// check if we can preselect an audiofolder if NOT a foldername was posted
53-
if(! isset($fpost['audiofolder'])) {
87+
if(! isset($fpost['audiofolder']) OR trim($fpost['audiofolder']) == "") {
5488
if(array_key_exists($fpost['cardID'], $shortcuts)) {
55-
print "got one!!!";
5689
$fpost['audiofolder'] = $shortcuts[$fpost['cardID']];
5790
}
5891
}
59-
60-
// counter for ID of each folder
61-
$idcounter = 0;
6292

6393
// go through all folders
64-
foreach($audiofolders as $audiofolder) {
65-
66-
print " <option value='".basename($audiofolder)."'";
67-
if(basename($audiofolder) == $fpost['audiofolder']) {
94+
foreach($audiofolders as $keyfolder => $audiofolder) {
95+
print " <option value='".$audiofolder."'";
96+
if($audiofolder == $fpost['audiofolder']) {
6897
print " selected=selected";
6998
}
70-
print ">".basename($audiofolder)."</option>\n";
71-
99+
print ">".$audiofolder."</option>\n";
72100
}
73101
?>
74102
</select>
@@ -144,12 +172,9 @@
144172
<div class="form-group">
145173
<label class="col-md-4 control-label" for="YTaudiofolder"></label>
146174
<div class="col-md-6">
147-
<select id="YTaudiofolder" name="YTaudiofolder" class="form-control">
175+
<select id="YTaudiofolder" name="audiofolder" class="form-control">
148176
<option value="false"><?php print $lang['cardFormYTSelectDefault']; ?></option>
149177
<?php
150-
// read the subfolders of $Audio_Folders_Path
151-
$audiofolders = array_filter(glob($Audio_Folders_Path.'/*'), 'is_dir');
152-
usort($audiofolders, 'strcasecmp');
153178

154179
// check if we can preselect an audiofolder if NOT a foldername was posted
155180
if(! isset($fpost['audiofolder'])) {
@@ -162,13 +187,12 @@
162187
$idcounter = 0;
163188

164189
// go through all folders
165-
foreach($audiofolders as $audiofolder) {
166-
167-
print " <option value='".basename($audiofolder)."'";
168-
if(basename($audiofolder) == $fpost['audiofolder']) {
190+
foreach($audiofolders as $keyfolder => $audiofolder) {
191+
print " <option value='".$audiofolder."'";
192+
if($audiofolder == $fpost['audiofolder']) {
169193
print " selected=selected";
170194
}
171-
print ">".basename($audiofolder)."</option>\n";
195+
print ">".$audiofolder."</option>\n";
172196

173197
}
174198
?>
@@ -181,8 +205,8 @@
181205
<label class="col-md-4 control-label" for="YTstreamFolderName"></label>
182206
<div class="col-md-6">
183207
<input value="<?php
184-
if (isset($fpost['streamFolderName'])) {
185-
print $fpost['streamFolderName'];
208+
if (isset($fpost['YTstreamFolderName'])) {
209+
print $fpost['YTstreamFolderName'];
186210
}
187211
?>" id="YTstreamFolderName" name="YTstreamFolderName" placeholder="<?php print $lang['cardFormYTFolderPlaceholder']; ?>" class="form-control input-md" type="text">
188212
<span class="help-block"><?php print $lang['cardFormYTFolderHelp']; ?></span>

htdocs/inc.header.php

+26-29
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@
454454
}
455455

456456
// enable resume
457-
if(isset($urlparams['enableresume']) && $urlparams['enableresume'] != "" && is_dir(urldecode($urlparams['enableresume']))) {
457+
if(isset($urlparams['enableresume']) && $urlparams['enableresume'] != "" && is_dir(urldecode($Audio_Folders_Path."/".$urlparams['enableresume']))) {
458458
if($debug == "true") {
459459
print "Command: ".$exec;
460460
} else {
461461
// pass folder to resume script
462462
// escape whitespaces with backslashes
463-
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/resume_play.sh -c=enableresume -d=".preg_replace('/\s+/', '\ ',basename($urlparams['enableresume']));
463+
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/resume_play.sh -c=enableresume -d=".preg_replace('/\s+/', '\ ',$urlparams['enableresume']);
464464
exec($exec);
465465

466466
/* redirect to drop all the url parameters */
@@ -470,46 +470,44 @@
470470
}
471471

472472
// disable resume
473-
if(isset($urlparams['disableresume']) && $urlparams['disableresume'] != "" && is_dir(urldecode($urlparams['disableresume']))) {
473+
if(isset($urlparams['disableresume']) && $urlparams['disableresume'] != "" && is_dir($Audio_Folders_Path."/".urldecode($urlparams['disableresume']))) {
474+
// pass folder to resume script
475+
// escape whitespaces with backslashes
476+
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/resume_play.sh -c=disableresume -d=".preg_replace('/\s+/', '\ ',$urlparams['disableresume']);
474477
if($debug == "true") {
475478
print "Command: ".$exec;
476479
} else {
477-
// pass folder to resume script
478-
// escape whitespaces with backslashes
479-
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/resume_play.sh -c=disableresume -d=".preg_replace('/\s+/', '\ ',basename($urlparams['disableresume']));
480-
exec($exec);
481-
482-
/* redirect to drop all the url parameters */
483-
header("Location: ".$conf['url_abs']);
484-
exit;
480+
exec($exec);
481+
/* redirect to drop all the url parameters */
482+
header("Location: ".$conf['url_abs']);
483+
exit;
485484
}
486485
}
487486

488487
// enable shuffle
489-
if(isset($urlparams['enableshuffle']) && $urlparams['enableshuffle'] != "" && is_dir(urldecode($urlparams['enableshuffle']))) {
488+
if(isset($urlparams['enableshuffle']) && $urlparams['enableshuffle'] != "" && is_dir(urldecode($Audio_Folders_Path."/".$urlparams['enableshuffle']))) {
489+
// pass folder to resume script
490+
// escape whitespaces with backslashes
491+
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/shuffle_play.sh -c=enableshuffle -d=".preg_replace('/\s+/', '\ ',$urlparams['enableshuffle']);
490492

491493
if($debug == "true") {
492494
print "Command: ".$exec;
493495
} else {
494-
// pass folder to resume script
495-
// escape whitespaces with backslashes
496-
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/shuffle_play.sh -c=enableshuffle -d=".preg_replace('/\s+/', '\ ',basename($urlparams['enableshuffle']));
497-
exec($exec);
498-
499-
/* redirect to drop all the url parameters */
500-
header("Location: ".$conf['url_abs']);
501-
exit;
496+
exec($exec);
497+
/* redirect to drop all the url parameters */
498+
header("Location: ".$conf['url_abs']);
499+
exit;
502500
}
503501
}
504502

505503
// disable shuffle
506-
if(isset($urlparams['disableshuffle']) && $urlparams['disableshuffle'] != "" && is_dir(urldecode($urlparams['disableshuffle']))) {
504+
if(isset($urlparams['disableshuffle']) && $urlparams['disableshuffle'] != "" && is_dir(urldecode($Audio_Folders_Path."/".$urlparams['disableshuffle']))) {
505+
// pass folder to resume script
506+
// escape whitespaces with backslashes
507+
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/shuffle_play.sh -c=disableshuffle -d=".preg_replace('/\s+/', '\ ',$urlparams['disableshuffle']);
507508
if($debug == "true") {
508509
print "Command: ".$exec;
509510
} else {
510-
// pass folder to resume script
511-
// escape whitespaces with backslashes
512-
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/shuffle_play.sh -c=disableshuffle -d=".preg_replace('/\s+/', '\ ',basename($urlparams['disableshuffle']));
513511
exec($exec);
514512

515513
/* redirect to drop all the url parameters */
@@ -534,15 +532,14 @@
534532
}
535533

536534
// play folder audio files
537-
if(isset($urlparams['play']) && $urlparams['play'] != "" && is_dir(urldecode($urlparams['play']))) {
535+
if(isset($urlparams['play']) && $urlparams['play'] != "" && is_dir(urldecode($Audio_Folders_Path."/".$urlparams['play']))) {
536+
// pass folder to playout script
537+
// escape whitespaces with backslashes
538+
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/rfid_trigger_play.sh -d=".preg_replace('/\s+/', '\ ',$urlparams['play']);
538539
if($debug == "true") {
539540
print "Command: ".$exec;
540541
} else {
541-
// pass folder to playout script
542-
// escape whitespaces with backslashes
543-
$exec = "/usr/bin/sudo ".$conf['scripts_abs']."/rfid_trigger_play.sh -d=".preg_replace('/\s+/', '\ ',basename($urlparams['play']));
544542
exec($exec);
545-
546543
/* redirect to drop all the url parameters */
547544
header("Location: ".$conf['url_abs']);
548545
exit;

htdocs/inc.processAddNewStream.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
// create folder $post['streamFolderName']
3-
$exec = "mkdir '".$conf['shared_abs']."/audiofolders/".$post['streamFolderName']."'";
3+
$exec = "sudo mkdir '".$Audio_Folders_Path."/".$post['streamFolderName']."'; chmod 777 '".$Audio_Folders_Path."/".$post['streamFolderName']."'";
44
exec($exec);
5-
//print "<p>".$exec."</p>";//???
5+
print "<p>".$exec."</p>";//???
66
// figure out $filestream depending on $post['streamType']
77
switch($post['streamType']) {
88
case "podcast":
@@ -32,4 +32,4 @@
3232
$exec = "rm ".$fileshortcuts."; echo '".$post['streamFolderName']."' > '".$fileshortcuts."'; chmod 777 '".$fileshortcuts."'";
3333
exec($exec);
3434
//print "<p>".$exec."</p>";//???
35-
?>
35+
?>

htdocs/inc.processAddYT.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
22
if(isset($post['streamFolderName'])) {
33
// create new folder
4-
$exec = "mkdir '".$conf['shared_abs']."/audiofolders/".$post['streamFolderName']."'";
4+
$exec = "sudo mkdir '".$Audio_Folders_Path."/".$post['streamFolderName']."'; chmod 777 '".$Audio_Folders_Path."/".$post['streamFolderName']."'";
55
exec($exec);
6-
$foldername = $post['streamFolderName'];
6+
$foldername = $Audio_Folders_Path."/".$post['streamFolderName'];
77
// New folder is created so we link a RFID to it. Write $post['streamFolderName'] to cardID file in shortcuts
8-
$exec = "rm ".$fileshortcuts."; echo '".$post['streamFolderName']."' > ".$fileshortcuts."; chmod 777 ".$fileshortcuts;
8+
$exec = "rm ".$fileshortcuts."; echo '".$foldername."' > ".$fileshortcuts."; chmod 777 ".$fileshortcuts;
99
exec($exec);
1010
} else {
1111
// link to existing audiofolder
12-
$foldername = $post['audiofolder'];
12+
$foldername = $Audio_Folders_Path."/".$post['audiofolder'];
1313
}
14-
$exec = "cd '".$conf['shared_abs']."/audiofolders/".$foldername."' && youtube-dl -f bestaudio --extract-audio --audio-format mp3 ".$post['YTstreamURL']." > ".$conf['shared_abs']."/youtube-dl.log 2>&1 &";
14+
$exec = "cd '".$foldername."' && youtube-dl -f bestaudio --extract-audio --audio-format mp3 ".$post['YTstreamURL']." > ".$conf['shared_abs']."/youtube-dl.log 2>&1 &";
1515
exec($exec);
1616
?>

htdocs/inc.viewFolderTree.php

100644100755
+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
2222
$contentTree = array(); // this will be the tree we need for display
2323

24-
2524
/*
2625
* now we need to collect some extra info such as: subfolders? files in folder?
2726
* And create the final array with all this information to display the tree
@@ -136,4 +135,4 @@
136135
</div><!-- ./ class='col-md-12' -->";
137136
}
138137

139-
?>
138+
?>

htdocs/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
// increase ID counter
8888
$idcounter++;
8989

90-
//include('inc.viewFolderTree.php');
90+
include('inc.viewFolderTree.php');
9191
include('inc.viewFolderWell.php');
9292

9393
}

htdocs/lang/lang-en.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
$lang['cardRegisterMessageDefault'] = "The 'Latest Card ID' value in the form is updated on the fly as you swipe a RFID card.<br/>(Requires Javascript in the browser to be enabled.)";
8080
$lang['cardEditMessageDefault'] = "The card IDs used in this system are listed on the <a href='index.php' class='mainMenu'><i class='mdi mdi-home'></i> home page</a>.";
8181
$lang['cardRegisterMessageSwipeNew'] = "Swipe another card, if you want to register more cards.";
82-
$lang['cardEditMessageInputNew'] = "Type another card ID pick one from the list on the <a href='index.php' class='mainMenux'><i class='mdi mdi-home'></i> home page</a>.";
82+
$lang['cardEditMessageInputNew'] = "Type another card ID pick one from the list on the <a href='index.php' class='mainMenu'><i class='mdi mdi-home'></i> home page</a>.";
8383
$lang['cardRegisterErrorTooMuch'] = "<p>This is too much! Please select only one audiofolder. Make up your mind.</p>";
8484
$lang['cardRegisterErrorStreamAndAudio'] = "<p>This is too much! Either a stream or an audio folder. Make up your mind.</p>";
8585
$lang['cardRegisterErrorStreamOrAudio'] = "<p>This is not enough! Add a stream or select an audio folder. Or 'Cancel' to go back to the home page.</p>";

scripts/inc.writeFolderConfig.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# VARIABLES
3737

3838
# $DEBUG true|false
39-
DEBUG=true
39+
DEBUG=false
4040

4141
# Set the date and time of now
4242
NOW=`date +%Y-%m-%d.%H:%M:%S`

scripts/playout_controls.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ case $COMMAND in
358358
if [ $DEBUG == "true" ]; then echo "echo ${VALUE} > $PATHDATA/../settings/Latest_Folder_Played" >> $PATHDATA/../logs/debug.log; fi
359359
if [ $DEBUG == "true" ]; then echo "VAR Latest_Folder_Played: $Latest_Folder_Played" >> $PATHDATA/../logs/debug.log; fi
360360

361-
mpc load "${VALUE}" && $PATHDATA/resume_play.sh -c=resume
361+
mpc load "${VALUE//\//SLASH}" && $PATHDATA/resume_play.sh -c=resume
362362
if [ "$DEBUG" == "true" ]; then echo "mpc load "${VALUE}" && $PATHDATA/resume_play.sh -c=resume"; fi
363363
# call shuffle_ceck to enable/disable folder-based shuffeling
364364
$PATHDATA/shuffle_play.sh -c=shuffle_check

scripts/rfid_trigger_play.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ if [ "$FOLDER" ]; then
298298
elif [ -d "$AUDIOFOLDERSPATH/$FOLDER" ]
299299
then
300300
# set path to playlist
301-
PLAYLISTPATH="/tmp/$FOLDER.m3u"
301+
PLAYLISTPATH="/tmp/${FOLDER//\//SLASH}.m3u"
302302

303303
if [ $DEBUG == "true" ]; then echo "VAR FOLDER: $FOLDER" >> $PATHDATA/../logs/debug.log; fi
304304
if [ $DEBUG == "true" ]; then echo "VAR PLAYLISTPATH: $PLAYLISTPATH" >> $PATHDATA/../logs/debug.log; fi

0 commit comments

Comments
 (0)