diff --git a/.github/README.md b/.github/README.md index c9849666..0257fac0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -64,27 +64,24 @@ There is also a mobile version of The MovieVerse, which is developed using Apach ## Project Structure -The MovieVerse is a full-stack application with a robust backend and a user-friendly frontend. The project is divided into the following **3 primary** directories: +The MovieVerse is a full-stack application with a robust backend and a user-friendly frontend. The project is divided into the following **3 main** directories: 1. `MovieVerse-Backend`: The backend directory contains the server-side code, including the API, database, and server configuration. 2. `MovieVerse-Frontend`: The frontend directory contains the client-side code, including the user interface, user experience, and client configuration. 3. `MovieVerse-Mobile`: The mobile app directory contains the mobile application code, including the mobile user interface, user experience, and mobile client configuration. ## Technology Stack -| Frontend Technologies | Backend Technologies | Database Technologies | Mobile App Development | Additional Technologies | -|-----------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------|-------------------------------------------------------------------|-----------------------------------------------------------------| -| [React](https://reactjs.org/) | [Node.js](https://nodejs.org/en/) | [MongoDB](https://www.mongodb.com/) | [Apache Cordova](https://cordova.apache.org/) | [Webpack](https://webpack.js.org/) | -| [Vue](https://vuejs.org/) | [Express](https://expressjs.com/) | [MySQL](https://www.mysql.com/) | [React Native](https://reactnative.dev/) | [Babel](https://babeljs.io/) | -| [HTML5](https://html.com/) | [Django](https://www.djangoproject.com/) | [Google Firebase](https://firebase.google.com/) | [Swift (for iOS development)](https://developer.apple.com/swift/) | [Docker](https://www.docker.com/) | -| [CSS3](https://www.w3.org/Style/CSS/Overview.en.html) | [Django REST Framework](https://www.django-rest-framework.org/) | | | [Emscripten](https://emscripten.org/) | -| [JavaScript (Vanilla JS)](http://vanilla-js.com/) | [Flask](https://flask.palletsprojects.com/en/1.1.x/) | | | [WebAssembly](https://webassembly.org/) | -| [TypeScript](https://www.typescriptlang.org/) | [Flask RESTful](https://flask-restful.readthedocs.io/en/latest/) | | | [C](https://en.wikipedia.org/wiki/C_(programming_language)) | -| [Bootstrap](https://getbootstrap.com/) | [Python](https://www.python.org/) | | | [Google Analytics](https://analytics.google.com/analytics/web/) | -| [React Bootstrap](https://react-bootstrap.github.io/) | [Java](https://www.java.com/en/) | | | [ESLint](https://eslint.org/) | -| [React Icons](https://react-icons.github.io/react-icons/) | [GraphQL](https://graphql.org/) | | | | -| [SASS](https://sass-lang.com/) | [Ruby on Rails](https://rubyonrails.org/) | | | | -| [Single Spa](https://single-spa.js.org/) | [C (Emscripten, WebAssembly)](https://emscripten.org/) | | | | -| [Redux](https://redux.js.org/) | [JavaScript](https://www.javascript.com/) | | | | +| Frontend Technologies | Backend Technologies | Database Technologies | Mobile App Development | Additional Technologies | +|-----------------------------------------------------------------|-----------------------------------------------------------------|-------------------------------------------------|-------------------------------------------------------------------|-----------------------------------------------------------------| +| [React](https://reactjs.org/) | [Node.js](https://nodejs.org/en/) | [MongoDB](https://www.mongodb.com/) | [Apache Cordova](https://cordova.apache.org/) | [Webpack](https://webpack.js.org/) | +| [Vue](https://vuejs.org/) | [Express](https://expressjs.com/) | [MySQL](https://www.mysql.com/) | [React Native](https://reactnative.dev/) | [Babel](https://babeljs.io/) | +| [HTML5](https://html.com/) | [Django](https://www.djangoproject.com/) | [Google Firebase](https://firebase.google.com/) | [Swift (for iOS development)](https://developer.apple.com/swift/) | [Docker](https://www.docker.com/) | +| [CSS3](https://www.w3.org/Style/CSS/Overview.en.html) | [Django REST Framework](https://www.django-rest-framework.org/) | | [Kotlin (for Android)](https://kotlinlang.org/) | [Emscripten](https://emscripten.org/) | +| [JavaScript (Vanilla JS)](http://vanilla-js.com/) | [Flask](https://flask.palletsprojects.com/en/1.1.x/) | | [Java (for Android)](https://www.java.com/en/) | [WebAssembly](https://webassembly.org/) | +| [TypeScript](https://www.typescriptlang.org/) | [Python](https://www.python.org/) | | | [Google Analytics](https://analytics.google.com/analytics/web/) | +| [FontAwesome Icons](https://react-icons.github.io/react-icons/) | [Ruby on Rails](https://rubyonrails.org/) | | | [ESLint](https://eslint.org/) | +| [SASS](https://sass-lang.com/) | [C (Emscripten, WebAssembly)](https://emscripten.org/) | | | [Git](https://git-scm.com/) | +| [Single Spa](https://single-spa.js.org/) | [JavaScript](https://www.javascript.com/) | | | | ## Contributing diff --git a/404.html b/404.html index 13e4e2b4..12af9726 100644 --- a/404.html +++ b/404.html @@ -213,7 +213,7 @@

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + +
- - - - - + + + + + + @@ -271,6 +280,45 @@

404

