Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +12 -6
src/streamlit_app.py
CHANGED
|
@@ -330,6 +330,14 @@ elif search_query:
|
|
| 330 |
else:
|
| 331 |
st.markdown("""
|
| 332 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
.movie-box {
|
| 334 |
background-color: #1a1a1a;
|
| 335 |
padding: 15px;
|
|
@@ -377,12 +385,10 @@ elif search_query:
|
|
| 377 |
for _, movie in filtered.iterrows():
|
| 378 |
poster_url, _ = get_tmdb_data(movie["clean_title"], movie["year"])
|
| 379 |
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
else:
|
| 385 |
-
poster_html = f"<img src='{poster_url}' class='poster'>"
|
| 386 |
|
| 387 |
st.markdown(f"""
|
| 388 |
<div class="movie-box">
|
|
|
|
| 330 |
else:
|
| 331 |
st.markdown("""
|
| 332 |
<style>
|
| 333 |
+
.poster {
|
| 334 |
+
width: 100px;
|
| 335 |
+
height: 150px;
|
| 336 |
+
flex-shrink: 0;
|
| 337 |
+
border-radius: 4px;
|
| 338 |
+
object-fit: cover;
|
| 339 |
+
background: #333;
|
| 340 |
+
}
|
| 341 |
.movie-box {
|
| 342 |
background-color: #1a1a1a;
|
| 343 |
padding: 15px;
|
|
|
|
| 385 |
for _, movie in filtered.iterrows():
|
| 386 |
poster_url, _ = get_tmdb_data(movie["clean_title"], movie["year"])
|
| 387 |
|
| 388 |
+
poster_html = f"""
|
| 389 |
+
<img src='{poster_url if poster_url and "placeholder.com" not in poster_url else POSTER_PLACEHOLDER}'
|
| 390 |
+
class='poster' alt='Poster'>
|
| 391 |
+
"""
|
|
|
|
|
|
|
| 392 |
|
| 393 |
st.markdown(f"""
|
| 394 |
<div class="movie-box">
|