This commit is contained in:
2026-02-09 13:44:10 +01:00
parent 4dd8efd67b
commit 0582996bf2

12
ff
View File

@@ -142,7 +142,7 @@ class video_lines:
def __str__(self): def __str__(self):
string = "Video" string = "Video"
if self.id != None: if self.id != None:
string += f" {self.id}: " string += f" {self.id:02d}: "
else: else:
string += f": " string += f": "
string += f"{self.codec}" string += f"{self.codec}"
@@ -336,7 +336,7 @@ class subtitles:
self.is_default = dispo.get("default") == 1 self.is_default = dispo.get("default") == 1
def __str__(self): 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: if self.codec:
parts.append(self.codec.upper()) parts.append(self.codec.upper())
@@ -542,11 +542,14 @@ def handle_folders(dirs, all_files):
all_files.append(dir_files) all_files.append(dir_files)
if __name__ == "__main__": if __name__ == "__main__":
# print(sys.argv)
file_dir_array = []
if len(sys.argv) == 0: if len(sys.argv) == 0:
print("Something went horribly wrong!") print("Something went horribly wrong!")
if len(sys.argv) == 1: if len(sys.argv) == 1:
current_dir = os.path.dirname(os.path.realpath(__file__)) # current_dir = os.path.dirname(os.path.realpath(__file__))
print(current_dir) current_dir = os.getcwd()
handle_folders([os.path.abspath(current_dir)], file_dir_array)
else: else:
files = [] files = []
dirs = [] dirs = []
@@ -558,7 +561,6 @@ if __name__ == "__main__":
else: else:
np(f"This is not a file or directory: {argv}\nNow canceling!", ERROR_STYLE) np(f"This is not a file or directory: {argv}\nNow canceling!", ERROR_STYLE)
sys.exit() sys.exit()
file_dir_array = []
handle_folders(dirs, file_dir_array) handle_folders(dirs, file_dir_array)
handle_files(files, file_dir_array) handle_files(files, file_dir_array)