window.location.href = 'MovieVerse-Frontend/html/movie-details.html'; } + document.addEventListener("DOMContentLoaded", function() { + updateSignInButtonState(); + document.getElementById('googleSignInBtn').addEventListener('click', handleSignInOut); + }); + + function updateSignInButtonState() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + const signInText = document.getElementById('signInOutText'); + const signInIcon = document.getElementById('signInIcon'); + const signOutIcon = document.getElementById('signOutIcon'); + + if (isSignedIn) { + signInText.textContent = 'Sign Out'; + signInIcon.style.display = 'none'; + signOutIcon.style.display = 'inline-block'; + } + else { + signInText.textContent = 'Sign In'; + signInIcon.style.display = 'inline-block'; + signOutIcon.style.display = 'none'; + } + } + + function handleSignInOut() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + if (isSignedIn) { + localStorage.setItem('isSignedIn', JSON.stringify(false)); + alert('You have been signed out.'); + } + else { + window.location.href = 'MovieVerse-Frontend/html/sign-in.html'; + return; + } + + updateSignInButtonState(); + } + function updateClock() { var now = new Date(); var hours = now.getHours(); @@ -326,5 +374,11 @@

404

window.location.href = 'MovieVerse-Frontend/html/search.html'; } + + + + \ No newline at end of file diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/chatbot.css b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/chatbot.css index f48b0f60..e8a67d83 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/chatbot.css +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/chatbot.css @@ -543,7 +543,7 @@ ol li:hover { #local-time { margin-top: 20px; - transform: translateX(15%); + transform: translateX(11%); padding: 10px; border-radius: 10px; z-index: 10; @@ -569,7 +569,7 @@ ol li:hover { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 210px; } main { @@ -664,7 +664,7 @@ main { } .about { - margin-left: 0px; + margin-left: 0; } .favorites-btn { diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/style.css b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/style.css index 072827fd..53d9f101 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/style.css +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/style.css @@ -1168,7 +1168,7 @@ p { } .app-btn { - background-color: #534caf; + background-color: #7378c5; border: 1px solid #ddd; border-radius: 8px; padding: 10px 15px; @@ -1179,6 +1179,7 @@ p { display: block; width: auto; margin: 10px auto; + transition: 0.1s ease-in; } .clock { @@ -1454,6 +1455,10 @@ p { margin-bottom: 20px; } +#search-results-label:hover { + color: #f509d9; +} + .category-buttons button { background-color: #7378c5; font: inherit; @@ -1463,7 +1468,7 @@ p { cursor: pointer; padding: 10px 15px; margin: 10px; - transition: 0.3s ease-in; + transition: 0.1s ease-in; } .category-buttons button:hover { @@ -1722,6 +1727,15 @@ canvas { } } +#ratingImdb { + color: #ff710d; + font-size: 17px; +} + +#ratingImdb:hover { + color: #f509d9; +} + .chart-title { text-align: center; color: #ff710d; diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/trivia.css b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/trivia.css index 72443323..d8a64a60 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/trivia.css +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/css/trivia.css @@ -181,14 +181,6 @@ p { color: #f509d9; } -footer { - text-align: center; - padding: 20px 0; - margin-top: 40px; - background-color: #7378c5; - color: white !important; -} - .button2 { background-color: #7378c5; font: inherit; @@ -232,7 +224,7 @@ header { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 400px; } #main { @@ -610,7 +602,6 @@ main { justify-content: center; } - #clear-search-btn { display: block; margin: 20px auto; @@ -654,7 +645,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -200px; + margin-left: -180px; border-radius: 8px; } @@ -672,7 +663,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -20px; + margin-left: 0; border-radius: 8px; } @@ -689,7 +680,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: 168px; + margin-left: 188px; border-radius: 8px; padding-left: 10px; padding-right: 10px; @@ -734,3 +725,11 @@ main { border: none; cursor: pointer; } + +footer { + text-align: center; + padding: 20px 0; + margin-top: 40px; + background-color: #7378c5; + color: white !important; +} diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/about.html b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/about.html index 91d6a52e..d39d86a5 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/about.html +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/about.html @@ -43,6 +43,7 @@ gtag('config', 'G-CQKJ67FXZ4'); + -
-
+

Privacy Policy

diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/reset-password.html b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/reset-password.html index 72035012..d0b9ce40 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/reset-password.html +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/reset-password.html @@ -11,8 +11,8 @@ - - + + @@ -111,12 +111,13 @@

- + -
+ + />
+ @@ -392,6 +394,7 @@

Reset Password

} } + diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/search.html b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/search.html index a329beea..7dee39dc 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/search.html +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/search.html @@ -6,12 +6,12 @@ Search Results - The MovieVerse - < + - - + + @@ -46,7 +46,7 @@ -
+

The MovieVerse @@ -58,7 +58,7 @@

- + - + -
+ Sign In - The MovieVerse - < + - - + + @@ -125,12 +125,12 @@

- + - + - - + + @@ -86,7 +86,7 @@

- +
- + @@ -138,6 +155,7 @@

Trivia Results

const savedTextColor = localStorage.getItem('textColor'); const savedFontSize = localStorage.getItem('fontSize'); + if (savedBg) { document.body.style.backgroundImage = `url('${savedBg}')`; } @@ -157,7 +175,5 @@

Trivia Results

© 2024 The MovieVerse. All rights reserved.

- - diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/tv-details.html b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/tv-details.html index 0dab1880..ce41ef43 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/tv-details.html +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/html/tv-details.html @@ -2,7 +2,7 @@ - TV Details + TV Details - The MovieVerse @@ -10,8 +10,8 @@ - - + + @@ -62,6 +62,12 @@ #prod-companies:hover { color: #f509d9; } + + @media (max-width: 800px) { + .movie-description { + margin-top: -75px; + } + } @@ -78,7 +84,7 @@

