[Tool] Twitch/Justin.tv viewer count overlay (Update 1.0!)

Bkid

New Member
Something I threw together really quick for some people to try out, at least until OBS (or Dashboard Lite) has it. I'll try to keep this thread updated if I actually continue developing this. :p

Edit: Fixed Version numbering as I'm going to keep this easy on myself. :]

v1.0.0.0 (5/13/13):
https://sourceforge.net/projects/tvco/f ... e/download

v0.0.0.1 (build 2) (5/6/13):
https://sourceforge.net/projects/tvco/f ... e/download

Usage:
1) Start the program and enter your twitch (or jtv) username in the box, followed by pressing Go!
2) Press F12 (or right-click the tray icon) to exit.

Known bugs/issues:
  • If you drag the window while it happens to be making a call to pull the viewer count, the program may temporarily freeze.
  • Doesn't appear in front of Fullscreen games (a workaround is to use Borderless or Windowed in games).
  • Clicking the window in Borderless or Windowed causes the game to lose focus (the overlay acts as a window and is treated as such).

Changelog:
v1.0.0.0 (Jumping to 1.0!):
  • Swapped "About" and "Exit" button positions.
  • Saves last used stream name upon exit.
  • Supressed (hopefully) all error message popups.
  • Recoded viewer count to show the count if the stream is Online, "Offline" if the stream is offline, and "Timeout" if the Internet connection is not available or the Send command times out.
  • New (and just as terrible) icon!

v0.0.0.1 (build 2):
  • Reduced gui size to cut unnecessary space off of right side (fits up to 6 numbers, possibly 7).

Screenshots:



 

totalcereal

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay

This is pretty cool, though it would be nice to have it remember the last channel instead of always defaulting to RiotGames.
 

Demix

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay

Awesome little app. May I ask exactly how you're pulling the user count from the site? I tried vaguely to find the part of the stream page where it has user count but I had no joy. I would appreciate knowing how it is you're managing to pull this information :P maybe it's just something I'm missing
 

Bkid

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay

totalcereal said:
This is pretty cool, though it would be nice to have it remember the last channel instead of always defaulting to RiotGames.
I'll probably add this in on the next version. I'll just save it to an ini file for easy access.

Demix said:
Awesome little app. May I ask exactly how you're pulling the user count from the site? I tried vaguely to find the part of the stream page where it has user count but I had no joy. I would appreciate knowing how it is you're managing to pull this information :P maybe it's just something I'm missing
Well to avoid the dumb authentication process that the API involves (and since I'm using AHK which would be a pain to do that with), I found that public information requires no auth or hassle. It's actually quite easy to get ahold of via:

http://api.justin.tv/api/stream/summary.json?channel=

Where you just fill in the blank. Or leave it blank, and it'll give you a summary of the whole site. You can also change .json to .xml for easier (imo) access to the data.

More information is available here, here, and here.

There's another nasty bug I gotta take care of, too. It seems that if you lose connection to the Internet or lag, causing the data pull to time out, it will definitely let you know (in the form of a huge error popup). Gotta make sure to suppress that in the next release. :p
 

Demix

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay

Ah thank you very much! I wasn't aware the basics of the API could be used without all the authentication. That made my life so much easier xD (Parsing html is a pain. I was resorting to attempting that). I like your app anyway, works well! I was just curious about that part. Thanks for clearing that up for me. As for the huge error, haha there are some things you just can't predict with white box testing, at least you found it anyway =P
 

Bkid

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

Updated to 1.0 today! Lots of good stuff in there. :D
 

dehixem

Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

My bad, I didn't see it right away °A°
I'm so silly
 

Bkid

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

Working on an update which will include the option for floating text instead of it being in a box, and font options (type, color, size, etc.).

Coming soon™!
 

HypnoToadTrance

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

If you drag the window while it happens to be making a call to pull the viewer count, the program may temporarily freeze.
I believe you may avoid this by running the status refreshment method inside of a new Thread. Let it do work and then when it's done, send the updated stats back to the window.
 

Bkid

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

HypnoToadTrance said:
I believe you may avoid this by running the status refreshment method inside of a new Thread. Let it do work and then when it's done, send the updated stats back to the window.
This is made in AHK, which only runs a single thread, so unfortunately that's not possible.
 

Phantasmal

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

Would you mind releasing the source? I know it's a simple program, but I'd love to know how you called the number of viewers. or perhaps just post that snippet?
 

dondi

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

This is the tool I needed, thanks!

Could this also count down the viewers who watched the stream?
So it would looks something like this: "1/100 viewers".
 

Bkid

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

dondi said:
This is the tool I needed, thanks!

Could this also count down the viewers who watched the stream?
So it would looks something like this: "1/100 viewers".
Do you mean how many people are currently watching/how many people total have watched?

I'll try to look into that for the next update.
 

HypnoToadTrance

New Member
Re: [Tool] Twitch/Justin.tv viewer count overlay (Update 1.0

Bkid said:
HypnoToadTrance said:
I believe you may avoid this by running the status refreshment method inside of a new Thread. Let it do work and then when it's done, send the updated stats back to the window.
This is made in AHK, which only runs a single thread, so unfortunately that's not possible.
Thinking on my feet here, you could create a .bat file in a temporary directory which performs the pull and saves the result to a text file. Poll the folder periodically for an expected .txt file, once it's there, read the result from it. This should eliminate or at least reduce the performance hit.

Just offering ideas. I'm sure an experienced programmer such as yourself can figure something out.
 
Top