Open jrichardsz opened 2 years ago
Reviewing and with some intuition
I found the values:
MOVIES_API = api.themoviedb.org/3
MOVIES_KEY = 81*****e0b
MOVIES_KEY is the TMDB API KEY
Whit these values, there are some successes and errors in the log:
Generating data for Movies...
GET: /foo/bar/like-netflix/movies/kate 597891.mkv
url: https://api.themoviedb.org/3/movie/597891?api_key=81****0b&append_to_response=images,credits,similar
GET: /foo/bar/like-netflix/movies/shang-chi-and-the-legend-of-the-ten-rings 566525.mkv
url: https://api.themoviedb.org/3/movie/566525?api_key=81****0b&append_to_response=images,credits,similar
GET: /foo/bar/like-netflix/movies/shang-chi-and-the-legend-of-the-ten-rings 566525.mkv
url: https://api.themoviedb.org/3/movie/566525?api_key=81****0b&append_to_response=images,credits,similar
GET: /foo/bar/like-netflix/movies/shang-chi-and-the-legend-of-the-ten-rings 566525.mkv
url: https://api.themoviedb.org/3/movie/566525?api_key=81****0b&append_to_response=images,credits,similar
GET: /foo/bar/like-netflix/movies/shang-chi-and-the-legend-of-the-ten-rings 566525.mkv
url: https://api.themoviedb.org/3/movie/566525?api_key=81****0b&append_to_response=images,credits,similar
There was a problem adding this movie PrismaClientUnknownRequestError:
Invalid `prisma.movie.upsert()` invocation:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: ConnectionError(Timed out during query execution.) })
at cb (/tmp/workspace/homehost/server/node_modules/@prisma/client/runtime/index.js:36956:17)
at async upsertManyMovies (/tmp/workspace/homehost/server/jobs/index.js:114:7)
at async sync (/tmp/workspace/homehost/server/jobs/index.js:55:27) {
clientVersion: '3.1.1'
}
And when I try to load the web, there is nothing to see :(
This is the log when web page try to query something:
(node:24817) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at format (/tmp/workspace/homehost/server/utils/index.js:15:21)
at getRandomMovie (/tmp/workspace/homehost/server/data/index.js:348:10)
at async getRandomMovieOrTVShow (/tmp/workspace/homehost/server/data/index.js:336:31)
at async /tmp/workspace/homehost/server/routes/index.js:232:25
(Use `node --trace-warnings ...` to show where the warning was created)
What I'm doing wrong?
I was able to run everything:
But when I try to watch a video, I got this error:
I will create another issue with this new error.
if (containerRef.current && containerRef.current.firstChild && data) {
export REACT_APP_IMAGE_BASE="https://image.tmdb.org/t/p/"
export REACT_APP_TMDB_BASE="https://www.imdb.com/title/"
export TMDB_KEY='811****ce0b'
export SPOTIFY_CLIENT_ID='<client_id>'
export SPOTIFY_CLIENT_SECRET='<client_secret>'
export MOVIES_PATH='/foo/bar/storage/movies'
export TV_PATH='/opt/tv/directory'
export MUSIC_PATH='/opt/music/directory'
export DATABASE_URL='file:./data/media.db'
export CLIENT_BASE_URL='http://192.168.A.B:3000'
export MOVIES_API=api.themoviedb.org/3
export MOVIES_KEY=811****ce0b
npx prisma migrate dev
in the server folder, using one of the previous opened shellsnpx prisma studio
in the server, using one of the previous opened shellsnpm run dev
, using one of the previous opened shellsnpm run start
, using one of the previous opened shells
I tried to start the server using the readme:
npx prisma migrate dev
I got this error:
My server env is:
Research
I found that the error is trowed in this file:
homehost/server/services/metadata.js
So my question is, what are the expected values for MOVIES_API and MOVIES_KEY?
Thanks