PKU)DG bb appinfo.json{"versionLabel": "1.0", "uuid": "57e1c603-91e2-4f1e-ab91-ca7337e8d372", "appKeys": {}, "longName": "Sickbeard", "versionCode": 1, "capabilities": ["configurable"], "shortName": "Sickbeard", "companyName": "Bert de Ruiter", "watchapp": {"watchface": true}, "resources": {"media": [{"type": "png", "name": "CONNECTED", "file": "images/bt_connected.png"}]}}PKU)D)c pebble-app.binPBLAPP\ HSickbeardBert de Ruiter WOs7rd}R hDhF`GpGpGpGL |D8HJ!zDxD H JxD!zD0 K IXyDh@, j ^ { J FK{D9 KF{D` K{D K{D& K{D` K{Dh!F@y @ 0 "  -w K{DK{D3˄!Fs -ACLF F|DV AOAJDzD@OAJDzD !D3F@F 9$  s!FLK|DX!(`0FK!X`0F+hF{MJ}DOq3(FzDK)FXhKI{DFyD JFXFhp@p s C F LF|DQ JzD JzD M!}D3F(FK)FXh|p~-O\JD[ !`!hhFIFC $P,JIzDyD`Q IhO Kh{D`!h"&hFHF!JLPN`H(I[`!JO1h,HxDhF F(!h/$Oq@DPF`B@I[!FO1`pD`FF8F!IyD.!:

`8I[p!F8`8hO1H;hxDzF8h!F|I8hyD!0P!24P6` tI[`!F0`0hO13h`FLF0h!FgI0hyDd!*D!,P.( m_I[P!F(`(hO1s+h`FFFm(hQFuRI(hyDjPFC< F+!FJI yDkIHxDHHxDGHxDFHxDEHxDDHxD@! h'FHFFHF8hFHF0hFHF(h FHFJ`*tRh8h0h(hhghhPF ]Or!iiIZIT|INIHIBI<I6I0I*I$IIII I0IpIIII軜I(IܻDIֻIлIʻIĻIIIIIII IIII I|0Iv<Ip@IjLIdTI^|IXIRILIFI@I:charging%d%d-%m-%Y%R%m-%d-%Y%I:%M%sRefreshingRESOURCE_ID_BITHAM_30_BLACKRESOURCE_ID_GOTHIC_14100RESOURCE_ID_GOTHIC_241-1-2013Recent downloads:Waiting for refresh... dUdUddUd 10000:00  0 4 8 < @ D H L PKU)Di+Qf f pebble-js-app.js// Fetch saved symbol from local storage (using standard localStorage webAPI) var key = localStorage.getItem("sickbeard_apikey"); var address = localStorage.getItem("sickbeard_address"); var type = localStorage.getItem("sickbeard_24h"); if(!type){ type = 1; } function fetchShows(symbol) { var response; var req = new XMLHttpRequest(); // build the GET request var param = new Date(); if(!address || !key){ Pebble.sendAppMessage({"0": "Setup the watchface in the Pebble app."}); return; } req.open('GET', 'http://'+address+'/api/'+key+'/?cmd=history&limit=4&type=downloaded' , true); req.onload = function(e) { if (req.readyState == 4) { // 200 - HTTP OK if(req.status == 200) { var response = JSON.parse(req.responseText); var max = response["data"].length; if(max > 4){ max = 4; } var shows = ""; var counter = 0; var downloads = response["data"]; for(var a = 0; a < downloads.length; a++){ if (counter < max){ var d = downloads[a]; var title = d["show_name"]; var _date = d["date"]; var month = _date.substring(5,7); var day = _date.substring(8,10); //var title = e["title"]; if(title.length > 19){ title = title.substring(0, 18)+"..."; } if(type == 1){ shows += day+"-"+month+": "+title; }else{ shows += month+"-"+day+": "+title; } if(counter < 3){ shows += "\n"; } } counter++; } Pebble.sendAppMessage({"0": shows}); }else{ Pebble.showSimpleNotificationOnPebble("Sickbeard", "Could not update..."); } }else{ Pebble.showSimpleNotificationOnPebble("Sickbeard", "Could not update..."); } } req.send(null); } // Set callback for the app ready event Pebble.addEventListener("ready", function(e) { console.log("connect!" + e.ready); console.log(e.type); Pebble.sendAppMessage({"2": "refresh"}); fetchShows(); }); Pebble.addEventListener("showConfiguration", function(e) { Pebble.openURL("http://bertderuiter.nl/downloads/sickbeard.php?address="+address+"&key="+key); } ); Pebble.addEventListener("webviewclosed", function(e) { console.log("Configuration window returned: " + e.response); if(e.response == "CANCELLED"){ fetchShows(); return; } var str = e.response; var n = str.indexOf("&")+1; //Pebble.sendAppMessage({"0": str.substring(n,80)+"\n"+str.substring(0,n-1)}); key = str.substring(n,80); address = str.substring(0,n-1); localStorage.setItem("sickbeard_apikey", str.substring(n,80)); localStorage.setItem("sickbeard_address", str.substring(0,n-1)); fetchShows(); } ); // Set callback for appmessage events Pebble.addEventListener("appmessage", function(e) { console.log("message"); console.log("Received message: " + e.payload[1]); localStorage.setItem("sickbeard_24h", e.payload[1]); type = e.payload[1]; fetchShows(); }); PKU)DnXXapp_resources.pbpackd}RLd @ @PKU)DF`|bb manifest.json{"manifestVersion": 1, "generatedBy": "app", "generatedAt": 1389264267, "application": {"timestamp": 1389264267, "sdk_version": {"major": 5, "minor": 0}, "crc": 3539549307, "name": "pebble-app.bin", "size": 2948}, "debug": {}, "type": "application", "resources": {"timestamp": 1389264267, "crc": 2955947687, "name": "app_resources.pbpack", "size": 4184}}PKU)DG bb appinfo.jsonPKU)D)c 큌pebble-app.binPKU)Di+Qf f < pebble-js-app.jsPKU)DnXXapp_resources.pbpackPKU)DF`|bb Z*manifest.jsonPK1+