Tech Cape Town

Everything about technology from Cape Town

Month: October 2015

My Infinity Project – Building The Best Media Centre

For my day job I’m a developer. That entails learning new technologies all the time. Time after time I’ve battled to keep interest making “To do” list apps and “Hello World” programs. A few years back a needed to learn PHP. Not just the basics, I needed to learn it well enough to make a production system for a client.

At the time I lived with my parents and our internet was poor to say the least. I used the internet at work to download things at night. I needed a way to manage these downloads remotely. I started looking at APIs and remote access. I decided setting up a simple PHP site pulling from APIs would be the best option. And so started my media centre infinity project.

I have to thank Johann Du Toit for the term “Infinity Project.” He introduced me to the term as an individual project that never ends. You keep evolving it over and over again making it better and better as you learn along the way.

I started with a basic page that showed downloads, their progress and I kept track of upcoming episodes of the series I liked to watch. I ran if off a RaspberryPi. Soon I updated an old laptop with some extra hard drive space and I put the extra power to good use.

Fast forward a few months and we had uncapped internet at home. I installed Kodi (then XBMC) and left the laptop plugged into my TV. Soon I stumbled across SickBeard and CouchPotato and started automating movie and TV show downloads. My basic PHP script got a make over and pulled from those APIs.

Soon my site was getting too large to manage so I rebuilt it from the ground up using CodeIgniter. I chose CodeIgniter because the learning curve wasn’t big at all. I got a lot of functionality out in a very short space of time. I was well on my way to “productising” my media centre manager. I made the mistake of using a Bootstrap based but paid admin theme. It seemed like a very good idea at the time, but without it being open source I couldn’t release any of my code. By this time I had moved to Cape Town and my media centre was my primary source of entertainment. I also had much better internet.

Web technologies are always evolving and recently I decided it would be a good idea to learn AngularJS. That way I would be able to make web based apps for iOS and Android as well as it being a stepping stone to really learning Swift properly. I saw this as the perfect opportunity to update my media centre.

I started with a few tutorials online and soon I had the basics down. I’ve always battled with markup. It wasn’t that I couldn’t do it, I just didn’t enjoy it. I found AngularMaterial. I started over and soon I had a really good base to work from. I refactored my old code into an API with a REST library I wrote for CodeIgniter. (Based on this one but heavily updated for performance.) I learned about JSON Web Tokens along the way as a good way to authenticate requests.

Some of you may have noticed me being a little missing in action over the past few weeks. I’ve been focussing on work, some freelance work and helping build an Uber Style App for a startup. On top of all of this I managed to get my media centre into a presentable form.

So this is what I’ve come up with so far:

I made everything responsive as I use it on my phone the most often. I linked it to the Kodi API so I have “Play Now” buttons on the movies and series. I also have the “Now Playing” remote. This pulls whatever is playing from Kodi and the progress. I added in some play/pause and stop buttons. The side effect of having this available over the internet is that I can troll my girlfriend and pause whatever she is watching when I’m at work.

This project is far from over, I will keep updating it. As and when I learn new technologies. I’m hoping an iOS app can be next. Currently I’m running this off of a Mac Mini with OS X Server on it connected to a 4K TV. I’ve moved from SickBeard to SickRage as it is much more actively developed. I can run 4K movies and series at 30fps. (More than enough for video) I serve it to the world over my Telkom Fibre line. This is more than sufficient for my personal needs.

I look forward to your ideas and feedback, please leave them in the comments below or give me a shout on Facebook or Twitter. I’ll look into releasing what I’ve done on GitHub when I’m properly using environment variables and remove a few hard coded hacks. I hope you guys enjoyed this little write up.

Apple’s Magic Trackpad 2 and Magic Keyboard 2 Are Beautiful

I don’t care much for the Magic Mouse but wow, the Trackpad and Keyboard look so good!

They have build in lightning ports for charging so no more AA batteries. They pair automatically when plugged in with a Lightning cable, a handy feature.

The Trackpad has Apple’s Force Touch (Still a terrible name) build in bring that feature to existing MacBooks as well as iMacs.

New toys do not come cheaply though:

Magic Keyboard is available starting today for $99 (US). Magic Mouse 2 is available starting today for $79 (US). And the Magic Trackpad 2 is available starting today for $129 (US).

I suppose I better start saving because I think those will look great on my desk.

All iMacs Now Come With Retina Displays

Today Apple announced that it will be including 4K displays in the 21.5 inch iMac and 5K displays in all of the 27 inch iMacs.

In Apple’s own words:

 The updated iMacs also feature more powerful processors and graphics, two Thunderbolt® 2 ports and new storage options that make the high-performance Fusion Drive even more affordable.

Sounds like a good update all around!

How to Easily Share The Music That You Stream

So you use Apple Music and your friend uses Deezer. Or you swear by Spotify but your girlfriend uses Rdio.

You find the coolest song IN THE WORLD and just have to share it with them. Gone are the days of “Hey, search for this song” and “No that’s not how you spell it.”

I present to you Son.gg. (Pretty cool domain if you ask me)

Instead of me going on about how it works just click here (http://son.gg/3754a0/) to discover a really difficult to share song.

I also have it on good authority that some apps are on the way to make this process even easier!

© 2017 Tech Cape Town

Theme by Anders NorenUp ↑