Skip to content

Commit cf7d322

Browse files
committed
fix: Config load before ui init, lang and menu options reinstated
1 parent c9ffc53 commit cf7d322

20 files changed

+3052
-605
lines changed

.github/workflows/build-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install -r requirements.txt pyinstaller
30-
30+
3131
- name: Build (PyInstaller, one-folder)
3232
run: pyinstaller yt_audio_workbench.spec
3333

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ ci:
88

99
repos:
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.5.5
11+
rev: v0.6.0 # or run `pre-commit autoupdate` to bump this
1212
hooks:
1313
- id: ruff
14-
args: [--select=E,F,I,UP, --ignore=E501, --target-version=py39]
14+
# optional: auto-fix lint issues
15+
args: ["--fix", "--show-fixes"]
1516
- id: ruff-format
1617

1718
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.6.0
19+
rev: v6.0.0
1920
hooks:
2021
- id: end-of-file-fixer
2122
- id: trailing-whitespace

HELP.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,47 @@ The primary purpose of this tool is to create high-quality, consistent MP3 backu
2828
## Main Window Explained <a name="main-window-explained"></a>
2929

3030
### URL & Output <a name="url--output"></a>
31-
**Playlist or video URL:** The source URL from YouTube.
32-
**Output folder:** The main directory where all files and logs will be saved.
31+
**Playlist or video URL:** The source URL from YouTube.
32+
**Output folder:** The main directory where all files and logs will be saved.
3333
**Use per-run subfolder:** (Recommended) When checked, each time you click "Run", a new subfolder with a timestamp (e.g., `run_20250824_193000`) will be created inside your output folder. This is the safest way to keep download sessions separate and ensures the "Join" feature works correctly.
3434

3535
### Cookies <a name="cookies"></a>
36-
**Cookies file:** You can provide a `cookies.txt` (Netscape format) or a `.json` file exported from a browser extension like "Cookie-Editor". The application will automatically convert `.json` files.
36+
**Cookies file:** You can provide a `cookies.txt` (Netscape format) or a `.json` file exported from a browser extension like "Cookie-Editor". The application will automatically convert `.json` files.
3737
**Use browser cookies:** Alternatively, select a browser and the application will attempt to use its live cookie data.
3838

3939
### Download & Formatting <a name="download--formatting"></a>
40-
**Sample rate:** Enforces a consistent audio sample rate for all files. `44100 Hz` is standard for CD quality, while `48000 Hz` is common for video.
41-
**Bitrate (kbps):** Sets the quality of the MP3 file. `192` is good quality, `320` is the highest quality for MP3.
42-
**Delay between items (s):** A pause between downloading each item in a playlist to avoid being rate-limited by the server.
40+
**Sample rate:** Enforces a consistent audio sample rate for all files. `44100 Hz` is standard for CD quality, while `48000 Hz` is common for video.
41+
**Bitrate (kbps):** Sets the quality of the MP3 file. `192` is good quality, `320` is the highest quality for MP3.
42+
**Delay between items (s):** A pause between downloading each item in a playlist to avoid being rate-limited by the server.
4343
**Playlist format:** Creates a playlist file (`.m3u` or `.m3u8`) of the downloaded tracks for easy playback.
4444

4545
### Filename & Options <a name="filename--options"></a>
46-
**Add numbering:** Prefixes filenames with a number (e.g., `001 - ...`, `002 - ...`).
47-
**Include YouTube ID in filename:** Appends the unique YouTube video ID in brackets (e.g., `... [dQw4w9WgXcQ].mp3`). *Note:* Brackets can cause issues with some older media players.
48-
**Sanitize filenames:** (Recommended) Removes special characters from filenames that can cause problems with playlists or scripts.
49-
**Use download archive:** The app will keep a record of downloaded files in `download_archive.txt`. If you run the same playlist again, it will skip any files it has already downloaded.
50-
**Normalize with MP3Gain:** Uses the mp3gain tool to adjust the volume of all tracks to a standard level without losing quality.
51-
**De-duplicate artist in filename:** Removes duplicated artist names from filenames (e.g., `Artist - Artist - Title``Artist - Title`).
52-
**Validate with ffprobe:** Validates sample rate/format using `ffprobe` after conversion.
53-
**Verbose yt-dlp logging:** Runs yt-dlp in verbose mode for troubleshooting.
46+
**Add numbering:** Prefixes filenames with a number (e.g., `001 - ...`, `002 - ...`).
47+
**Include YouTube ID in filename:** Appends the unique YouTube video ID in brackets (e.g., `... [dQw4w9WgXcQ].mp3`). *Note:* Brackets can cause issues with some older media players.
48+
**Sanitize filenames:** (Recommended) Removes special characters from filenames that can cause problems with playlists or scripts.
49+
**Use download archive:** The app will keep a record of downloaded files in `download_archive.txt`. If you run the same playlist again, it will skip any files it has already downloaded.
50+
**Normalize with MP3Gain:** Uses the mp3gain tool to adjust the volume of all tracks to a standard level without losing quality.
51+
**De-duplicate artist in filename:** Removes duplicated artist names from filenames (e.g., `Artist - Artist - Title``Artist - Title`).
52+
**Validate with ffprobe:** Validates sample rate/format using `ffprobe` after conversion.
53+
**Verbose yt-dlp logging:** Runs yt-dlp in verbose mode for troubleshooting.
5454
**Fallback to progressive:** If standard DASH download yields no audio, retry with progressive HTTP streams.
5555

