403Webshell
Server IP : 45.94.215.241  /  Your IP : 216.73.216.243
Web Server : Apache/2.4.66 (Ubuntu)
System : Linux srv2937474766 7.0.0-28-generic #28-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 21 01:01:36 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/IMDB/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/IMDB/series_subtitle_renamer.py
import mysql.connector 
import glob
import os
from os import system, name 
import shutil
season_no = 2
base_dir = "/Volumes/192.168.100.100/Users/masoud/Downloads/True.Detective.S01.720p.BluRay.x264-ShAaNiG"
os.chdir(base_dir)
def clear(): 
	_ = system('clear') 

#clear()
files = glob.glob("*.mkv")
print(files)


i=1;
for file in files:
	#clear()
	#print(file)
	filename,extention = os.path.splitext(file)
	print(filename)
	print(extention)
	tmp = file.split(".")
	extention=tmp[-1]
	#primaryTitle=primaryTitle.replace(".","%")
	#mycursor.execute("SELECT * FROM basics where concat(primaryTitle,' ',startYear) like %s and titleType='movie' order by startYear",("%" + primaryTitle + "%",))
	mycursor.execute("select a.tconst,a.primaryTitle,a.titleType,b.episodeNumber,b.seasonNumber from basics a , episodes b where a.tconst=b.tconst and episodeNumber=%s and b.parentTconst='tt2661044' and titleType='tvEpisode' and b.seasonNumber=%s order by 3",(i,season_no))	
	myresult = mycursor.fetchall()
	
	i = i+1
	if len(myresult)==1:
		for x in myresult:
			tconst=x[0]
			primaryTitle=x[1]
			episodeNumber=str(x[3]).zfill(2)
			seasonNumber=str(x[4]).zfill(2)
			file_name="S%sE%s - %s.%s" %(seasonNumber,episodeNumber,primaryTitle,extention) 	
			file_name=file_name.replace(":","")
			#print(file_name)
			#os.rename(os.path.join(base_dir, file),os.path.join(base_dir, file_name))
			#shutil.move(os.path.join(base_dir, file_name),"/run/media/masoud/09126907530/Movies/Fixed")
			old=os.path.join(base_dir, file)
			new=os.path.join(base_dir, file_name)
			command = 'mv "%s" "%s"' %(old,new)
			print(command)

Youez - 2016 - github.com/yon3zu
LinuXploit