I am a huge YouTube fan and usually consume my Watch Later Playlist videos before bed. I also made a homescreen shortcut to pull up YouTube at my leisure when I’m at Home. Out of curiosity I wanted to know how many videos I had in the playlist. Then I thought; “What if I could display my Watch Later Playlist Video Count on my homescreen???”
Another of the amazing AutoApps, made by João Dias, is AutoWeb (Play Store link HERE). The Tasker plugin’s main function is to use web services’ APIs to pull information into Tasker. I used the YouTube API to gather my own Watch Later Playlist video count into a local variable. The local variable would then be placed into a KLWP variable which was on my homescreen. It seems perfect!
After entering my credentials and reading through the YouTube API documentation I found the API call and method to extract what I wanted. João has created a dedicated website to assist users in creating API actions (HERE), which I used to create the YouTube API in AutoWeb. I set the Watch Later Playlist quantity into local variable, and mapped it to a KLWP variable to be placed on my homescreen as text.
Now everytime I enter my home geofence, the task executes, updating the KLWP homescreen text with my YouTube Watch Later Playlist video quantity. The task also has some error handling in case I happen to have a weak or non-existent internet connection. I’ve also created a refresh button to update the text with the current video count. Next to the text I have a homescreen shortcut to YouTube to easily watch my favorite videos!
YouTube Watch Later Playlist Count
Due to a change in Google’s change in the Youtube Data API on September 15, 2016 the results from obtaining your Watch Later Playlist Quantity will return a “0”. Bummer! On the bright side, hopefully this blog post will spark some ideas for future automation! YouTube Data API Revision History can be found HERE.