Try 30 days of free premium.

Tv Monitor Gadget File

robfila wrote 8 years ago: 1

Anyone know how to change/edit this gadget file to use tvmaze instead of tvrage. I use this everyday


Jan wrote 8 years ago: 1

Hi Rob,

Could you elaborate? I'm not familiar with what you're describing.

robfila wrote 8 years ago: 1

tv monitor windows 8 sidebar gadget. this is what is in the data file.

var rawData = new Array();

function removeCachedData(show)

{

for (var i=0;i<rawData.length;i++)

{

if (rawData[i].InternalName == show)

{

rawData.splice(i,1);

break;

}

}

}

function GetShow(show, sticky)

{

var aggressiveUpdate = false;

for (var i=0; i < rawData.length; i++)

{

if (rawData[i].InternalName == show)

{

var compareDate = new Date();

compareDate.setTime(rawData[i].LastUpdate.valueOf());

var offlineCompareDate = new Date();

offlineCompareDate.setTime(rawData[i].LastUpdate.valueOf());

offlineCompareDate.setMinutes(offlineCompareDate.getMinutes() + 1);

if (rawData[i].NextEpTimeFunc() <= new Date())

{

if (sticky && rawData[i].Sticky)

{

return rawData[i];

}

compareDate.setHours(compareDate.getHours()+1);

aggressiveUpdate = true;

}

else

compareDate.setHours(compareDate.getHours() + 12);

if (new Date() >= compareDate)

{

rawData.splice(i, 1);

}

else if (new Date() >= offlineCompareDate && rawData[i].Offline == true)

{

rawData.splice(i,1);

aggressiveUpdate = true;

}

else

{

return rawData[i];

}

compareDate = null; //Not really needed?

offlineCompareDate = null; //Not really needed?

}

}

var httpObj = new ActiveXObject("Msxml2.XMLHTTP");

if (aggressiveUpdate == true || clearButtonClicked == true)

{

httpObj.open("GET","http://services.tvrage.com/tools/quickinfo.php?show=" + show + "&rand=" + parseInt(Math.random() * 1000000, 10), true);

}

else

{

httpObj.open("GET","http://services.tvrage.com/tools/quickinfo.php?show=" + show, true);

}

httpObj.onreadystatechange = function() {

if (httpObj.readyState == 4) {

var data = new parseRawData(httpObj.responseText, show);

removeCachedData(show);

rawData.push(data);

setTimeout(updateContentDiv, 300);

httpObj = null;

show = null;

}

}

try

{

var data = new parseRawData("loading", show);

rawData.push(data);

httpObj.send(null);

return data;

}

catch (e)

{

var contentDiv = document.getElementById("contentDiv");

contentDiv.innerHTML += e.message + "<br/>";

contentDiv = null;

}

}

robfila wrote 8 years ago: 1

can this file be edited to use tvmaze instead of tvrage services. open("GET","http://services.tvrage.com/tools/quickinfo.php?show=" + show, true)

robfila wrote 8 years ago: 1

("GET","http://services.tvrage.com/tools/quickinfo.php?show=" + show, true)


JuanArango wrote 8 years ago: 1

This gadget was written for tvrage's api, someone would need to completely rewrite it for tvmaze's api, it is not just replacing a line of code.
This will require alot of work.

cheers
Juan

robfila wrote 8 years ago: 1

Thanks Juan, I was really hoping it would work.i guess Ill just have to wait till tvrage gets fixed


Jan wrote 8 years ago: 1

Hi Robfila,

I wouldn't count on tvrage coming back as it's been offline for two months now. To get it fixed, your best bet is to contact the creator of the gadget and request an update.

Another solution would be if you used a desktop calendar gadget that supports ical. It would yeld the same results without needing the extra work from a dev.

cheers,

Jan

Try 30 days of free premium.