mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-13 07:05:12 +01:00
Only store 9 images
This commit is contained in:
parent
a167829510
commit
bb34cfd531
@ -447,7 +447,7 @@ class Peer:
|
||||
if entry.get_key() == self.screenshot_key:
|
||||
try:
|
||||
which = self.srv.next_image_nr
|
||||
self.srv.next_image_nr = (self.srv.next_image_nr + 1) % 12
|
||||
self.srv.next_image_nr = (self.srv.next_image_nr + 1) % 9
|
||||
f = open("%s%d.png" % (self.srv.image_dir, which), "w")
|
||||
f.write(entry.get_data())
|
||||
f.close()
|
||||
@ -583,7 +583,7 @@ class Broker(SocketServer.UDPServer):
|
||||
self.image_dir = image_dir
|
||||
|
||||
self.data_key = DATA_KEY_RANGE
|
||||
self.next_image_nr = random.randrange(0,12)
|
||||
self.next_image_nr = random.randrange(0,9)
|
||||
|
||||
stats.load(self.stat_data)
|
||||
try:
|
||||
|
@ -66,7 +66,7 @@ class HtmlGenerator:
|
||||
images = ""
|
||||
if cnt % 4 == 0:
|
||||
cur = cnt
|
||||
images = "<TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH><TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH><TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH><TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH>" % (cur, cur + 1, cur + 2, cur + 3)
|
||||
images = "<TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH><TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH><TH ROWSPAN=4><IMG SRC=\"images/%d.png\"></TH>" % (cur, cur + 1, cur + 2)
|
||||
outf.write("<TR><TD>%s</TD><TD> </TD>%s</TR>\n" % (item, images) )
|
||||
cnt = cnt + 1
|
||||
outf.write("<TR><TD> </TD></TR>")
|
||||
|
Loading…
Reference in New Issue
Block a user