TonieToolbox 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- TonieToolbox/__init__.py +1 -1
- TonieToolbox/__main__.py +5 -2
- TonieToolbox/audio_conversion.py +27 -2
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/METADATA +1 -1
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/RECORD +9 -9
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/WHEEL +0 -0
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/entry_points.txt +0 -0
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/licenses/LICENSE.md +0 -0
- {tonietoolbox-0.5.0.dist-info → tonietoolbox-0.5.1.dist-info}/top_level.txt +0 -0
TonieToolbox/__init__.py
CHANGED
TonieToolbox/__main__.py
CHANGED
@@ -208,8 +208,11 @@ def main():
|
|
208
208
|
|
209
209
|
# ------------- Show Media Tags -------------
|
210
210
|
if args.show_tags:
|
211
|
-
|
212
|
-
|
211
|
+
files = get_input_files(args.input_filename)
|
212
|
+
logger.debug("Found %d files to process", len(files))
|
213
|
+
if len(files) == 0:
|
214
|
+
logger.error("No files found for pattern %s", args.input_filename)
|
215
|
+
sys.exit(1)
|
213
216
|
for file_index, file_path in enumerate(files):
|
214
217
|
tags = get_file_tags(file_path)
|
215
218
|
if tags:
|
TonieToolbox/audio_conversion.py
CHANGED
@@ -287,9 +287,34 @@ def get_input_files(input_filename):
|
|
287
287
|
|
288
288
|
logger.debug("Found %d files in list file", len(input_files))
|
289
289
|
else:
|
290
|
-
logger.debug("Processing
|
290
|
+
logger.debug("Processing input path: %s", input_filename)
|
291
|
+
|
292
|
+
# Try the exact pattern first
|
291
293
|
input_files = sorted(filter_directories(glob.glob(input_filename)))
|
292
|
-
|
294
|
+
if input_files:
|
295
|
+
logger.debug("Found %d files matching exact pattern", len(input_files))
|
296
|
+
else:
|
297
|
+
# If no extension is provided, try appending a wildcard for extension
|
298
|
+
_, ext = os.path.splitext(input_filename)
|
299
|
+
if not ext:
|
300
|
+
wildcard_pattern = input_filename + ".*"
|
301
|
+
logger.debug("No extension in pattern, trying with wildcard: %s", wildcard_pattern)
|
302
|
+
input_files = sorted(filter_directories(glob.glob(wildcard_pattern)))
|
303
|
+
|
304
|
+
# If still no files found, try treating it as a directory
|
305
|
+
if not input_files and os.path.exists(os.path.dirname(input_filename)):
|
306
|
+
potential_dir = input_filename
|
307
|
+
if os.path.isdir(potential_dir):
|
308
|
+
logger.debug("Treating input as directory: %s", potential_dir)
|
309
|
+
dir_glob = os.path.join(potential_dir, "*")
|
310
|
+
input_files = sorted(filter_directories(glob.glob(dir_glob)))
|
311
|
+
if input_files:
|
312
|
+
logger.debug("Found %d audio files in directory", len(input_files))
|
313
|
+
|
314
|
+
if input_files:
|
315
|
+
logger.debug("Found %d files after trying alternatives", len(input_files))
|
316
|
+
else:
|
317
|
+
logger.warning("No files found for pattern %s even after trying alternatives", input_filename)
|
293
318
|
|
294
319
|
logger.trace("Exiting get_input_files() with %d files", len(input_files))
|
295
320
|
return input_files
|
@@ -1,7 +1,7 @@
|
|
1
|
-
TonieToolbox/__init__.py,sha256=
|
2
|
-
TonieToolbox/__main__.py,sha256=
|
1
|
+
TonieToolbox/__init__.py,sha256=xOsJnu--2TXqOdJT6N_Z3UF2fguZbJpn8PjkEDC__Qk,96
|
2
|
+
TonieToolbox/__main__.py,sha256=4zpa_i70Gr4KCbAGNa1aWRMbRaxFmH12yj7r-rNqq8M,33771
|
3
3
|
TonieToolbox/artwork.py,sha256=Q1cwcJu-bmBiDLOzYTIcX1UAh-Bf6vgQY1PqW0KXZlw,4359
|
4
|
-
TonieToolbox/audio_conversion.py,sha256=
|
4
|
+
TonieToolbox/audio_conversion.py,sha256=VbntGybLdmhvokN_YJOGejyqvDTINT56t4N-aTyl9jE,16902
|
5
5
|
TonieToolbox/constants.py,sha256=BQ6eUNvT3eXgsz8KFYMrqpn5vRPXrp2d6folxP6H03E,4374
|
6
6
|
TonieToolbox/dependency_manager.py,sha256=EvVUO4T1CrhUXlrVk9HBgCRDER3b1BRNdgkZLSpCTho,27921
|
7
7
|
TonieToolbox/filename_generator.py,sha256=RqQHyGTKakuWR01yMSnFVMU_HfLw3rqFxKhXNIHdTlg,3441
|
@@ -18,9 +18,9 @@ TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C
|
|
18
18
|
TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
|
19
19
|
TonieToolbox/tonies_json.py,sha256=Yftk_eUK2UJPY5Tm7JSoWORUuiVpnUe7z4-mDhRWbrM,59950
|
20
20
|
TonieToolbox/version_handler.py,sha256=Uiob27NKvemJUR-SPPdhQLYp07o8eDyCik_KAY4KPDY,9869
|
21
|
-
tonietoolbox-0.5.
|
22
|
-
tonietoolbox-0.5.
|
23
|
-
tonietoolbox-0.5.
|
24
|
-
tonietoolbox-0.5.
|
25
|
-
tonietoolbox-0.5.
|
26
|
-
tonietoolbox-0.5.
|
21
|
+
tonietoolbox-0.5.1.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
|
22
|
+
tonietoolbox-0.5.1.dist-info/METADATA,sha256=HZllZyXc1vDfMW-rziCcCeWwcCeNRBmUi6Hy4JPi06I,26843
|
23
|
+
tonietoolbox-0.5.1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
24
|
+
tonietoolbox-0.5.1.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
|
25
|
+
tonietoolbox-0.5.1.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
|
26
|
+
tonietoolbox-0.5.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|