This last notification that I have prepared is one of the most difficult things I’ve done in tasker to date. I understood all of what I was doing but it took a LOT of effort to get this done.
First, I’d like to start with this, I NEVER see BOTH notifications at the same time, I took this screenshot for the blog, instead of taking 2 🙂 More about this later.
I’d like to start with the Media Center Notification, many of you may not be familiar with Media center, so I’ll tell you, it’s the one with the green Microsoft Windows logo.
The first part of getting this notification set up was using a piece of software I have on the computer that allows TCP/IP control of Windows Media Center called VMCController. I was able to query the Media Center for the “Metadata”. This is done by using Tasker’s HTTP Get, it then writes that file to my phone for me to “play with”.
The typical file looks like this:
<pre>Name=file:///E:/Recorded TV/Unprotected/Clear and Present Danger_HDNETMV_2013_01_29_18_29_00.wtv
Title=Clear and Present Danger
Duration=02:31:58.5287171
Uri=file:///E:/Recorded TV/Unprotected/Clear and Present Danger_HDNETMV_2013_01_29_18_29_00.wtv
</pre>
Since most of my data is sprawled across my network, I had to use “if” conditions to read the directory name, and if it wasn’t matching a certain string, I had tasker look at another variable.
Example:
E:/Recorded TV/Unprotected/Clear and Present Danger
E:/Recorded TV/J. Edgar
OR
D:/All Media/Movies
D:/All Media/Music
I used Tasker Variable splits to give me the title and duration of the movie. But I wasn’t satisfied with just the data, I had to take it a step further. I wanted more information about the show, so I use another variable split on the movie title to get it ready to query a movie/show database.
For this mymovieapi.com was perfect to get the description on the movie. It gives me an XML of the movie data to do more variable splits.
This is about just the same for Media Player Classic, but the only data I get from MPC is a title, I had to query the database again to change it to a proper name with capitalization and duration and short synopsis. The duration was given in a minute format (e.g. 127 mins), I had to write a formula and do more variable splits, multiplications, divisions, sections to get it uniform across each notification. You could say I am a perfectionist to do this, and I’d be guilty but hey, what’s life with out a little uniformity. 🙂
I also added play control to it, and if I touch it, it would pull up the IMDB site for the movie/show. I will get into this in a video series.
It all comes together to see what you see today!
Besides AutoRemote and AutoVoice, I would say this is the most worthwhile investment I’ve made for Tasker. At $1.19, who can go wrong. Seriously, if you are on the fence with Tasker, it’s a $3 app, Joao’s plug-ins are half the price and I am going to say, you couldn’t buy an automation system like this.
Today is a good day to own an Android 🙂