Show HN: Nextflick.io – Watch a random movie trailer https://ift.tt/nIiloQJ
Show HN: Nextflick.io – Watch a random movie trailer I want to introduce Nextflick to you, a website I made showing you a random movie trailer, so you can find out what to watch next. Technically, Nextflick is a rather simple website. Everything is rendered on the server-side. Movies are scraped from the TMDB API and dumped into a NoSQL database. When you request a page, a random movie is selected and it shows you a YouTube embed with a respective trailer. Even though this may seem like such a simple tool, I am immensely proud of it. It is my first project I ever actually shipped, and I had this idea in my head for over 5 years. Sadly I am suffering from a bad load of perfectionism, which always got in the way of finishing anything, until today. I deliberately chose to create something that is small and straightforward. I chose Go as a language because it helps me enormously to "get sh*t done". I don't have to think about too many language constructs or idiomatic ways of how to achieve something. I can simply write down my thoughts. I love the error handling as well, it makes me worry less about unexpected errors because the API pretty much tells me exactly where they happen and I can handle them right then and there. NoSQL helped me even more to keep things simple. Since there are no write operations happening on the website itself, it can be used in a readonly mode. If I want to download a new set of movies from TMDB, I simply write everything into a new NoSQL file and then swap the old against the new. I consciously did not implement any sort of filters. I wanted the experience to mimic that of going to your local cinema: you see a set of random trailers, some of them you won't like, but maybe one will stick. You might end up watching a movie you never thought to look for in the first place. There are currently 5.546 movies in the database. This number seems a bit low to me, given that TMDB has over 1.000.000 movies stored. However, I applied some criteria to the movies I imported in order to achieve a certain amount of quality: * They needed to have a trailer * They needed not to be flagged as "adult" * They needed to have an average TMDB user rating of over 6.5 to filter out low quality results * I realise that there are people who are interested in "crappy" B-movies. Pending feedback, I might be willing to reconsider this. * I excluded certain genres like live music or documentaries * They needed to be released, so you can actually go and watch them * They needed to have a runtime of at least 80m, I didn't want to include short films for now * They needed to be released after 1965 * I know that there are a lot of gems from before that time, however, I felt that most of the older ones didn't have proper trailers, or at least not of the sort as we would expect them today, so it felt a bit off to include them * They needed to be in English (for now, if people like it I might add more languages later on) There are also some outstanding issues I have not addressed yet: * YouTube shows the full title of the video name in the embed, this kinda gives away the surprise of watching the trailer until the end. However, since they disabled the option to hide video information, I was not able to find an easy fix for this * Some YouTube videos are marked as "private" or are not available in certain countries, so you will see an error every now and then. I might need to start using YouTube's API to filter these out * Trailers do not autoplay in Safari and Firefox * This one is unfortunate, as it negatively affects the experience of browsing through the trailers. I haven't figured out if there is a way to "fix" this * I tried my best to reach very good Lighthouse results. Oddly enough, the YouTube embed itself performs really poorly by loading megabytes of JavaScript and is flagged by it * Some movies are flagged incorrectly by TMDB, you might end up seeing some movies that are actually not precisely following the criteria I mentioned above https://nextflick.io/ March 30, 2023 at 12:01AM
Comments
Post a Comment
Thanks you :)
if you like it share please