5656
### Joining <a name="joining"></a>
57-
**Join into one MP3:** Enables joining to combine all downloaded MP3s into a single large file.
58-
**Name:** Filename for the final combined MP3.
59-
**Write CUE for joined file:** Creates a `.cue` file with accurate `INDEX 01` markers.
60-
**Embed ID3 chapters:** Embeds chapter markers directly into the joined MP3 (requires `mutagen`).
61-
**Randomize order when joining:** Shuffles the playlist before combining.
62-
**Keep temp WAVs:** Keep intermediate WAVs from the join pipeline (useful for debugging).
57+
**Join into one MP3:** Enables joining to combine all downloaded MP3s into a single large file.
58+
**Name:** Filename for the final combined MP3.
59+
**Write CUE for joined file:** Creates a `.cue` file with accurate `INDEX 01` markers.
60+
**Embed ID3 chapters:** Embeds chapter markers directly into the joined MP3 (requires `mutagen`).
61+
**Randomize order when joining:** Shuffles the playlist before combining.
62+
**Keep temp WAVs:** Keep intermediate WAVs from the join pipeline (useful for debugging).
6363
**Write VLC segment playlist:** Creates an `.m3u` playlist that points to chapter start/stop times inside the joined MP3 for VLC.
6464

6565
### System Dependencies <a name="system-dependencies"></a>
66-
**Verify Tools:** Checks if `yt-dlp`, `ffmpeg`, `ffprobe`, and `mp3gain` are installed and accessible.
66+
**Verify Tools:** Checks if `yt-dlp`, `ffmpeg`, `ffprobe`, and `mp3gain` are installed and accessible.
6767
**Check & Install System Deps:** Attempts automatic installation (Windows: `winget`; macOS: `brew`; Linux: `apt/dnf/pacman`).
6868

6969
### Controls & Log <a name="controls--log"></a>
70-
**Run/Cancel:** Starts or stops the current process.
71-
**Progress Bar:** Shows determinate progress during downloads and joining.
70+
**Run/Cancel:** Starts or stops the current process.
71+
**Progress Bar:** Shows determinate progress during downloads and joining.
7272
**Log Window:** Displays detailed information about the ongoing process. Right-click to copy or clear the log.
7373

7474
## Troubleshooting <a name="troubleshooting"></a>

SECURITY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ If you discover a security vulnerability, please responsibly disclose it:
1212
- Or open a private security advisory on GitHub
1313

1414
We will acknowledge receipt within 48 hours and provide regular updates until the issue is resolved.
15-

THIRD_PARTY_NOTICES.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Third-Party Notices
22

3-
This project (**YT Audio Backup GUI**) is licensed under the MIT License (see LICENSE).
3+
This project (**YT Audio Backup GUI**) is licensed under the MIT License (see LICENSE).
44
It makes use of, or interoperates with, third-party software under their own licenses.
55

66
You must comply with the license terms of these third-party components if you install or use them.
@@ -9,21 +9,21 @@ You must comply with the license terms of these third-party components if you in
99

1010
## Python Dependencies
1111

12-
- **yt-dlp**
13-
License: [Unlicense](https://github.com/yt-dlp/yt-dlp/blob/master/LICENSE)
12+
- **yt-dlp**
13+
License: [Unlicense](https://github.com/yt-dlp/yt-dlp/blob/master/LICENSE)
1414
Summary: Public-domain dedication. Permissive use.
1515

16-
- **Tkinter** (stdlib)
17-
License: Python Software Foundation License.
16+
- **Tkinter** (stdlib)
17+
License: Python Software Foundation License.
1818
Ships with Python.
1919

20-
- **pyperclip** (optional, for clipboard)
21-
License: MIT.
20+
- **pyperclip** (optional, for clipboard)
21+
License: MIT.
2222

23-
- **uv** (recommended for env management, not required at runtime)
24-
License: Apache-2.0.
23+
- **uv** (recommended for env management, not required at runtime)
24+
License: Apache-2.0.
2525

26-
- **Ruff**, **mypy**, **bandit** (dev tools)
26+
- **Ruff**, **mypy**, **bandit** (dev tools)
2727
Licenses: MIT / Apache-2.0 (all permissive).
2828

2929
---
@@ -32,20 +32,20 @@ You must comply with the license terms of these third-party components if you in
3232

3333
These are **not bundled** with this project. Users must install them separately and comply with their licenses:
3434

35-
- **ffmpeg**
36-
License: [LGPL 2.1+](https://ffmpeg.org/legal.html) (default builds) or GPL 2+ (if compiled with GPL options).
35+
- **ffmpeg**
36+
License: [LGPL 2.1+](https://ffmpeg.org/legal.html) (default builds) or GPL 2+ (if compiled with GPL options).
3737
This project calls ffmpeg as an external process. No ffmpeg binaries are distributed with this project.
3838

39-
- **mp3gain**
40-
License: GPL-2.0.
39+
- **mp3gain**
40+
License: GPL-2.0.
4141
This project calls mp3gain as an external process. No mp3gain binaries are distributed with this project.
4242

4343
---
4444

4545
## Notes
4646

47-
- Because ffmpeg and mp3gain are invoked as **external programs**, their licenses do **not** apply to the source code of this project.
48-
- If you redistribute this project **with those binaries embedded**, you must comply with their licenses (e.g., GPL copyleft).
47+
- Because ffmpeg and mp3gain are invoked as **external programs**, their licenses do **not** apply to the source code of this project.
48+
- If you redistribute this project **with those binaries embedded**, you must comply with their licenses (e.g., GPL copyleft).
4949
- Keeping them as system dependencies avoids license conflicts.
5050

5151
---

0 commit comments

Comments
 (0)