Skip to content

Commit

Permalink
feat:added new server
Browse files Browse the repository at this point in the history
  • Loading branch information
dev1abhi committed Mar 30, 2024
1 parent 700cd57 commit 5e8b24b
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 21 deletions.
37 changes: 22 additions & 15 deletions movie_details/movie_details.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,33 @@ main

}


button
{
.btn {
margin-top: 5%;
border-radius: 1.2rem;
width: 20%;
padding: 1rem;
font-family: fantasy;
font-size: 1.5vw;

width: 14%;
font-weight: 800;
height: 45px;
font-family: 'poppins', sans-serif;
font-size: 1.2vw;
text-transform: uppercase;
letter-spacing: 1.5px;
color: #000;
background-color: #fff;
border: none;
border-radius: 1.1rem;
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease 0s;
cursor: pointer;
background-color: #f4f3ff;
transition: background-color 0.3s ease;
}
}

button:hover {
color: white;
background-color: rgb(7, 14, 42);
.btn:hover {
background-color: #2a9aa2;
box-shadow: 0px 5px 20px rgba(91, 162, 167, 0.73);
color: #fff;
transform: translateY(-7px);
}



h1
{
font-family: Poppins;
Expand Down
11 changes: 6 additions & 5 deletions movie_details/movie_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,16 @@
</div>

<div id="buttons">
<button id="Trailerbtn">Watch Trailer</button>
<button id="Trailerbtn" class="btn">Watch Trailer</button>

<button onclick="switchEmbed('https://embed.smashystream.com/playere.php?tmdb=' + getParameterByName('id'))">Server 1</button>
<button class="btn" onclick="switchEmbed('https://embed.smashystream.com/playere.php?tmdb=' + getParameterByName('id'))">Server SS</button>

<button onclick="switchEmbed('https://multiembed.mov/directstream.php?video_id=' + getParameterByName('id') + '&tmdb=1')">Server 2</button>
<button class="btn"onclick="switchEmbed('https://multiembed.mov/directstream.php?video_id=' + getParameterByName('id') + '&tmdb=1')">Server SE</button>

<button onclick="switchEmbed('https://vidsrc.xyz/embed/' + getParameterByName('id'))">Server 3</button>

<button class="btn" onclick="switchEmbed('https://vidsrc.xyz/embed/' + getParameterByName('id'))">Server VS</button>

<button class="btn" onclick="getImdbIdAndEmbed('https://gomo.to/movie/')">Server DS</button>

<!-- Add more buttons for additional embeds -->
</div>

Expand Down
25 changes: 25 additions & 0 deletions movie_details/movie_details.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
let ImdbId;

function getParameterByName(name, url) {
if (!url) url = window.location.href;
Expand All @@ -16,6 +17,26 @@ function switchEmbed(embedUrl) {
iframe.src = embedUrl;
}

const movieId = getParameterByName('id');
const apiKey = '68e094699525b18a70bab2f86b1fa706';
const extidsUrl = `https://api.themoviedb.org/3/movie/${movieId}/external_ids?api_key=${apiKey}`;
async function getImdbIdAndEmbed(embedUrl)
{
await fetch(extidsUrl)
.then(response => response.json())
.then(data => {
console.log(data.imdb_id);

embedUrl=embedUrl+data.imdb_id;
console.log(embedUrl);
const iframe = document.getElementById('movieIframe');
iframe.src = embedUrl;


})
}


document.addEventListener("DOMContentLoaded", function() {

// Fetch movie details using movie ID from URL parameter
Expand All @@ -25,6 +46,10 @@ document.addEventListener("DOMContentLoaded", function() {
const castUrl = `https://api.themoviedb.org/3/movie/${movieId}/credits?api_key=${apiKey}`;
const videosUrl = `https://api.themoviedb.org/3/movie/${movieId}/videos?api_key=${apiKey}`;





function fetchCastDetails() {
fetch(castUrl)
.then(response => response.json())
Expand Down
2 changes: 1 addition & 1 deletion series_details/series_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ document.addEventListener("DOMContentLoaded", function() {
const seriesDetailsUrl = `https://api.themoviedb.org/3/tv/${seriesId}?api_key=${apiKey}`;
const castUrl = `https://api.themoviedb.org/3/tv/${seriesId}/credits?api_key=${apiKey}`;
const videosUrl = `https://api.themoviedb.org/3/tv/${seriesId}/videos?api_key=${apiKey}`;
const seasonsUrl = `https://api.themoviedb.org/3/tv/${seriesId}/seasons?api_key=${apiKey}`;
//const seasonsUrl = `https://api.themoviedb.org/3/tv/${seriesId}/seasons?api_key=${apiKey}`;

function fetchCastDetails() {
fetch(castUrl)
Expand Down

0 comments on commit 5e8b24b

Please sign in to comment.