Fix file sort when tags applied
This commit is contained in:
parent
8dafbccef1
commit
3804171708
@ -12,7 +12,10 @@ def create_convert_parser(subparsers):
|
|||||||
epilog="Example: python convert_encoding.py /path/to/directory",
|
epilog="Example: python convert_encoding.py /path/to/directory",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"directory", type=str, help="Path to target directory for conversion"
|
"--directory",
|
||||||
|
type=str,
|
||||||
|
help="Path to target directory for conversion",
|
||||||
|
default=".",
|
||||||
)
|
)
|
||||||
parser.set_defaults(func=convert_file_encoding.execute)
|
parser.set_defaults(func=convert_file_encoding.execute)
|
||||||
|
|
||||||
@ -23,7 +26,10 @@ def create_split_parser(subparsers):
|
|||||||
description="Разделение FLAC-файла по CUE с переносом оригинала во временную директорию",
|
description="Разделение FLAC-файла по CUE с переносом оригинала во временную директорию",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"directory", type=str, help="Path to target directory with flac and cue files"
|
"--directory",
|
||||||
|
type=str,
|
||||||
|
help="Path to target directory with flac and cue files",
|
||||||
|
default=".",
|
||||||
)
|
)
|
||||||
parser.set_defaults(func=split_flac.execute)
|
parser.set_defaults(func=split_flac.execute)
|
||||||
|
|
||||||
|
@ -69,7 +69,9 @@ def process_directory(directory):
|
|||||||
|
|
||||||
# Добавление метаданных
|
# Добавление метаданных
|
||||||
print("Add tags from CUE-file...")
|
print("Add tags from CUE-file...")
|
||||||
split_files = [f for f in os.listdir(directory) if f.endswith(".flac")]
|
split_files = sorted(
|
||||||
|
[f for f in os.listdir(directory) if f.endswith(".flac")]
|
||||||
|
)
|
||||||
|
|
||||||
if split_files:
|
if split_files:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
|
Loading…
Reference in New Issue
Block a user