|
|
@@ -126,7 +126,11 @@ include_once '../auth.php';
|
|
|
if ($_GET['playlist'] == "uploads"){
|
|
|
$playListName = "Unsorted";
|
|
|
}else{
|
|
|
- $playListName = "";
|
|
|
+ if(ctype_xdigit($_GET['playlist'])){
|
|
|
+ $playListName = hex2bin($_GET['playlist']);
|
|
|
+ }else{
|
|
|
+ $playListName = $_GET['playlist'];
|
|
|
+ }
|
|
|
}
|
|
|
$playlistDir = $_GET['playlist'];
|
|
|
echo '<div class="ts segment">';
|
|
|
@@ -144,7 +148,13 @@ include_once '../auth.php';
|
|
|
<div class="six wide column"><div class="ts fluid segment playable" align="center">%Operations%</div></div>
|
|
|
</div>';
|
|
|
$playlist = $_GET['playlist'];
|
|
|
- $files = glob($playlist . '/*.mp4');
|
|
|
+ if($playlist == "uploads"){ //actually that will had bug if playlist is named "uploads", but well anyway Toby won't care
|
|
|
+ $files = glob($playlist . '/*.mp4');
|
|
|
+ }else if(strpos($playlist,"/media/") !== false){
|
|
|
+ $files = glob($playlist . '/*.mp4');
|
|
|
+ }else{
|
|
|
+ $files = glob("./playlist/".$playlist . '/*.mp4');
|
|
|
+ }
|
|
|
if (isset($_GET['isExt']) && $_GET['isExt'] == "true"){
|
|
|
$extAccess = true;
|
|
|
}else{
|
|
|
@@ -241,11 +251,11 @@ include_once '../auth.php';
|
|
|
if (GetStorage('VidAutoPlay') == 'true'){
|
|
|
//Play next item in the playlist
|
|
|
for(var i = 0;i<playlist.length;i++){
|
|
|
- //console.log(thisVidName,playlist[i]);
|
|
|
+ console.log(thisVidName,playlist[i]);
|
|
|
thisVidName = thisVidName.replace("\\","/");
|
|
|
- //console.log(thisVidName);
|
|
|
- playlist[i] = playlist[i].replace("\\","/");
|
|
|
- //console.log(playlist[i]);
|
|
|
+ console.log(thisVidName);
|
|
|
+ playlist[i] = playlist[i].replace("\\","/").replace("./","");
|
|
|
+ console.log(playlist[i]);
|
|
|
if (thisVidName.includes(playlist[i])){
|
|
|
if (i + 1 == playlist.length){
|
|
|
//if reaching the end of the playlist
|