Why make it?

I watch a lot of anime shows, many of which can't always be found on sites like Netflix or Hulu. So I started to buy the season disc's which arose another annoyance common to physical media, portability. Finally, since I already had a server, I came to this conclusion. Instead of worrying about flash drives and disks I decided to upload the media to my server and create a Netflix-like browser. This way I could access my media files anytime anywhere and just stream them. An extra bonus is that whenever a friend asks to borrow a season I can instead just tell them how to access the stream.

What does it do?

When the site is first accessed it is encased in an htaccess file, obviously I don't want to be sued for redistributing copywrited content. After logging in, the directory is scanned for any image files. These image files act as the thumbnail and also point to the right sub directory containing the videos. When you select a show to watch by default it will show the first episode but, it stores the latest episode watched in a cookie for 30 days. If you go back to that show within 30 days it will load the episode number from cache and show that first the cookie will also refresh the expiration time for another 30 days.