Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1151 |
|
| 1152 |
gr.Markdown(
|
| 1153 |
f"**π¨ Style:** {style.title()} \n"
|
| 1154 |
f"**β±οΈ Duration:** ~{duration} min \n"
|
| 1155 |
f"**π
Created:** {created} \n"
|
| 1156 |
-
f"**π ID:** `{
|
| 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):
|