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

This commit is contained in:
mbrucedogs 2025-07-24 10:10:07 -05:00
parent 6a2eb2bac5
commit 820a885f9f

View File

@ -232,9 +232,10 @@ class KaraokeDownloader:
if not output_path.exists() or output_path.stat().st_size == 0:
print(f"❌ Download failed or file is empty: {output_path}")
continue
if not self._is_valid_mp4(output_path):
print(f"❌ File is not a valid MP4: {output_path}")
continue
# TEMP: Skipping MP4 validation for debugging
# if not self._is_valid_mp4(output_path):
# print(f"❌ File is not a valid MP4: {output_path}")
# continue
add_id3_tags(output_path, f"{artist} - {title} (Karaoke Version)", channel_name)
mark_songlist_song_downloaded(self.songlist_tracking, artist, title, channel_name, output_path)
print(f"✅ Downloaded and tracked: {artist} - {title}")
@ -261,6 +262,7 @@ class KaraokeDownloader:
print(f" - {song['artist']} - {song['title']}")
downloaded_count = 0
attempted = set()
total_to_download = limit if limit is not None else len(undownloaded)
# Keep looping until limit is reached or no more undownloaded songs
while undownloaded and (limit is None or downloaded_count < limit):
for song in list(undownloaded):
@ -283,6 +285,8 @@ class KaraokeDownloader:
v_artist, v_title = extract_artist_title(video['title'])
if (normalize_title(v_artist) == normalize_title(artist) and normalize_title(v_title) == normalize_title(title)) or \
(normalize_title(video['title']) == normalize_title(f"{artist} - {title}")):
# Progress print statement
print(f"\U0001F4E5 Downloading {downloaded_count + 1} of {total_to_download} songlist songs...")
# Download this song from this channel
output_path = self.downloads_dir / channel_name / f"{artist} - {title} (Karaoke Version).mp4"
output_path.parent.mkdir(parents=True, exist_ok=True)
@ -302,9 +306,10 @@ class KaraokeDownloader:
if not output_path.exists() or output_path.stat().st_size == 0:
print(f"❌ Download failed or file is empty: {output_path}")
continue
if not self._is_valid_mp4(output_path):
print(f"❌ File is not a valid MP4: {output_path}")
continue
# TEMP: Skipping MP4 validation for debugging
# if not self._is_valid_mp4(output_path):
# print(f"❌ File is not a valid MP4: {output_path}")
# continue
add_id3_tags(output_path, f"{artist} - {title} (Karaoke Version)", channel_name)
mark_songlist_song_downloaded(self.songlist_tracking, artist, title, channel_name, output_path)
print(f"✅ Downloaded and tracked: {artist} - {title}")