modules.addons.rename
Audio File Renamer
A tool to rename audio files to a standardized format: “(track name) - (album)” while removing special characters that can cause issues with music players.
For file names, includes: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]()-_~@=+
Functions
|
Main function for the audio renamer. |
Parse command line arguments. |
|
|
Parse character replacement arguments from command line. |
Classes
|
Audio file renamer that standardizes filenames based on metadata |
- class modules.addons.rename.AudioRenamer(options: Dict[str, Any])[source]
Bases:
object
Audio file renamer that standardizes filenames based on metadata
Initialize the AudioRenamer with the specified options.
- Parameters:
options (dict) – Dictionary of renaming options
- __init__(options: Dict[str, Any])[source]
Initialize the AudioRenamer with the specified options.
- Parameters:
options (dict) – Dictionary of renaming options
- get_file_metadata(filepath: str) Dict[str, str] [source]
Extract metadata from an audio file using FFprobe.
- generate_new_filename(filepath: str) str | None [source]
Generate a new filename based on metadata using the specified format.
- modules.addons.rename.parse_arguments()[source]
Parse command line arguments.
- Returns:
Parsed arguments
- Return type: