mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-08 22:08:03 -05:00
feat: add smart subtitle language fallback when requested locale unavailable
CHANGES - Introduce findVTTFilesWithFallback to handle subtitle language absence - Prefer requested language VTT, gracefully fallback to available alternatives - Auto-detect downloaded subtitle language and proceed without interruption - Update yt-dlp processing to use fallback-aware VTT discovery - Document language fallback behavior and provide usage example - Return first available VTT when no specific language requested - Detect language-coded filenames using regex for robust matching
This commit is contained in:
@@ -215,6 +215,19 @@ fabric -y "https://www.youtube.com/watch?v=VIDEO_ID" --pattern write_blog_post
|
||||
- **Try without language specification** - let yt-dlp choose any available language
|
||||
- **Try English instead** - `fabric -g en` (English subtitles may be less rate-limited)
|
||||
|
||||
### Language Fallback Behavior
|
||||
|
||||
When you specify a language (e.g., `-g es` for Spanish) but that language isn't available or fails to download:
|
||||
|
||||
1. **Automatic fallback**: Fabric automatically retries without language specification
|
||||
2. **Smart file detection**: If the fallback downloads a different language (e.g., English), Fabric will automatically detect and use it
|
||||
3. **No manual intervention needed**: The process is transparent to the user
|
||||
|
||||
```bash
|
||||
# Even if Spanish isn't available, this will work with whatever language yt-dlp finds
|
||||
fabric -g es -y "https://youtube.com/watch?v=VIDEO_ID" --pattern summarize
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### YAML Configuration
|
||||
|
||||
Reference in New Issue
Block a user