Signed-off-by: mbrucedogs <mbrucedogs@gmail.com>

This commit is contained in:
mbrucedogs 2025-07-27 12:01:39 -05:00
parent c78be7a7ad
commit 7090fad1fd
4 changed files with 73926 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
https://www.youtube.com/@SingKingKaraoke/videos https://www.youtube.com/@SingKingKaraoke/videos
https://www.youtube.com/@KaraokeOnVEVO/videos https://www.youtube.com/@KaraokeOnVEVO/videos
https://www.youtube.com/@StingrayKaraoke/videos https://www.youtube.com/@StingrayKaraoke/videos
https://www.youtube.com/@sing2karaoke/videos https://www.youtube.com/@sing2karaoke/videos
https://www.youtube.com/@ZoomKaraokeOfficial/videos
https://www.youtube.com/@VocalStarKaraoke/videos

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ import os
import sys import sys
from pathlib import Path from pathlib import Path
import json
from karaoke_downloader.downloader import KaraokeDownloader from karaoke_downloader.downloader import KaraokeDownloader
@ -343,11 +344,75 @@ Examples:
print("🔍 Generating unmatched songs report...") print("🔍 Generating unmatched songs report...")
# Load songlist # Load songlist based on focus mode
songlist = load_songlist() if args.songlist_focus:
if not songlist: # Load focused playlists
print("❌ No songlist found. Please ensure data/songList.json exists.") songlist_file = Path("data/songList.json")
sys.exit(1) if not songlist_file.exists():
print("⚠️ Songlist file not found: data/songList.json")
sys.exit(1)
try:
with open(songlist_file, "r", encoding="utf-8") as f:
raw_data = json.load(f)
# Filter playlists by title
focused_playlists = []
print(f"🔍 Looking for playlists: {args.songlist_focus}")
print(f"🔍 Available playlists in songList.json:")
for i, playlist in enumerate(raw_data[:5]): # Show first 5 playlists
print(f" {i+1}. '{playlist.get('title', 'NO TITLE')}'")
if len(raw_data) > 5:
print(f" ... and {len(raw_data) - 5} more playlists")
for playlist in raw_data:
playlist_title = playlist.get("title", "")
if playlist_title in args.songlist_focus:
focused_playlists.append(playlist)
print(f"✅ Found matching playlist: '{playlist_title}'")
if not focused_playlists:
print(
f"⚠️ No playlists found matching the specified titles: {', '.join(args.songlist_focus)}"
)
sys.exit(1)
# Flatten the focused playlists into songs
focused_songs = []
seen = set()
for playlist in focused_playlists:
if "songs" in playlist:
for song in playlist["songs"]:
if "artist" in song and "title" in song:
artist = song["artist"].strip()
title = song["title"].strip()
key = f"{artist.lower()}_{title.lower()}"
if key in seen:
continue
seen.add(key)
focused_songs.append(
{
"artist": artist,
"title": title,
"position": song.get("position", 0),
}
)
songlist = focused_songs
print(
f"\n🎯 Songlist focus mode: {len(focused_songs)} songs from {len(focused_playlists)} playlists selected"
)
print(f"🎯 Focused playlists: {', '.join(args.songlist_focus)}")
except (json.JSONDecodeError, FileNotFoundError) as e:
print(f"⚠️ Could not load songlist for filtering: {e}")
sys.exit(1)
else:
# Load all songs from songlist
songlist = load_songlist()
if not songlist:
print("❌ No songlist found. Please ensure data/songList.json exists.")
sys.exit(1)
# Load channel URLs # Load channel URLs
channel_file = args.file if args.file else "data/channels.txt" channel_file = args.file if args.file else "data/channels.txt"