aboutsummaryrefslogtreecommitdiff
path: root/src/app/movies/components
diff options
context:
space:
mode:
authorzephex-alt <[email protected]>2024-05-08 04:26:20 +0000
committerGitHub <[email protected]>2024-05-08 04:26:20 +0000
commitd4fdb4e3d6a3fbf042db8605d371605a64c8db4c (patch)
tree4c9e005c80a832be7a48975b97f15ace92be770d /src/app/movies/components
parentchanged search bar width for smaller devices (diff)
downloaddramalama-d4fdb4e3d6a3fbf042db8605d371605a64c8db4c.tar.xz
dramalama-d4fdb4e3d6a3fbf042db8605d371605a64c8db4c.zip
minor css fixes and added a new source for movies
Diffstat (limited to 'src/app/movies/components')
-rw-r--r--src/app/movies/components/search_2.jsx80
-rw-r--r--src/app/movies/components/video_player.jsx9
2 files changed, 52 insertions, 37 deletions
diff --git a/src/app/movies/components/search_2.jsx b/src/app/movies/components/search_2.jsx
index 0eb66fb..cf3fc69 100644
--- a/src/app/movies/components/search_2.jsx
+++ b/src/app/movies/components/search_2.jsx
@@ -9,43 +9,49 @@ import styles from "../styles/search.module.css";
const SearchResults = async (title) => {
const data = await get_search_results(title);
PreFetchMovieInfo(data);
- return (
- <div className={styles.MovieSearchResultsContainer}>
- {data &&
- data.results &&
- data.results.map((item, index) => {
- if (item.poster_path) {
- return (
- <Link
- href={`/movies/${item.id}`}
- key={index}
- style={{
- backgroundImage: `url(https://image.tmdb.org/t/p/original${item.backdrop_path})`,
- backgroundRepeat: "no-repeat",
- backgroundSize: "cover",
- textDecoration: "none",
- color: "white",
- borderRadius: "0.5rem",
- overflow: "hidden",
- }}
- className={styles.MovieResultsPrev}
- >
- <section className={styles.MovieEntry}>
- <p>{item.title || item.original_title}</p>
- <Image
- src={`https://image.tmdb.org/t/p/original${item.poster_path}`}
- width={130}
- height={230}
- alt="Movie Poster"
- priority
- />
- </section>
- </Link>
- );
- }
- })}
- </div>
- );
+ if (data.results.length > 0) {
+ return (
+ <div className={styles.MovieSearchResultsContainer}>
+ {data &&
+ data.results &&
+ data.results.map((item, index) => {
+ if (item.poster_path) {
+ return (
+ <Link
+ href={`/movies/${item.id}`}
+ key={index}
+ style={{
+ backgroundImage: `url(https://image.tmdb.org/t/p/original${item.backdrop_path})`,
+ backgroundRepeat: "no-repeat",
+ backgroundSize: "cover",
+ textDecoration: "none",
+ color: "white",
+ borderRadius: "0.5rem",
+ overflow: "hidden",
+ }}
+ className={styles.MovieResultsPrev}
+ >
+ <section className={styles.MovieEntry}>
+ <p>
+ {item.title || item.original_title}
+ </p>
+ <Image
+ src={`https://image.tmdb.org/t/p/original${item.poster_path}`}
+ width={130}
+ height={230}
+ alt="Movie Poster"
+ priority
+ />
+ </section>
+ </Link>
+ );
+ }
+ })}
+ </div>
+ );
+ } else {
+ return <p className={styles.NoResults}>No results found!</p>;
+ }
};
const get_search_results = async (title) => {
diff --git a/src/app/movies/components/video_player.jsx b/src/app/movies/components/video_player.jsx
index 15db6a8..5a49db0 100644
--- a/src/app/movies/components/video_player.jsx
+++ b/src/app/movies/components/video_player.jsx
@@ -53,6 +53,15 @@ export default function VIDEO_PLAYER({ id: id }) {
>
Vidsrc.icu
</button>
+ <button
+ onClick={() =>
+ make_player(
+ `https://player.autoembed.cc/embed/movie/${id}`
+ )
+ }
+ >
+ Autoembded.cc
+ </button>
</div>
{frame}
</section>