yeungalan 5 anni fa
parent
commit
1f9967944d

+ 6 - 1
Audio/ffmpeg_converter.php

@@ -52,7 +52,12 @@ include '../auth.php';
 			array_push($convertTarget,$filename);
 			array_push($filenames,basename($filename));
 			$ext = pathinfo($filename, PATHINFO_EXTENSION);
-			$realName = hex2bin(str_replace("inith","",basename($filename,"." . $ext))) . ".$ext";
+			if (ctype_xdigit(str_replace("inith","",$filename)) && strlen(str_replace("inith","",$filename)) % 2 == 0) {
+				$realName = hex2bin(str_replace("inith","",basename($filename,"." . $ext))) . ".$ext";
+			}else{
+				$realName = basename($filename,"." . $ext).".$ext";
+			}	
+			
 			echo '<div class="item" id="file'.$count.'" style="width:100%;overflow-wrap: break-word;overflow-x:hidden;"><i id="icon'.$count.'" class="loading spinner icon"></i>&nbsp&nbsp&nbsp'.$realName.'</div>';
 			$count++;
 		}

BIN
Audio/uploads/Chōcho - Transient Blue.mp3


BIN
Audio/uploads/Chōcho - Transient Blue.mp4


BIN
Audio/uploads/inith65666768.mp3


BIN
Audio/uploads/きみのなは.mp3


+ 1 - 1
Audio/worker-asm.js

@@ -1,4 +1,4 @@
-importScripts('ffmpeg-all-codecs.js');
+importScripts('./ffmpeg-all-codecs.js');
 
 var now = Date.now;
 

BIN
Photo/.DS_Store


BIN
Photo/storage/新海監督/天気の子.jpg


+ 2 - 3
Video/index.php

@@ -107,12 +107,11 @@ if (isset($_GET['filepath']) && $_GET['filepath'] != "" ){
 			$videos = glob($playlist . '/*.mp4');
 			
 			//check if PHP was higher than 7.4, if true then not using inith filename
-			if(ctype_xdigit($playlist)){
+			if(ctype_xdigit(basename($playlist))){
 				$playlistName = hex2bin(basename($playlist));
 			}else{
 				$playlistName = basename($playlist);
 			}
-
 			
 			$box = str_replace("%PlayListName%",$playlistName,$templateA);
 			if (count($videos) != 0){
@@ -137,7 +136,7 @@ if (isset($_GET['filepath']) && $_GET['filepath'] != "" ){
 			}
 		
 			if (count($videos) != 0){
-        	    echo str_replace("%PlayPlayList%","vidPlay.php?src=".$videos[0]."&playlist=uploads",$templateC);
+        	    echo str_replace("%PlayPlayList%","vidPlay.php?src=".$videos[0]."&playlist=".basename($playlist),$templateC);
         	}else{
         	    echo str_replace("%PlayPlayList%","",$templateC);
         	}

BIN
Video/playlist/你的名字/きみのなは.mp4


+ 16 - 6
Video/vidPlay.php

@@ -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