fix ff
This commit is contained in:
24
ff
24
ff
@@ -142,7 +142,7 @@ class video_lines:
|
||||
def __str__(self):
|
||||
string = "Video"
|
||||
if self.id != None:
|
||||
string += f" {self.id}: "
|
||||
string += f" {self.id:02d}: "
|
||||
else:
|
||||
string += f": "
|
||||
string += f"{self.codec}"
|
||||
@@ -336,7 +336,7 @@ class subtitles:
|
||||
self.is_default = dispo.get("default") == 1
|
||||
|
||||
def __str__(self):
|
||||
parts = [f"Subtitle {self.id}:" if self.id is not None else "Subtitle:"]
|
||||
parts = [f"Subtitle {self.id:02d}:" if self.id is not None else "Subtitle:"]
|
||||
|
||||
if self.codec:
|
||||
parts.append(self.codec.upper())
|
||||
@@ -542,11 +542,14 @@ def handle_folders(dirs, all_files):
|
||||
all_files.append(dir_files)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# print(sys.argv)
|
||||
file_dir_array = []
|
||||
if len(sys.argv) == 0:
|
||||
print("Something went horribly wrong!")
|
||||
if len(sys.argv) == 1:
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
print(current_dir)
|
||||
# current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
current_dir = os.getcwd()
|
||||
handle_folders([os.path.abspath(current_dir)], file_dir_array)
|
||||
else:
|
||||
files = []
|
||||
dirs = []
|
||||
@@ -558,13 +561,12 @@ if __name__ == "__main__":
|
||||
else:
|
||||
np(f"This is not a file or directory: {argv}\nNow canceling!", ERROR_STYLE)
|
||||
sys.exit()
|
||||
file_dir_array = []
|
||||
handle_folders(dirs, file_dir_array)
|
||||
handle_files(files, file_dir_array)
|
||||
|
||||
for element in file_dir_array:
|
||||
if type(element) == list:
|
||||
get_folder_info(element)
|
||||
else:
|
||||
file = element
|
||||
get_file_info(file, file)
|
||||
for element in file_dir_array:
|
||||
if type(element) == list:
|
||||
get_folder_info(element)
|
||||
else:
|
||||
file = element
|
||||
get_file_info(file, file)
|
||||
|
||||
Reference in New Issue
Block a user