Nihal2000 commited on
Commit
3ec7ef1
Β·
verified Β·
1 Parent(s): 0d7e5dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1147,14 +1147,20 @@ def load_podcast_library_ui():
1147
  style = podcast.get("metadata", {}).get("style", "Unknown")
1148
  duration = podcast.get("metadata", {}).get("duration_minutes", "N/A")
1149
  created = podcast.get("created_at", "Unknown")[:19] if podcast.get("created_at") else "Unknown"
1150
- podcast_id = podcast.get("id") or podcast.get("podcast_id", "Unknown")
 
 
 
 
 
1151
 
1152
  gr.Markdown(
1153
  f"**🎨 Style:** {style.title()} \n"
1154
  f"**⏱️ Duration:** ~{duration} min \n"
1155
  f"**πŸ“… Created:** {created} \n"
1156
- f"**πŸ†” ID:** `{podcast['id'][:16]}...`"
1157
  )
 
1158
 
1159
  # Column 2: Audio Player (60%)
1160
  with gr.Column(scale=3):
 
1147
  style = podcast.get("metadata", {}).get("style", "Unknown")
1148
  duration = podcast.get("metadata", {}).get("duration_minutes", "N/A")
1149
  created = podcast.get("created_at", "Unknown")[:19] if podcast.get("created_at") else "Unknown"
1150
+ # Safe ID handling
1151
+ podcast_id = podcast.get("id") or podcast.get("podcast_id") or "Unknown"
1152
+ if isinstance(podcast_id, str) and len(podcast_id) > 16:
1153
+ display_id = f"{podcast_id[:16]}..."
1154
+ else:
1155
+ display_id = podcast_id
1156
 
1157
  gr.Markdown(
1158
  f"**🎨 Style:** {style.title()} \n"
1159
  f"**⏱️ Duration:** ~{duration} min \n"
1160
  f"**πŸ“… Created:** {created} \n"
1161
+ f"**πŸ†” ID:** `{display_id}`"
1162
  )
1163
+
1164
 
1165
  # Column 2: Audio Player (60%)
1166
  with gr.Column(scale=3):