- Run GUI:
python src/music_gui.pyorpython src/__init__.py - Install dependencies:
pip install -r requirements.txt - Activate venv:
source .venv/bin/activate(if using virtual environment) - Test single file:
python -m pytest path/to/test_file.py::test_function(no tests currently exist)
- Imports: Standard library first, then third-party (pandas, tkinter, yt_dlp), then local imports
- Naming: snake_case for functions/variables, PascalCase for classes (e.g.,
MusicDownloaderApp) - Functions: Use descriptive docstrings with param/return descriptions
- Error handling: Use try/except blocks with specific error messages, return tuples (success, error_msg)
- File paths: Use
os.path.join()for cross-platform compatibility - String handling: Use f-strings for formatting,
.strip()for cleaning input - GUI: Use tkinter with proper widget organization and threading for long operations
- Dialog handling: Use
root.after()andwait_variable()for thread-safe GUI operations
src/: Main source codesrc/helpers/: Utility modules (download_utils.py, metadata_utils.py)- Excel files for music data input/output
- Dependencies: yt-dlp, pandas, openpyxl, tkinter
- Excel file with columns: Title | Artist | YouTube Link | Genre
- Used by GUI to download and organize music files
- New Feature: If YouTube Link is empty, app will search YouTube with "Title Artist" and show 4 options to choose from
- Skip Option: Users can skip songs if no correct search results are found
- Keyboard Shortcuts: Press 1-4 to select videos, S to skip, Esc to cancel
- yt-dlp: YouTube downloading with audio extraction to MP3
- pandas: Excel file processing and data manipulation
- tkinter: GUI framework with progress bars and threading
- ffmpeg: Audio metadata addition (external dependency)