Skip to content

Commit 5130587

Browse files
committed
New skin
1 parent d735e1a commit 5130587

File tree

13 files changed

+591
-6
lines changed

13 files changed

+591
-6
lines changed

resources/lib/interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def onInit(self):
3838
instruction.setLabel(
3939
getstr(32022).format("[COLOR yellow]" + self.url + "[/COLOR]"))
4040
self.getControl(PIN_LABEL).setLabel(self.pin)
41-
41+
4242
cnt = 0
4343
while self.waiting:
4444
if cnt % (self.inter+1) == 0 and cnt>1:
@@ -66,7 +66,7 @@ def onAction(self, action):
6666
def onControl(self, controlID):
6767
pass
6868
def onFocus(self, controlID):
69-
pass
69+
pass
7070

7171
def onClick(self, controlID):
7272
xbmc.log("Simkl: onclick {}".format(controlID))

resources/lib/simklapi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,16 @@ def watched(self, filename, mediatype, duration, date=time.strftime('%Y-%m-%d %H
140140
else:
141141
xbmc.log("Simkl: Filename - {}".format(filename))
142142
values = {"file":filename}
143+
xbmc.log(values)
143144
values = json.dumps(values)
144-
xbmc.log("Simkl: Getting info about: ".format(values))
145+
xbmc.log("Simkl: Query: {}".format(values))
145146
con.request("GET", "/search/file/", body=values, headers=headers)
146147
r1 = con.getresponse().read().decode("utf-8")
147148
r = json.loads(r1)
149+
xbmc.log("Simkl: Response: {}".format(r))
148150
if r == []:
149151
xbmc.log("Simkl: Couldn't scrobble: Null Response")
150152
return 0
151-
xbmc.log("Simkl: Response: {}".format(r))
152153
media = mediadict[r["type"]]
153154
toappend = {"ids": r[r["type"]]["ids"], "watched_at":date}
154155

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<window id="9999">
3+
<defaultcontrol always="true">203</defaultcontrol>
4+
<animation effect="fade" time="500">WindowOpen</animation>
5+
<animation effect="fade" time="500">WindowClose</animation>
6+
<coordinates>
7+
<posx>240</posx>
8+
<posy>170</posy>
9+
</coordinates>
10+
<controls>
11+
<!-- THE BACKGROUND -->
12+
<control type="group">
13+
<control type="image">
14+
<description>Background</description>
15+
<posx>0</posx>
16+
<posy>0</posy>
17+
<width>800</width>
18+
<height>400</height>
19+
<texture>bg_simkl.jpg</texture>
20+
</control>
21+
<!-- Remember to pass all the labels to the .po file -->
22+
<control type="label">
23+
<description>Header</description>
24+
<posx>0</posx>
25+
<posy>30</posy>
26+
<width>800</width>
27+
<height>25</height>
28+
<!-- Structure: $ADDON[script.simkl <STRID>] -->
29+
<label>SIMKL account authorization</label>
30+
<align>center</align>
31+
<aligny>center</aligny>
32+
<textcolor>FFAAAAAA</textcolor>
33+
</control>
34+
<control type="label" id="201">
35+
<description>PIN</description>
36+
<posx>0</posx>
37+
<posy>55</posy>
38+
<width>800</width>
39+
<height>80</height>
40+
<label> - </label>
41+
<font>font_MainMenu</font>
42+
<align>center</align>
43+
<aligny>center</aligny>
44+
<textcolor>FFFFFFFF</textcolor>
45+
</control>
46+
</control>
47+
48+
<control type="group">
49+
<control type="label" id="202">
50+
<description>Instructions</description>
51+
<posx>0</posx>
52+
<posy>170</posy>
53+
<width>800</width>
54+
<height>50</height>
55+
<label> Instructions </label>
56+
<align>center</align>
57+
<aligny>center</aligny>
58+
<textcolor>FFFFFFFF</textcolor>
59+
</control>
60+
<control type="button" id="203">
61+
<description>Cancel</description>
62+
<align>center</align>
63+
<posx>325</posx>
64+
<posy>320</posy>
65+
<width>150</width>
66+
<height>30</height>
67+
<label>Cancel</label>
68+
<onclick>PreviousMenu</onclick>
69+
<!-- Not visible if using a remote (press back) -->
70+
<visible>system.getbool(input.enablemouse)</visible>
71+
</control>
72+
</control>
73+
</controls>
74+
</window>
86.2 KB
Loading
16.1 KB
Loading
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Kodi PIN Simple</title>
6+
<style>
7+
body {
8+
margin-left: 0px;
9+
margin-top: 0px;
10+
margin-right: 0px;
11+
margin-bottom: 0px;
12+
}
13+
.screen {
14+
display: -webkit-box;
15+
display: -webkit-flex;
16+
display: -ms-flexbox;
17+
display: flex;
18+
height: 100vh;
19+
-webkit-box-pack: center;
20+
-webkit-justify-content: center;
21+
-ms-flex-pack: center;
22+
justify-content: center;
23+
background-image: url('img_kodi/demo_kodi_app.png');
24+
background-position: 0px 0px;
25+
background-size: cover;
26+
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
27+
}
28+
29+
.pinpopup {
30+
display: -webkit-box;
31+
display: -webkit-flex;
32+
display: -ms-flexbox;
33+
display: flex;
34+
width: 50%;
35+
height: 50vh;
36+
-webkit-box-orient: vertical;
37+
-webkit-box-direction: normal;
38+
-webkit-flex-direction: column;
39+
-ms-flex-direction: column;
40+
flex-direction: column;
41+
-webkit-box-pack: start;
42+
-webkit-justify-content: flex-start;
43+
-ms-flex-pack: start;
44+
justify-content: flex-start;
45+
-webkit-align-self: center;
46+
-ms-flex-item-align: center;
47+
align-self: center;
48+
border: 1px solid #000;
49+
background-color: #242424;
50+
}
51+
52+
.popupheader {
53+
display: -webkit-box;
54+
display: -webkit-flex;
55+
display: -ms-flexbox;
56+
display: flex;
57+
width: 100%;
58+
height: 20vh;
59+
-webkit-box-orient: vertical;
60+
-webkit-box-direction: normal;
61+
-webkit-flex-direction: column;
62+
-ms-flex-direction: column;
63+
flex-direction: column;
64+
-webkit-box-pack: start;
65+
-webkit-justify-content: flex-start;
66+
-ms-flex-pack: start;
67+
justify-content: flex-start;
68+
-webkit-box-align: stretch;
69+
-webkit-align-items: stretch;
70+
-ms-flex-align: stretch;
71+
align-items: stretch;
72+
-webkit-align-self: flex-start;
73+
-ms-flex-item-align: start;
74+
align-self: flex-start;
75+
background-color: #171717;
76+
color: #a7a7a7;
77+
text-align: center;
78+
}
79+
80+
.pin {
81+
display: -webkit-box;
82+
display: -webkit-flex;
83+
display: -ms-flexbox;
84+
display: flex;
85+
-webkit-box-pack: center;
86+
-webkit-justify-content: center;
87+
-ms-flex-pack: center;
88+
justify-content: center;
89+
-webkit-box-align: center;
90+
-webkit-align-items: center;
91+
-ms-flex-align: center;
92+
align-items: center;
93+
-webkit-box-flex: 1;
94+
-webkit-flex: 1;
95+
-ms-flex: 1;
96+
flex: 1;
97+
}
98+
99+
.headertext {
100+
display: -webkit-box;
101+
display: -webkit-flex;
102+
display: -ms-flexbox;
103+
display: flex;
104+
-webkit-box-pack: center;
105+
-webkit-justify-content: center;
106+
-ms-flex-pack: center;
107+
justify-content: center;
108+
-webkit-box-align: center;
109+
-webkit-align-items: center;
110+
-ms-flex-align: center;
111+
align-items: center;
112+
-webkit-box-flex: 1;
113+
-webkit-flex: 1;
114+
-ms-flex: 1;
115+
flex: 1;
116+
font-size: 18px;
117+
}
118+
119+
.pintext {
120+
display: block;
121+
height: 59px;
122+
-webkit-box-pack: start;
123+
-webkit-justify-content: flex-start;
124+
-ms-flex-pack: start;
125+
justify-content: flex-start;
126+
-webkit-box-align: center;
127+
-webkit-align-items: center;
128+
-ms-flex-align: center;
129+
align-items: center;
130+
-webkit-align-self: flex-start;
131+
-ms-flex-item-align: start;
132+
align-self: flex-start;
133+
color: #fff;
134+
font-size: 59px;
135+
}
136+
137+
.footer {
138+
display: -webkit-box;
139+
display: -webkit-flex;
140+
display: -ms-flexbox;
141+
display: flex;
142+
height: 30vh;
143+
-webkit-box-orient: vertical;
144+
-webkit-box-direction: normal;
145+
-webkit-flex-direction: column;
146+
-ms-flex-direction: column;
147+
flex-direction: column;
148+
-webkit-box-pack: start;
149+
-webkit-justify-content: flex-start;
150+
-ms-flex-pack: start;
151+
justify-content: flex-start;
152+
}
153+
154+
.footer-text {
155+
display: -webkit-box;
156+
display: -webkit-flex;
157+
display: -ms-flexbox;
158+
display: flex;
159+
-webkit-box-pack: center;
160+
-webkit-justify-content: center;
161+
-ms-flex-pack: center;
162+
justify-content: center;
163+
-webkit-box-align: end;
164+
-webkit-align-items: flex-end;
165+
-ms-flex-align: end;
166+
align-items: flex-end;
167+
-webkit-box-flex: 1;
168+
-webkit-flex: 1;
169+
-ms-flex: 1;
170+
flex: 1;
171+
color: #f0f0f0;
172+
font-size: 26px;
173+
text-align: center;
174+
}
175+
176+
.footerbtn {
177+
display: -webkit-box;
178+
display: -webkit-flex;
179+
display: -ms-flexbox;
180+
display: flex;
181+
-webkit-box-pack: center;
182+
-webkit-justify-content: center;
183+
-ms-flex-pack: center;
184+
justify-content: center;
185+
-webkit-box-align: center;
186+
-webkit-align-items: center;
187+
-ms-flex-align: center;
188+
align-items: center;
189+
-webkit-align-self: center;
190+
-ms-flex-item-align: center;
191+
align-self: center;
192+
-webkit-box-flex: 1;
193+
-webkit-flex: 1;
194+
-ms-flex: 1;
195+
flex: 1;
196+
}
197+
198+
.textorange {
199+
color: #ffbf00;
200+
}
201+
202+
.textwrap {
203+
padding-bottom: 20px;
204+
}
205+
206+
.btn {
207+
padding: 12px 46px;
208+
background-color: #171717;
209+
color: #ededed;
210+
font-size: 21px;
211+
font-weight: 700;
212+
cursor:pointer;
213+
214+
border-color:#171717;
215+
border-width:2px;
216+
border-style:solid;
217+
218+
}
219+
220+
.btn:hover {
221+
background-color:#1B5B70;
222+
border-color:#109BC9;
223+
}
224+
225+
226+
227+
</style>
228+
</head>
229+
230+
<body>
231+
<div class="screen">
232+
<div class="pinpopup">
233+
<div class="popupheader">
234+
<div class="headertext">
235+
<div class="headertexttitle">
236+
<div>SIMKL account authorization</div>
237+
</div>
238+
</div>
239+
<div class="pin">
240+
<div class="pintext">YJTSKL</div>
241+
</div>
242+
</div>
243+
<div class="footer">
244+
<div class="footer-text">
245+
<div class="textwrap">Visit <span class="textorange">simkl.com/pin</span> on your smartphone or
246+
<br>computer and enter this code</div>
247+
</div>
248+
<div class="footerbtn">
249+
<div class="btn">Cancel</div>
250+
</div>
251+
</div>
252+
</div>
253+
</div>
254+
</body>
255+
</html>
791 KB
Loading

0 commit comments

Comments
 (0)