Comments (2)
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?
from homehost.
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.
Steps to startup
- create an api key in tmdb service: https://stackoverflow.com/a/31047912/3957754
- choose some movies in the tmdb web and store its movie-id
- For example in this movie https://www.themoviedb.org/tv/1402-the-walking-dead the movie-id is 1402. You can use these: 'kate 597891.mkv', 'shang-chi-and-the-legend-of-the-ten-rings 566525.mkv', 'the-suicide-squad 436969.mkv'
- in your local disk, create a folder and put 3 videos (mkv/mp4). Rename them setting the movie-id + space + whatever. Example : 1402 another movie.mkv
- As in this test, probably you cannot a spotify account or videos for tv, we are using only movies. If this is your case, modify this line in the client to render just movies:
if (containerRef.current && containerRef.current.firstChild && data) {
- npm install in server and client folder
- open 3 shells and export these variables. Note the use of the local ip in CLIENT_BASE_URL variables:
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
- create the database running
npx prisma migrate dev
in the server folder, using one of the previous opened shells - startup the prisma server running
npx prisma studio
in the server, using one of the previous opened shells - startup the home-host server running
npm run dev
, using one of the previous opened shells - startup the home-host web client running
npm run start
, using one of the previous opened shells - an url will be opened in your default browser. Change the localhost in the url by your local ip
Coming soon
- I will perform a PR with Docker docker-compose alternative
- Create an issue related to video load error
- Create an issue to enable or disable categories: movies, tvs, songs. In this version, if you cannot pass all of categories (videos/songa on your local disk), an error is throwed. That why a react modification is required in the previous steps
from homehost.
Related Issues (20)
- Babel error on starting homehost by running yarn homehost HOT 4
- G HOT 6
- Oauth2 Support
- Make Docker Image HOT 1
- Cannot get tv/ HOT 4
- cannot find module './movies.json' HOT 2
- [Suggestion] replace demo video with rickroll
- Local disk storage HOT 1
- TypeError: containerRef.current.firstChild is null
- Still active ? HOT 1
- Can we expect google drive integration with heroku deployment?
- Outdated
- Update HOT 3
- support IPFS backend
- Idfk how to use it
- Allow for more flexible folder structure
- Are API keys required? HOT 1
- Support more audio formats HOT 4
- Docker? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homehost.