Nikita Makarov commited on
Commit
2dd2c1c
·
1 Parent(s): 4b393db

Fix podcast YouTube iframe: support youtube_api source

Browse files
Files changed (1) hide show
  1. src/app.py +2 -1
src/app.py CHANGED
@@ -675,7 +675,8 @@ def play_next_segment():
675
  tts_service.save_audio(audio_bytes, host_audio_file)
676
 
677
  # Create YouTube player for podcast if available
678
- if podcast.get("source") == "youtube" and podcast.get("youtube_id"):
 
679
  youtube_id = podcast.get("youtube_id", "")
680
 
681
  # # COMMENTED OUT: Delayed loading mechanism
 
675
  tts_service.save_audio(audio_bytes, host_audio_file)
676
 
677
  # Create YouTube player for podcast if available
678
+ # Modal proxy returns "youtube_api" as source, so check both
679
+ if podcast.get("source") in ["youtube", "youtube_api"] and podcast.get("youtube_id"):
680
  youtube_id = podcast.get("youtube_id", "")
681
 
682
  # # COMMENTED OUT: Delayed loading mechanism