- + - + -
+ = popularityThreshold; - const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; + const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; const adultContentIndicator = movie.adult ? `Adult Content` @@ -1189,6 +1185,21 @@ function updateMoviesFavorited(movieId) { } } +function getMovieCode2() { + const codeOfMovie = "MmJhOGU1MzY="; + return atob(codeOfMovie); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function updateAverageMovieRating(movieId, newRating) { const savedRatings = JSON.parse(localStorage.getItem('movieRatings')) || {}; diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/search.js b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/search.js index 1bb9e4e4..4caf4efb 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/search.js +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/search.js @@ -236,12 +236,14 @@ async function showResults(category) { const response = await fetch(movieUrl); const data = await response.json(); const sortedResults = data.results.sort((a, b) => b.popularity - a.popularity); - displayResults(sortedResults, category); + displayResults(sortedResults, category, searchQuery); } catch (error) { console.error('Error fetching search results:', error); document.querySelector('.movie-match-container1').innerHTML = '

Error fetching results. Please try again later.

'; } + + updateBrowserURL(searchQuery); } document.querySelector('button[onclick="showResults(\'movie\')"]').addEventListener('click', function() { @@ -282,12 +284,14 @@ function updateCategoryButtonStyles(selectedCategory) { } } -function displayResults(results, category) { +function displayResults(results, category, searchTerm) { const container = document.getElementById('movie-match-container1'); container.innerHTML = ''; + const capitalizedCategory = category.charAt(0).toUpperCase() + category.slice(1); + if (results.length === 0) { - container.innerHTML = `

No results found for ${category}. Please try again.

`; + container.innerHTML = `

No results found for "${searchTerm}" in the ${capitalizedCategory} category. Please try again with a different query.

`; return; } showMovies(results, container, category); @@ -427,4 +431,14 @@ function handleSearch() { const searchQuery = document.getElementById('search').value; localStorage.setItem('searchQuery', searchQuery); window.location.reload(); +} + +function updateBrowserURL(title) { + const nameSlug = createNameSlug(title); + const newURL = window.location.protocol + "//" + window.location.host + window.location.pathname + '?search_query=' + nameSlug; + window.history.replaceState({ path: newURL }, '', newURL); +} + +function createNameSlug(title) { + return title.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''); } \ No newline at end of file diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/service-worker.js b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/service-worker.js index 432be0d1..52e81ed2 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/service-worker.js +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/service-worker.js @@ -58,6 +58,7 @@ const urlsToCache = [ '../../images/yellow.jpg', 'analytics.js', '../html/analytics.html', + '../html/offline.html', ]; self.addEventListener('install', event => { @@ -77,9 +78,10 @@ self.addEventListener('fetch', event => { if (response) { return response; } - return fetch(event.request); - } - ) + return fetch(event.request).catch(() => { + return caches.match('../html/offline.html'); + }); + }) ); }); diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/tv-details.js b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/tv-details.js index 503f6e5a..89671864 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/tv-details.js +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/MovieVerse-Frontend/js/tv-details.js @@ -294,8 +294,6 @@ document.addEventListener("DOMContentLoaded", function() { }); document.addEventListener("DOMContentLoaded", function() { - updateSignInButton(); - initClient(); applySettings(); }); @@ -499,12 +497,16 @@ const twoLetterLangCodes = [ async function fetchTvDetails(tvSeriesId) { const baseUrl = `https://${getMovieVerseData()}/3/tv/${tvSeriesId}`; - const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos`; + const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos,external_ids`; + try { const response = await fetch(urlWithAppend); const tvSeriesDetails = await response.json(); + const imdbId = tvSeriesDetails.external_ids.imdb_id; + + const imdbRating = await fetchTVRatings(imdbId); - populateTvSeriesDetails(tvSeriesDetails); + populateTvSeriesDetails(tvSeriesDetails, imdbRating); updateBrowserURL(tvSeriesDetails.name); } catch (error) { @@ -512,6 +514,24 @@ async function fetchTvDetails(tvSeriesId) { } } +async function fetchTVRatings(imdbId) { + const omdbCode = `${getMovieCode2()}`; + const omdb = `https://${getMovieActor()}/?i=${imdbId}&${getMovieName()}${omdbCode}`; + + try { + const response = await fetch(omdb); + const data = await response.json(); + + let imdbRating = data.imdbRating ? data.imdbRating : 'N/A'; + + return imdbRating; + } + catch (error) { + console.error('Error fetching TV series ratings:', error); + return 'N/A'; + } +} + function getLanguageName(code) { const language = twoLetterLangCodes.find(lang => lang.code === code); return language ? language.name : 'Unknown Language'; @@ -522,7 +542,7 @@ function getCountryName(code) { return regionNames.of(code); } -function populateTvSeriesDetails(tvSeries) { +function populateTvSeriesDetails(tvSeries, imdbRating) { const title = tvSeries.name || 'Title not available'; document.getElementById('movie-title').textContent = title; document.title = tvSeries.name + " - TV Series"; @@ -549,6 +569,15 @@ function populateTvSeriesDetails(tvSeries) { const voteCount = tvSeries.vote_count ? tvSeries.vote_count.toLocaleString() : 'N/A'; detailsHTML += `

User Rating: ${(voteAverage / 2).toFixed(1)}/5.0 (based on ${voteCount} votes)

`; + if (tvSeries.external_ids && tvSeries.external_ids.imdb_id) { + const imdbId = tvSeries.external_ids.imdb_id; + const imdbUrl = `https://www.imdb.com/title/${imdbId}/`; + detailsHTML += `

IMDb Rating: ${imdbRating}

`; + } + else { + detailsHTML += `

IMDb Rating: N/A

`; + } + const homepage = tvSeries.homepage ? `Visit` : 'Not available'; detailsHTML += `

Homepage: ${homepage}

`; @@ -717,6 +746,21 @@ function applySettings() { } } +function getMovieCode2() { + const encodedKey = "MmJhOGU1MzY="; + return atob(encodedKey); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function applyTextColor(color) { document.querySelectorAll('h1, h2, h3, p, a, span, div, button, input, select, textarea, label, li') .forEach(element => { diff --git a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/index.html b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/index.html index 85c18478..e1b1b99f 100644 --- a/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/index.html +++ b/MovieVerse-Mobile/platforms/android/app/src/main/assets/www/index.html @@ -1,5 +1,4 @@ - @@ -65,13 +64,13 @@

- - + @@ -156,128 +155,128 @@

-

Award-Winning Movies:

+

Award-Winning Movies:

-

Director's Spotlight: Alfred Hitchcock

+

Director's Spotlight: Alfred Hitchcock

-

Hidden Gems:

-
- -
- -
-

Trending ACTION Movies:

+

Trending ACTION Movies:

-

Trending VIETNAMESE Movies:

+

Trending VIETNAMESE Movies:

-

Trending KOREAN Movies:

+

Trending KOREAN Movies:

-

Trending INDIAN Movies:

+

Trending INDIAN Movies:

-

Trending TV SERIES:

+

Trending TV SERIES:

-

Trending HORROR Movies:

+

Hidden Gems:

+
+ +
+ +
+

Trending HORROR Movies:

-

Trending DOCUMENTARY Movies:

+

Trending DOCUMENTARY Movies:

-

Trending ANIMATED Movies:

+

Trending ANIMATED Movies:

-

Trending SCIENCE FICTION Movies:

+

Trending SCIENCE FICTION Movies:

-

Trending ROMANTIC Movies:

+

Trending ROMANTIC Movies:

-

Trending THRILLER Movies:

+

Trending THRILLER Movies:

-

Trending MYSTERY Movies:

+

Trending MYSTERY Movies:

-

Trending ADVENTURE Movies:

+

Trending ADVENTURE Movies:

-

Trending COMEDY Movies:

+

Trending COMEDY Movies:

-

Trending FANTASY Movies:

+

Trending FANTASY Movies:

-

Trending FAMILY Movies:

+

Trending FAMILY Movies:

-

Trending CRIME Movies:

+

Trending CRIME Movies:

-

Trending CLASSIC Movies:

+

Trending CLASSIC Movies:

@@ -286,13 +285,13 @@

Trending CLASSIC

© 2024 The MovieVerse. All rights reserved.

+ - - + + \ No newline at end of file diff --git a/MovieVerse-Mobile/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/davidnguyen.xcuserdatad/xcschemes/xcschememanagement.plist b/MovieVerse-Mobile/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/davidnguyen.xcuserdatad/xcschemes/xcschememanagement.plist index 33ba33c2..e3071f03 100644 --- a/MovieVerse-Mobile/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/davidnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/MovieVerse-Mobile/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/davidnguyen.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ Cordova.xcscheme_^#shared#^_ orderHint - 2 + 1 CordovaLib.xcscheme_^#shared#^_ orderHint - 1 + 2 diff --git a/MovieVerse-Mobile/platforms/ios/MovieVerse.xcworkspace/xcuserdata/davidnguyen.xcuserdatad/UserInterfaceState.xcuserstate b/MovieVerse-Mobile/platforms/ios/MovieVerse.xcworkspace/xcuserdata/davidnguyen.xcuserdatad/UserInterfaceState.xcuserstate index 808d5011..cda9cc67 100644 Binary files a/MovieVerse-Mobile/platforms/ios/MovieVerse.xcworkspace/xcuserdata/davidnguyen.xcuserdatad/UserInterfaceState.xcuserstate and b/MovieVerse-Mobile/platforms/ios/MovieVerse.xcworkspace/xcuserdata/davidnguyen.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MovieVerse-Mobile/platforms/ios/www/404.html b/MovieVerse-Mobile/platforms/ios/www/404.html index 4fd8344b..12af9726 100644 --- a/MovieVerse-Mobile/platforms/ios/www/404.html +++ b/MovieVerse-Mobile/platforms/ios/www/404.html @@ -13,6 +13,7 @@ .center-text { text-align: center; } + .center-button { display: block; margin: 20px auto; @@ -21,10 +22,11 @@ border: none; background-color: #7378c5; font: inherit; - color: #000000; + color: #ffffff; margin-top: 40px; border-radius: 8px; } + .center-button:hover { background-color: #ff8623; transition: background-color 0.3s; @@ -197,7 +199,6 @@ -

@@ -210,11 +211,18 @@

- - - + + +

- - - - - + + + + + +
@@ -271,6 +280,45 @@

404

window.location.href = 'MovieVerse-Frontend/html/movie-details.html'; } + document.addEventListener("DOMContentLoaded", function() { + updateSignInButtonState(); + document.getElementById('googleSignInBtn').addEventListener('click', handleSignInOut); + }); + + function updateSignInButtonState() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + const signInText = document.getElementById('signInOutText'); + const signInIcon = document.getElementById('signInIcon'); + const signOutIcon = document.getElementById('signOutIcon'); + + if (isSignedIn) { + signInText.textContent = 'Sign Out'; + signInIcon.style.display = 'none'; + signOutIcon.style.display = 'inline-block'; + } + else { + signInText.textContent = 'Sign In'; + signInIcon.style.display = 'inline-block'; + signOutIcon.style.display = 'none'; + } + } + + function handleSignInOut() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + if (isSignedIn) { + localStorage.setItem('isSignedIn', JSON.stringify(false)); + alert('You have been signed out.'); + } + else { + window.location.href = 'MovieVerse-Frontend/html/sign-in.html'; + return; + } + + updateSignInButtonState(); + } + function updateClock() { var now = new Date(); var hours = now.getHours(); @@ -326,5 +374,11 @@

404

window.location.href = 'MovieVerse-Frontend/html/search.html'; } + +
+

© 2024 The MovieVerse. All rights reserved.

+
+ + \ No newline at end of file diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/chatbot.css b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/chatbot.css index f48b0f60..e8a67d83 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/chatbot.css +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/chatbot.css @@ -543,7 +543,7 @@ ol li:hover { #local-time { margin-top: 20px; - transform: translateX(15%); + transform: translateX(11%); padding: 10px; border-radius: 10px; z-index: 10; @@ -569,7 +569,7 @@ ol li:hover { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 210px; } main { @@ -664,7 +664,7 @@ main { } .about { - margin-left: 0px; + margin-left: 0; } .favorites-btn { diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/style.css b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/style.css index 072827fd..53d9f101 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/style.css +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/style.css @@ -1168,7 +1168,7 @@ p { } .app-btn { - background-color: #534caf; + background-color: #7378c5; border: 1px solid #ddd; border-radius: 8px; padding: 10px 15px; @@ -1179,6 +1179,7 @@ p { display: block; width: auto; margin: 10px auto; + transition: 0.1s ease-in; } .clock { @@ -1454,6 +1455,10 @@ p { margin-bottom: 20px; } +#search-results-label:hover { + color: #f509d9; +} + .category-buttons button { background-color: #7378c5; font: inherit; @@ -1463,7 +1468,7 @@ p { cursor: pointer; padding: 10px 15px; margin: 10px; - transition: 0.3s ease-in; + transition: 0.1s ease-in; } .category-buttons button:hover { @@ -1722,6 +1727,15 @@ canvas { } } +#ratingImdb { + color: #ff710d; + font-size: 17px; +} + +#ratingImdb:hover { + color: #f509d9; +} + .chart-title { text-align: center; color: #ff710d; diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/trivia.css b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/trivia.css index 72443323..d8a64a60 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/trivia.css +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/css/trivia.css @@ -181,14 +181,6 @@ p { color: #f509d9; } -footer { - text-align: center; - padding: 20px 0; - margin-top: 40px; - background-color: #7378c5; - color: white !important; -} - .button2 { background-color: #7378c5; font: inherit; @@ -232,7 +224,7 @@ header { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 400px; } #main { @@ -610,7 +602,6 @@ main { justify-content: center; } - #clear-search-btn { display: block; margin: 20px auto; @@ -654,7 +645,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -200px; + margin-left: -180px; border-radius: 8px; } @@ -672,7 +663,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -20px; + margin-left: 0; border-radius: 8px; } @@ -689,7 +680,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: 168px; + margin-left: 188px; border-radius: 8px; padding-left: 10px; padding-right: 10px; @@ -734,3 +725,11 @@ main { border: none; cursor: pointer; } + +footer { + text-align: center; + padding: 20px 0; + margin-top: 40px; + background-color: #7378c5; + color: white !important; +} diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/about.html b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/about.html index 91d6a52e..d39d86a5 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/about.html +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/about.html @@ -43,6 +43,7 @@ gtag('config', 'G-CQKJ67FXZ4'); + -
-
+

Privacy Policy

diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/reset-password.html b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/reset-password.html index 72035012..d0b9ce40 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/reset-password.html +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/reset-password.html @@ -11,8 +11,8 @@ - - + + @@ -111,12 +111,13 @@

- + -
+ + />
+ @@ -392,6 +394,7 @@

Reset Password

} } + diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/search.html b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/search.html index a329beea..7dee39dc 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/search.html +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/search.html @@ -6,12 +6,12 @@ Search Results - The MovieVerse - < + - - + + @@ -46,7 +46,7 @@ -
+

The MovieVerse @@ -58,7 +58,7 @@

- + - + -
+ Sign In - The MovieVerse - < + - - + + @@ -125,12 +125,12 @@

- + - + - - + + @@ -86,7 +86,7 @@

- +
- + @@ -138,6 +155,7 @@

Trivia Results

const savedTextColor = localStorage.getItem('textColor'); const savedFontSize = localStorage.getItem('fontSize'); + if (savedBg) { document.body.style.backgroundImage = `url('${savedBg}')`; } @@ -157,7 +175,5 @@

Trivia Results

© 2024 The MovieVerse. All rights reserved.

- - diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/tv-details.html b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/tv-details.html index 0dab1880..ce41ef43 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/tv-details.html +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/html/tv-details.html @@ -2,7 +2,7 @@ - TV Details + TV Details - The MovieVerse @@ -10,8 +10,8 @@ - - + + @@ -62,6 +62,12 @@ #prod-companies:hover { color: #f509d9; } + + @media (max-width: 800px) { + .movie-description { + margin-top: -75px; + } + } @@ -78,7 +84,7 @@

- + - + -
+ = popularityThreshold; - const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; + const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; const adultContentIndicator = movie.adult ? `Adult Content` @@ -1189,6 +1185,21 @@ function updateMoviesFavorited(movieId) { } } +function getMovieCode2() { + const codeOfMovie = "MmJhOGU1MzY="; + return atob(codeOfMovie); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function updateAverageMovieRating(movieId, newRating) { const savedRatings = JSON.parse(localStorage.getItem('movieRatings')) || {}; diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/search.js b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/search.js index 1bb9e4e4..4caf4efb 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/search.js +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/search.js @@ -236,12 +236,14 @@ async function showResults(category) { const response = await fetch(movieUrl); const data = await response.json(); const sortedResults = data.results.sort((a, b) => b.popularity - a.popularity); - displayResults(sortedResults, category); + displayResults(sortedResults, category, searchQuery); } catch (error) { console.error('Error fetching search results:', error); document.querySelector('.movie-match-container1').innerHTML = '

Error fetching results. Please try again later.

'; } + + updateBrowserURL(searchQuery); } document.querySelector('button[onclick="showResults(\'movie\')"]').addEventListener('click', function() { @@ -282,12 +284,14 @@ function updateCategoryButtonStyles(selectedCategory) { } } -function displayResults(results, category) { +function displayResults(results, category, searchTerm) { const container = document.getElementById('movie-match-container1'); container.innerHTML = ''; + const capitalizedCategory = category.charAt(0).toUpperCase() + category.slice(1); + if (results.length === 0) { - container.innerHTML = `

No results found for ${category}. Please try again.

`; + container.innerHTML = `

No results found for "${searchTerm}" in the ${capitalizedCategory} category. Please try again with a different query.

`; return; } showMovies(results, container, category); @@ -427,4 +431,14 @@ function handleSearch() { const searchQuery = document.getElementById('search').value; localStorage.setItem('searchQuery', searchQuery); window.location.reload(); +} + +function updateBrowserURL(title) { + const nameSlug = createNameSlug(title); + const newURL = window.location.protocol + "//" + window.location.host + window.location.pathname + '?search_query=' + nameSlug; + window.history.replaceState({ path: newURL }, '', newURL); +} + +function createNameSlug(title) { + return title.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''); } \ No newline at end of file diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/service-worker.js b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/service-worker.js index 432be0d1..52e81ed2 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/service-worker.js +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/service-worker.js @@ -58,6 +58,7 @@ const urlsToCache = [ '../../images/yellow.jpg', 'analytics.js', '../html/analytics.html', + '../html/offline.html', ]; self.addEventListener('install', event => { @@ -77,9 +78,10 @@ self.addEventListener('fetch', event => { if (response) { return response; } - return fetch(event.request); - } - ) + return fetch(event.request).catch(() => { + return caches.match('../html/offline.html'); + }); + }) ); }); diff --git a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/tv-details.js b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/tv-details.js index 503f6e5a..89671864 100644 --- a/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/tv-details.js +++ b/MovieVerse-Mobile/platforms/ios/www/MovieVerse-Frontend/js/tv-details.js @@ -294,8 +294,6 @@ document.addEventListener("DOMContentLoaded", function() { }); document.addEventListener("DOMContentLoaded", function() { - updateSignInButton(); - initClient(); applySettings(); }); @@ -499,12 +497,16 @@ const twoLetterLangCodes = [ async function fetchTvDetails(tvSeriesId) { const baseUrl = `https://${getMovieVerseData()}/3/tv/${tvSeriesId}`; - const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos`; + const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos,external_ids`; + try { const response = await fetch(urlWithAppend); const tvSeriesDetails = await response.json(); + const imdbId = tvSeriesDetails.external_ids.imdb_id; + + const imdbRating = await fetchTVRatings(imdbId); - populateTvSeriesDetails(tvSeriesDetails); + populateTvSeriesDetails(tvSeriesDetails, imdbRating); updateBrowserURL(tvSeriesDetails.name); } catch (error) { @@ -512,6 +514,24 @@ async function fetchTvDetails(tvSeriesId) { } } +async function fetchTVRatings(imdbId) { + const omdbCode = `${getMovieCode2()}`; + const omdb = `https://${getMovieActor()}/?i=${imdbId}&${getMovieName()}${omdbCode}`; + + try { + const response = await fetch(omdb); + const data = await response.json(); + + let imdbRating = data.imdbRating ? data.imdbRating : 'N/A'; + + return imdbRating; + } + catch (error) { + console.error('Error fetching TV series ratings:', error); + return 'N/A'; + } +} + function getLanguageName(code) { const language = twoLetterLangCodes.find(lang => lang.code === code); return language ? language.name : 'Unknown Language'; @@ -522,7 +542,7 @@ function getCountryName(code) { return regionNames.of(code); } -function populateTvSeriesDetails(tvSeries) { +function populateTvSeriesDetails(tvSeries, imdbRating) { const title = tvSeries.name || 'Title not available'; document.getElementById('movie-title').textContent = title; document.title = tvSeries.name + " - TV Series"; @@ -549,6 +569,15 @@ function populateTvSeriesDetails(tvSeries) { const voteCount = tvSeries.vote_count ? tvSeries.vote_count.toLocaleString() : 'N/A'; detailsHTML += `

User Rating: ${(voteAverage / 2).toFixed(1)}/5.0 (based on ${voteCount} votes)

`; + if (tvSeries.external_ids && tvSeries.external_ids.imdb_id) { + const imdbId = tvSeries.external_ids.imdb_id; + const imdbUrl = `https://www.imdb.com/title/${imdbId}/`; + detailsHTML += `

IMDb Rating: ${imdbRating}

`; + } + else { + detailsHTML += `

IMDb Rating: N/A

`; + } + const homepage = tvSeries.homepage ? `Visit` : 'Not available'; detailsHTML += `

Homepage: ${homepage}

`; @@ -717,6 +746,21 @@ function applySettings() { } } +function getMovieCode2() { + const encodedKey = "MmJhOGU1MzY="; + return atob(encodedKey); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function applyTextColor(color) { document.querySelectorAll('h1, h2, h3, p, a, span, div, button, input, select, textarea, label, li') .forEach(element => { diff --git a/MovieVerse-Mobile/platforms/ios/www/index.html b/MovieVerse-Mobile/platforms/ios/www/index.html index 85c18478..e1b1b99f 100644 --- a/MovieVerse-Mobile/platforms/ios/www/index.html +++ b/MovieVerse-Mobile/platforms/ios/www/index.html @@ -1,5 +1,4 @@ - @@ -65,13 +64,13 @@

- - + @@ -156,128 +155,128 @@

-

Award-Winning Movies:

+

Award-Winning Movies:

-

Director's Spotlight: Alfred Hitchcock

+

Director's Spotlight: Alfred Hitchcock

-

Hidden Gems:

-
- -
- -
-

Trending ACTION Movies:

+

Trending ACTION Movies:

-

Trending VIETNAMESE Movies:

+

Trending VIETNAMESE Movies:

-

Trending KOREAN Movies:

+

Trending KOREAN Movies:

-

Trending INDIAN Movies:

+

Trending INDIAN Movies:

-

Trending TV SERIES:

+

Trending TV SERIES:

-

Trending HORROR Movies:

+

Hidden Gems:

+
+ +
+ +
+

Trending HORROR Movies:

-

Trending DOCUMENTARY Movies:

+

Trending DOCUMENTARY Movies:

-

Trending ANIMATED Movies:

+

Trending ANIMATED Movies:

-

Trending SCIENCE FICTION Movies:

+

Trending SCIENCE FICTION Movies:

-

Trending ROMANTIC Movies:

+

Trending ROMANTIC Movies:

-

Trending THRILLER Movies:

+

Trending THRILLER Movies:

-

Trending MYSTERY Movies:

+

Trending MYSTERY Movies:

-

Trending ADVENTURE Movies:

+

Trending ADVENTURE Movies:

-

Trending COMEDY Movies:

+

Trending COMEDY Movies:

-

Trending FANTASY Movies:

+

Trending FANTASY Movies:

-

Trending FAMILY Movies:

+

Trending FAMILY Movies:

-

Trending CRIME Movies:

+

Trending CRIME Movies:

-

Trending CLASSIC Movies:

+

Trending CLASSIC Movies:

@@ -286,13 +285,13 @@

Trending CLASSIC

© 2024 The MovieVerse. All rights reserved.

+ - - + + \ No newline at end of file diff --git a/MovieVerse-Mobile/www/404.html b/MovieVerse-Mobile/www/404.html index 4fd8344b..12af9726 100644 --- a/MovieVerse-Mobile/www/404.html +++ b/MovieVerse-Mobile/www/404.html @@ -13,6 +13,7 @@ .center-text { text-align: center; } + .center-button { display: block; margin: 20px auto; @@ -21,10 +22,11 @@ border: none; background-color: #7378c5; font: inherit; - color: #000000; + color: #ffffff; margin-top: 40px; border-radius: 8px; } + .center-button:hover { background-color: #ff8623; transition: background-color 0.3s; @@ -197,7 +199,6 @@ -

@@ -210,11 +211,18 @@

- - - + + +

- - - - - + + + + + +
@@ -271,6 +280,45 @@

404

window.location.href = 'MovieVerse-Frontend/html/movie-details.html'; } + document.addEventListener("DOMContentLoaded", function() { + updateSignInButtonState(); + document.getElementById('googleSignInBtn').addEventListener('click', handleSignInOut); + }); + + function updateSignInButtonState() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + const signInText = document.getElementById('signInOutText'); + const signInIcon = document.getElementById('signInIcon'); + const signOutIcon = document.getElementById('signOutIcon'); + + if (isSignedIn) { + signInText.textContent = 'Sign Out'; + signInIcon.style.display = 'none'; + signOutIcon.style.display = 'inline-block'; + } + else { + signInText.textContent = 'Sign In'; + signInIcon.style.display = 'inline-block'; + signOutIcon.style.display = 'none'; + } + } + + function handleSignInOut() { + const isSignedIn = JSON.parse(localStorage.getItem('isSignedIn')) || false; + + if (isSignedIn) { + localStorage.setItem('isSignedIn', JSON.stringify(false)); + alert('You have been signed out.'); + } + else { + window.location.href = 'MovieVerse-Frontend/html/sign-in.html'; + return; + } + + updateSignInButtonState(); + } + function updateClock() { var now = new Date(); var hours = now.getHours(); @@ -326,5 +374,11 @@

404

window.location.href = 'MovieVerse-Frontend/html/search.html'; } + +
+

© 2024 The MovieVerse. All rights reserved.

+
+ + \ No newline at end of file diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/chatbot.css b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/chatbot.css index f48b0f60..e8a67d83 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/chatbot.css +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/chatbot.css @@ -543,7 +543,7 @@ ol li:hover { #local-time { margin-top: 20px; - transform: translateX(15%); + transform: translateX(11%); padding: 10px; border-radius: 10px; z-index: 10; @@ -569,7 +569,7 @@ ol li:hover { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 210px; } main { @@ -664,7 +664,7 @@ main { } .about { - margin-left: 0px; + margin-left: 0; } .favorites-btn { diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/style.css b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/style.css index 072827fd..53d9f101 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/style.css +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/style.css @@ -1168,7 +1168,7 @@ p { } .app-btn { - background-color: #534caf; + background-color: #7378c5; border: 1px solid #ddd; border-radius: 8px; padding: 10px 15px; @@ -1179,6 +1179,7 @@ p { display: block; width: auto; margin: 10px auto; + transition: 0.1s ease-in; } .clock { @@ -1454,6 +1455,10 @@ p { margin-bottom: 20px; } +#search-results-label:hover { + color: #f509d9; +} + .category-buttons button { background-color: #7378c5; font: inherit; @@ -1463,7 +1468,7 @@ p { cursor: pointer; padding: 10px 15px; margin: 10px; - transition: 0.3s ease-in; + transition: 0.1s ease-in; } .category-buttons button:hover { @@ -1722,6 +1727,15 @@ canvas { } } +#ratingImdb { + color: #ff710d; + font-size: 17px; +} + +#ratingImdb:hover { + color: #f509d9; +} + .chart-title { text-align: center; color: #ff710d; diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/trivia.css b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/trivia.css index 72443323..d8a64a60 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/css/trivia.css +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/css/trivia.css @@ -181,14 +181,6 @@ p { color: #f509d9; } -footer { - text-align: center; - padding: 20px 0; - margin-top: 40px; - background-color: #7378c5; - color: white !important; -} - .button2 { background-color: #7378c5; font: inherit; @@ -232,7 +224,7 @@ header { font-family: inherit; font-size: 1rem; padding: 0.5rem 1rem; - width: 250px; + width: 400px; } #main { @@ -610,7 +602,6 @@ main { justify-content: center; } - #clear-search-btn { display: block; margin: 20px auto; @@ -654,7 +645,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -200px; + margin-left: -180px; border-radius: 8px; } @@ -672,7 +663,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: -20px; + margin-left: 0; border-radius: 8px; } @@ -689,7 +680,7 @@ main { cursor: pointer; position: absolute; top: 0; - margin-left: 168px; + margin-left: 188px; border-radius: 8px; padding-left: 10px; padding-right: 10px; @@ -734,3 +725,11 @@ main { border: none; cursor: pointer; } + +footer { + text-align: center; + padding: 20px 0; + margin-top: 40px; + background-color: #7378c5; + color: white !important; +} diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/about.html b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/about.html index 91d6a52e..d39d86a5 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/about.html +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/about.html @@ -43,6 +43,7 @@ gtag('config', 'G-CQKJ67FXZ4'); + -
-
+

Privacy Policy

diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/reset-password.html b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/reset-password.html index 72035012..d0b9ce40 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/reset-password.html +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/reset-password.html @@ -11,8 +11,8 @@ - - + + @@ -111,12 +111,13 @@

- + -
+ + />
+ @@ -392,6 +394,7 @@

Reset Password

} } + diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/search.html b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/search.html index a329beea..7dee39dc 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/search.html +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/search.html @@ -6,12 +6,12 @@ Search Results - The MovieVerse - < + - - + + @@ -46,7 +46,7 @@ -
+

The MovieVerse @@ -58,7 +58,7 @@

- + - + -
+ Sign In - The MovieVerse - < + - - + + @@ -125,12 +125,12 @@

- + - + - - + + @@ -86,7 +86,7 @@

- +
- + @@ -138,6 +155,7 @@

Trivia Results

const savedTextColor = localStorage.getItem('textColor'); const savedFontSize = localStorage.getItem('fontSize'); + if (savedBg) { document.body.style.backgroundImage = `url('${savedBg}')`; } @@ -157,7 +175,5 @@

Trivia Results

© 2024 The MovieVerse. All rights reserved.

- - diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/tv-details.html b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/tv-details.html index 0dab1880..ce41ef43 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/html/tv-details.html +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/html/tv-details.html @@ -2,7 +2,7 @@ - TV Details + TV Details - The MovieVerse @@ -10,8 +10,8 @@ - - + + @@ -62,6 +62,12 @@ #prod-companies:hover { color: #f509d9; } + + @media (max-width: 800px) { + .movie-description { + margin-top: -75px; + } + } @@ -78,7 +84,7 @@

- + - + -
+ = popularityThreshold; - const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; + const popularityText = isPopular ? `${popularityScore} (This movie is popular)` : `${popularityScore} (This movie is unpopular)`; const adultContentIndicator = movie.adult ? `Adult Content` @@ -1189,6 +1185,21 @@ function updateMoviesFavorited(movieId) { } } +function getMovieCode2() { + const codeOfMovie = "MmJhOGU1MzY="; + return atob(codeOfMovie); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function updateAverageMovieRating(movieId, newRating) { const savedRatings = JSON.parse(localStorage.getItem('movieRatings')) || {}; diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/search.js b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/search.js index 1bb9e4e4..4caf4efb 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/search.js +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/search.js @@ -236,12 +236,14 @@ async function showResults(category) { const response = await fetch(movieUrl); const data = await response.json(); const sortedResults = data.results.sort((a, b) => b.popularity - a.popularity); - displayResults(sortedResults, category); + displayResults(sortedResults, category, searchQuery); } catch (error) { console.error('Error fetching search results:', error); document.querySelector('.movie-match-container1').innerHTML = '

Error fetching results. Please try again later.

'; } + + updateBrowserURL(searchQuery); } document.querySelector('button[onclick="showResults(\'movie\')"]').addEventListener('click', function() { @@ -282,12 +284,14 @@ function updateCategoryButtonStyles(selectedCategory) { } } -function displayResults(results, category) { +function displayResults(results, category, searchTerm) { const container = document.getElementById('movie-match-container1'); container.innerHTML = ''; + const capitalizedCategory = category.charAt(0).toUpperCase() + category.slice(1); + if (results.length === 0) { - container.innerHTML = `

No results found for ${category}. Please try again.

`; + container.innerHTML = `

No results found for "${searchTerm}" in the ${capitalizedCategory} category. Please try again with a different query.

`; return; } showMovies(results, container, category); @@ -427,4 +431,14 @@ function handleSearch() { const searchQuery = document.getElementById('search').value; localStorage.setItem('searchQuery', searchQuery); window.location.reload(); +} + +function updateBrowserURL(title) { + const nameSlug = createNameSlug(title); + const newURL = window.location.protocol + "//" + window.location.host + window.location.pathname + '?search_query=' + nameSlug; + window.history.replaceState({ path: newURL }, '', newURL); +} + +function createNameSlug(title) { + return title.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''); } \ No newline at end of file diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/service-worker.js b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/service-worker.js index 432be0d1..52e81ed2 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/service-worker.js +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/service-worker.js @@ -58,6 +58,7 @@ const urlsToCache = [ '../../images/yellow.jpg', 'analytics.js', '../html/analytics.html', + '../html/offline.html', ]; self.addEventListener('install', event => { @@ -77,9 +78,10 @@ self.addEventListener('fetch', event => { if (response) { return response; } - return fetch(event.request); - } - ) + return fetch(event.request).catch(() => { + return caches.match('../html/offline.html'); + }); + }) ); }); diff --git a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/tv-details.js b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/tv-details.js index 503f6e5a..89671864 100644 --- a/MovieVerse-Mobile/www/MovieVerse-Frontend/js/tv-details.js +++ b/MovieVerse-Mobile/www/MovieVerse-Frontend/js/tv-details.js @@ -294,8 +294,6 @@ document.addEventListener("DOMContentLoaded", function() { }); document.addEventListener("DOMContentLoaded", function() { - updateSignInButton(); - initClient(); applySettings(); }); @@ -499,12 +497,16 @@ const twoLetterLangCodes = [ async function fetchTvDetails(tvSeriesId) { const baseUrl = `https://${getMovieVerseData()}/3/tv/${tvSeriesId}`; - const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos`; + const urlWithAppend = `${baseUrl}?${generateMovieNames()}${tvCode}&append_to_response=credits,keywords,similar,videos,external_ids`; + try { const response = await fetch(urlWithAppend); const tvSeriesDetails = await response.json(); + const imdbId = tvSeriesDetails.external_ids.imdb_id; + + const imdbRating = await fetchTVRatings(imdbId); - populateTvSeriesDetails(tvSeriesDetails); + populateTvSeriesDetails(tvSeriesDetails, imdbRating); updateBrowserURL(tvSeriesDetails.name); } catch (error) { @@ -512,6 +514,24 @@ async function fetchTvDetails(tvSeriesId) { } } +async function fetchTVRatings(imdbId) { + const omdbCode = `${getMovieCode2()}`; + const omdb = `https://${getMovieActor()}/?i=${imdbId}&${getMovieName()}${omdbCode}`; + + try { + const response = await fetch(omdb); + const data = await response.json(); + + let imdbRating = data.imdbRating ? data.imdbRating : 'N/A'; + + return imdbRating; + } + catch (error) { + console.error('Error fetching TV series ratings:', error); + return 'N/A'; + } +} + function getLanguageName(code) { const language = twoLetterLangCodes.find(lang => lang.code === code); return language ? language.name : 'Unknown Language'; @@ -522,7 +542,7 @@ function getCountryName(code) { return regionNames.of(code); } -function populateTvSeriesDetails(tvSeries) { +function populateTvSeriesDetails(tvSeries, imdbRating) { const title = tvSeries.name || 'Title not available'; document.getElementById('movie-title').textContent = title; document.title = tvSeries.name + " - TV Series"; @@ -549,6 +569,15 @@ function populateTvSeriesDetails(tvSeries) { const voteCount = tvSeries.vote_count ? tvSeries.vote_count.toLocaleString() : 'N/A'; detailsHTML += `

User Rating: ${(voteAverage / 2).toFixed(1)}/5.0 (based on ${voteCount} votes)

`; + if (tvSeries.external_ids && tvSeries.external_ids.imdb_id) { + const imdbId = tvSeries.external_ids.imdb_id; + const imdbUrl = `https://www.imdb.com/title/${imdbId}/`; + detailsHTML += `

IMDb Rating: ${imdbRating}

`; + } + else { + detailsHTML += `

IMDb Rating: N/A

`; + } + const homepage = tvSeries.homepage ? `Visit` : 'Not available'; detailsHTML += `

Homepage: ${homepage}

`; @@ -717,6 +746,21 @@ function applySettings() { } } +function getMovieCode2() { + const encodedKey = "MmJhOGU1MzY="; + return atob(encodedKey); +} + +function getMovieName() { + const moviename = "YXBpa2V5PQ=="; + return atob(moviename); +} + +function getMovieActor() { + const actor = "d3d3Lm9tZGJhcGkuY29t"; + return atob(actor); +} + function applyTextColor(color) { document.querySelectorAll('h1, h2, h3, p, a, span, div, button, input, select, textarea, label, li') .forEach(element => { diff --git a/MovieVerse-Mobile/www/index.html b/MovieVerse-Mobile/www/index.html index 85c18478..e1b1b99f 100644 --- a/MovieVerse-Mobile/www/index.html +++ b/MovieVerse-Mobile/www/index.html @@ -1,5 +1,4 @@ - @@ -65,13 +64,13 @@

- - + @@ -156,128 +155,128 @@

-

Award-Winning Movies:

+

Award-Winning Movies:

-

Director's Spotlight: Alfred Hitchcock

+

Director's Spotlight: Alfred Hitchcock

-

Hidden Gems:

-
- -
- -
-

Trending ACTION Movies:

+

Trending ACTION Movies:

-

Trending VIETNAMESE Movies:

+

Trending VIETNAMESE Movies:

-

Trending KOREAN Movies:

+

Trending KOREAN Movies:

-

Trending INDIAN Movies:

+

Trending INDIAN Movies:

-

Trending TV SERIES:

+

Trending TV SERIES:

-

Trending HORROR Movies:

+

Hidden Gems:

+
+ +
+ +
+

Trending HORROR Movies:

-

Trending DOCUMENTARY Movies:

+

Trending DOCUMENTARY Movies:

-

Trending ANIMATED Movies:

+

Trending ANIMATED Movies:

-

Trending SCIENCE FICTION Movies:

+

Trending SCIENCE FICTION Movies:

-

Trending ROMANTIC Movies:

+

Trending ROMANTIC Movies:

-

Trending THRILLER Movies:

+

Trending THRILLER Movies:

-

Trending MYSTERY Movies:

+

Trending MYSTERY Movies:

-

Trending ADVENTURE Movies:

+

Trending ADVENTURE Movies:

-

Trending COMEDY Movies:

+

Trending COMEDY Movies:

-

Trending FANTASY Movies:

+

Trending FANTASY Movies:

-

Trending FAMILY Movies:

+

Trending FAMILY Movies:

-

Trending CRIME Movies:

+

Trending CRIME Movies:

-

Trending CLASSIC Movies:

+

Trending CLASSIC Movies:

@@ -286,13 +285,13 @@

Trending CLASSIC

© 2024 The MovieVerse. All rights reserved.

+ - - + + \ No newline at end of file diff --git a/index.html b/index.html index 3e0044c8..a176adfc 100644 --- a/index.html +++ b/index.html @@ -64,13 +64,13 @@

- - + @@ -155,128 +155,128 @@

-

Award-Winning Movies:

+

Award-Winning Movies:

-

Director's Spotlight: Alfred Hitchcock

+

Director's Spotlight: Alfred Hitchcock

-

Trending ACTION Movies:

+

Trending ACTION Movies:

-

Trending VIETNAMESE Movies:

+

Trending VIETNAMESE Movies:

-

Trending KOREAN Movies:

+

Trending KOREAN Movies:

-

Trending INDIAN Movies:

+

Trending INDIAN Movies:

-

Trending TV SERIES:

+

Trending TV SERIES:

-

Hidden Gems:

+

Hidden Gems:

-

Trending HORROR Movies:

+

Trending HORROR Movies:

-

Trending DOCUMENTARY Movies:

+

Trending DOCUMENTARY Movies:

-

Trending ANIMATED Movies:

+

Trending ANIMATED Movies:

-

Trending SCIENCE FICTION Movies:

+

Trending SCIENCE FICTION Movies:

-

Trending ROMANTIC Movies:

+

Trending ROMANTIC Movies:

-

Trending THRILLER Movies:

+

Trending THRILLER Movies:

-

Trending MYSTERY Movies:

+

Trending MYSTERY Movies:

-

Trending ADVENTURE Movies:

+

Trending ADVENTURE Movies:

-

Trending COMEDY Movies:

+

Trending COMEDY Movies:

-

Trending FANTASY Movies:

+

Trending FANTASY Movies:

-

Trending FAMILY Movies:

+

Trending FAMILY Movies:

-

Trending CRIME Movies:

+

Trending CRIME Movies:

-

Trending CLASSIC Movies:

+

Trending CLASSIC Movies:

@@ -285,13 +285,13 @@

Trending CLASSIC

© 2024 The MovieVerse. All rights reserved.

+ - - + + @@ -52,4 +54,4 @@ - + \ No newline at end of file