Not sure what to watch? Discover your next favorite movie by watching random trailers, just like in a cinema! Click, watch, and find the perfect film for your mood.
Replies
Best
Maker
📌
I wanted to have a fun way of discovering movies to watch. I always thought the experience of watching a bunch of trailers, like in the cinema, works best for me. So I sat down and replicated that.
Out of curiosity I decided to write everything in PHP. It’s the scripting language I grew up with and I wanted to get back into that “dirty hacking” mindset I had as a kid.
As I suspected, I was remarkably productive. No framework to think about, no unit tests to write. I simply hacked out line after line. For a small project like this, this seems perfectly fine to me.
I took me around 4-5 hours to write the code. In its final shape, it consists of 217 lines (excl. styling): 163 for the import job and 54 for the actual website.
My data source is The Movie Database (TMDB). They have a nice API that I scraped.
As a database I chose SQLite. Since I have literally no write operations after I imported the TMDB, I thought it would be a smart choice. It performs really well so far.
Another couple of hours went into refining the filters that I chose to decide whether I import a movie or not. This is what I ended up with:
- English (for now)
- Released after 1965
- Have at least HD trailers (720p)
- Rated at least 6.0 on TMDB
- No adult movies
- No short movies
- No documentaries
- No concerts
- This nets me around 5,000 movies.
There are a couple of known issues, mostly around trailers on YouTube not being available or deleted. I have plans to work around this by checking YouTube for the trailers before importing them. But I haven’t gotten around to implementing this yet.
Report
Simple solution. Clear idea. Like it!
Report
Maker
Thank you very much - glad you like it :)
Report
Good start! Excited to see how this product will grow and improve.
Replies
Simple solution. Clear idea. Like it!
Thank you very much - glad you like it :)
Good start! Excited to see how this product will grow and improve.
Thank you very much - me too! 🙂