-
Notifications
You must be signed in to change notification settings - Fork 1
/
retroscraper.kv
716 lines (707 loc) · 44.8 KB
/
retroscraper.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
#:kivy 2.0
<MainScreen>:
canvas.before:
Rectangle:
id: backimage
pos: self.pos
size: self.size
texture: app.image_source.texture
GridLayout:
size_hint: (1,1)
size: self.size
background_color: (0, 0, 0, 0)
cols : 1
orientation: 'lr-tb'
AsyncImage:
id: retroscraperimage
source: 'http://77.68.23.83/res/logo/retroscraper1.png'
size: self.texture_size
background_color: (0, 0, 0, 0)
size_hint_y: None
TabbedPanel:
do_default_tab: False
background_color: (0, 0, 0, 0)
tab_width: self.parent.width / 5
TabbedPanelItem:
id: tabone
text: 'Games'
font_name: 'sonic.ttf'
GridLayout:
size_hint: (1,1)
orientation: 'lr-tb'
cols: 1
GridLayout:
cols:2
size_hint:(1,0.25)
pos_hint: {'top': 1}
Label:
id: gamelabel
size_hint: (1,1)
text: ''
font_name: 'sonic.ttf'
font_size: 14
markup: True
valign: 'top'
outline_color: (0,0,0)
outline_width: 1
Image:
id: sysImageGame
color: 0, 0, 0, 0
size_hint: (1,1)
allow_stretch: False
GridLayout:
cols:2
size_hint:(1,1)
pos_hint: {'top': 1}
Label:
id: gamedesc
size_hint: (1.25,1)
size: self.size
halign: 'left'
#font_name: 'sonic.ttf'
font_size: 14
text_size: self.size
valign: 'top'
outline_color: (0,0,0)
outline_width: 1
Image:
color: 0, 0, 0, 0
id: gameimage
source: ''
size_hint: (0.75,1)
allow_stretch: True
pos_hint: {'top': 1}
TabbedPanelItem:
id: tabtwo
text: 'Systems'
font_name: 'sonic.ttf'
GridLayout:
size_hint: (1,1)
orientation: 'lr-tb'
cols: 1
Label:
id: availsysLabel
text: 'YOUR AVAILABLE SYSTEMS'
font_name: 'sonic.ttf'
size_hint: (1,0.3)
#valign: 'top'
outline_color: (0,0,0)
outline_width: 1
#pos_hint: {'top': 1}
GridLayout:
id: systemschoice
#pos_hint: {'top': 1}
orientation: 'lr-tb'
cols: 7
size_hint: (1,3)
#HSeparator:
Label:
id: sysLabel
size_hint: (1, 0.3)
text: 'System'
font_name: 'sonic.ttf'
font_size: 14
size: self.texture_size
outline_color: (0,0,0)
outline_width: 1
valign: 'bottom'
Image:
id: sysImage
color: 0, 0, 0, 0
size_hint: (1,3)
TabbedPanelItem:
id: tabthree
sysconfig: sysconfig.__self__
text: 'Configuration'
font_name: 'sonic.ttf'
GridLayout:
orientation: 'lr-tb'
cols: 1
#row_force_default:True
#row_default_height: 32
GridLayout:
cols: 1
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
Label:
id: preflanlabel
text:'Language preferences'
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 1
Spinner:
id: langchoice
font_name: 'sonic.ttf'
font_size: 14
outline_color: (0,0,0)
outline_width: 1
max_height: 30
on_text: root.selectLang()
HSeparator:
GridLayout:
cols: 1
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
Label:
id: pathpreflabel
text:'Paths Preferences'
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
sysconfig: sysconfig.__self__
cols: 3
Label:
id:filesyslabel
text: 'SYSTEMS FILE:'
font_name: 'sonic.ttf'
font_size: 14
#text_size: (200,32)
size: self.texture_size
size_hint: (.5,1)
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "right"
valign: "middle"
TextInput:
id: systemsfile
font_name: 'sonic.ttf'
font_size: 14
text: ''
Button:
id:sysconfig
font_name: 'sonic.ttf'
font_size: 14
text: 'Select File'
#background_normal: ''
on_press: root.show_load()
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 5
Label:
id:sysrompathlabel
text: 'systems rom path:'
font_name: 'sonic.ttf'
font_size: 14
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
text_size: self.size
halign: "right"
valign: "middle"
TextInput:
id:esrompath
text: ''
font_name: 'sonic.ttf'
font_size: 14
size: (400,32)
size_hint:(None,1)
Label:
id: maptopathlabel
text: 'Map to Path:'
font_name: 'sonic.ttf'
font_size: 14
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
text_size: self.size
halign: "right"
valign: "middle"
TextInput:
id:maptopath
text: ''
font_name: 'sonic.ttf'
font_size: 14
multiline: False
on_text_validate: root.update_map()
Button:
id:selrompath
font_name: 'sonic.ttf'
font_size: 14
text: "Select Directory"
on_release: root.show_dir_select()
HSeparator:
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 1
Label:
id: gamedecorlabel
size_hint:(1,1)
text:'game name decorators (taken from filename)'
font_name: 'sonic.ttf'
font_size: 14
outline_color: (0,0,0)
outline_width: 1
GridLayout:
cols: 8
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
CheckBox:
size:(32,0)
size_hint:(None,1)
id: versionmod
on_press:root.doDecorator('version')
Label:
id: versiondeclabel
text:'Add Version [Sonic V1.1]'
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
id: countrymod
size:(32,0)
size_hint:(None,1)
on_press:root.doDecorator('country')
Label:
id: countrydeclabel
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
text:'Add country [Sonic (USA)]'
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
id: hackmod
size:(32,0)
size_hint:(None,1)
on_press:root.doDecorator('hack')
Label:
id: hackdeclabel
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
text:'Add hack [Sonic (hack)]'
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
id: diskmod
size:(32,0)
size_hint:(None,1)
on_press:root.doDecorator('disk')
Label:
id: diskdeclabel
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
text:'Add Disk/Tape number decorators [Sonic (Disk 1/2)]'
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
text_size: self.size
halign: "left"
valign: "middle"
HSeparator:
GridLayout:
cols: 1
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
Label:
id: mediapreflabel
text:'Download Media Preferences'
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
id: preferbox
size:(32,0)
size_hint:(None,1)
on_press:root.doBoxes()
Label:
id: preferboxlabel
size_hint:(1,1)
font_name: 'sonic.ttf'
font_size: 14
text:'Download box game instead of screenshot'
outline_color: (0,0,0)
size: self.texture_size
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
id: novideodown
size:(32,0)
size_hint:(None,1)
on_press:root.doVideos()
Label:
id: novideodownlabel
size: self.texture_size
size_hint:(1,1)
font_name: 'sonic.ttf'
font_size: 14
text:'Do not download video'
outline_color: (0,0,0)
text_size: self.size
halign: "left"
valign: "middle"
outline_width: 1
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
size:(32,0)
size_hint:(None,1)
id: bezeldown
on_press:root.doBezels('game')
Label:
size_hint:(1,1)
size: self.texture_size
id: bezeldownlabel
font_name: 'sonic.ttf'
font_size: 14
text:'Download Game Bezels'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
size:(32,0)
size_hint:(None,1)
id: sysbezeldown
on_press:root.doBezels('system')
Label:
size: self.texture_size
size_hint:(1,1)
id: sysbezellabel
font_name: 'sonic.ttf'
font_size: 14
text:'Download system bezel if game bezel not present'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
HSeparator:
GridLayout:
cols: 1
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
Label:
id: otherpreflabel
text:'Other Preferences'
font_name: 'sonic.ttf'
font_size: 14
size_hint:(1,1)
outline_color: (0,0,0)
outline_width: 1
size: self.texture_size
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
size:(32,0)
size_hint:(None,1)
id: cleanmedia
on_press:root.doClean()
Label:
size_hint:(1,1)
id: cleanmedialabel
size: self.texture_size
font_name: 'sonic.ttf'
font_size: 14
text:'Clean media directories before downloading'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
size:(32,0)
size_hint:(None,1)
id: optimizemedia
#on_press:root.doCleanMedia('')
Label:
size_hint:(1,1)
size: self.texture_size
id: optimizemedialabel
font_name: 'sonic.ttf'
font_size: 14
text:'Optimize media by creating links (slow)'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
size:(32,0)
size_hint:(None,1)
id: usegoogle
on_press: root.toggleUseGoogle('bah')
Label:
size_hint:(1,1)
id:usegooglelab
size: self.texture_size
font_name: 'sonic.ttf'
font_size: 14
text:'Use google translate'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
size:(32,0)
size_hint:(None,1)
id: keepdata
on_press: root.toggleKeepData('bah')
Label:
size_hint:(1,1)
size: self.texture_size
id: keepdatalabel
font_name: 'sonic.ttf'
font_size: 14
text:'KEEP FAVORITES/PLAY COUNTS'
outline_color: (0,0,0)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
id: dobackup
on_press: root.toggleDoBackup('bah')
size:(32,0)
size_hint:(None,1)
Label:
id: backuplabel
size: self.texture_size
font_name: 'sonic.ttf'
font_size: 14
text:'DO NOT BACKUP GAMELIST FILE'
outline_color: (0,0,0)
size_hint:(1,1)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
size:(32,0)
size_hint:(None,1)
id: usedb
on_press: root.toggleUseDB('bah')
Label:
size_hint:(1,1)
size: self.texture_size
id:usedblabel
font_name: 'sonic.ttf'
font_size: 14
text:'Use local DB for hashes'
text_size: self.size
halign: "left"
valign: "middle"
outline_color: (0,0,0)
outline_width: 1
GridLayout:
orientation: 'lr-tb'
row_force_default:True
row_default_height: 32
cols: 4
CheckBox:
id: domissfile
on_press: root.toggleDomissfile('bah')
size:(32,0)
size_hint:(None,1)
Label:
id: domissfilelabel
size: self.texture_size
font_name: 'sonic.ttf'
font_size: 14
text:'CREATE MISSING LIST'
outline_color: (0,0,0)
size_hint:(1,1)
outline_width: 1
text_size: self.size
halign: "left"
valign: "middle"
CheckBox:
size:(32,0)
size_hint:(None,1)
id: downmissing
on_press: root.toggledownmissing('bah')
Label:
size_hint:(1,1)
size: self.texture_size
id:downmissinglabel
font_name: 'sonic.ttf'
font_size: 14
text:'Try to download missing files'
text_size: self.size
halign: "left"
valign: "middle"
outline_color: (0,0,0)
outline_width: 1
HSeparator:
TabbedPanelItem:
id: tabremote
text: 'Remote'
font_name: 'sonic.ttf'
ScrollView:
scroll_type: ['bars']
bar_width: 10
GridLayout:
id:tochange
size_hint_y:None
cols: 1
Button:
id: remoteScan
text: 'Look for remote systems'
font_name: 'sonic.ttf'
font_size: 14
on_release: root.remoteScan()
size_hint: 1,None
disabled: False
size: 25,25
TabbedPanelItem:
id: taberror
text: 'Errors'
font_name: 'sonic.ttf'
ScrollView:
scroll_type: ['bars']
bar_width: 10
GridLayout:
id:errorgrid
size_hint_y:None
cols: 1
GridLayout
cols : 1
orientation: 'lr-tb'
size:1200,20
size_hint:1,None
ProgressBar:
id: scrapPB
size_hint_x: 1
size_hint_y: None
height: 30
GridLayout
orientation: 'lr-tb'
cols: 2
size:1200,25
size_hint:1,None
Button:
id: startScraping
text: 'Waiting for proper configuration'
font_name: 'sonic.ttf'
font_size: 14
on_release: root.ScanToggle()
size_hint: 1,None
disabled: True
size: 25,25
<LoadDialog>:
BoxLayout:
id:loadroot
size: root.size
pos: root.pos
orientation: "vertical"
FileBrowser:
id: filechooser
#filters: ['*.cfg']
on_success: root.load(filechooser.path, filechooser.selection)
on_canceled: root.cancel()
<MyPopup>:
title_font: 'sonic.ttf'
title_size: 14
BoxLayout:
id: popupbox
size: root.size
pos: root.pos
orientation: 'vertical'
cols: 1
Label:
id: popuplabel
text: 'TEST LABEL'
font_name: 'sonic.ttf'
font_size: 12
size_hint_y: 0.5
text_size: self.width, None
height: self.texture_size[1]
Button:
id:okpopupbutton
font_name: 'sonic.ttf'
font_size: 14
text: 'Got It!'
on_release: root.cancel()
size_hint: (1,None)
size: (1,30)
<HSeparator@Widget>:
canvas:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
size_hint_y: None
height: dp(2)
<VSeparator@Widget>:
canvas:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: (parent.width,2)
size_hint_x: None
width: dp(2)
#<Widget>:
# canvas.after:
# Line:
# rectangle: self.x+1,self.y+1,self.width-1,self.height-1
# dash_offset: 5
# dash_length: 3