html.py: replace Windows backslashes in icon paths
This is one source of missing-image results. There remain other reasons for missing icons. The script doesn't find images in add-ons. And when resources are moved or renamed, they are no longer found by the script, even if they had been found before. Also, capitalize a sentence.
This commit is contained in:
parent
faf82bed92
commit
7ba550a63e
1 changed files with 2 additions and 1 deletions
|
@ -78,6 +78,7 @@ Select the add-on you want to install from the list and click "OK". The download
|
|||
icon = icon.strip()
|
||||
tilde = icon.find("~")
|
||||
if tilde >= 0: icon = icon[:tilde]
|
||||
if "\\" in icon: icon = icon.replace("\\", "/")
|
||||
try: os.mkdir(path + "/icons")
|
||||
except OSError: pass
|
||||
if "." not in icon: icon += ".png"
|
||||
|
@ -130,7 +131,7 @@ Usually comes with an era or is dependency of another add-on.</div></td>""")
|
|||
elif type == "media":
|
||||
w("""\
|
||||
<td>Resources<div class="type"><b>miscellaneous content/media</b><br/>
|
||||
unit packs, terrain packs, music packs, etc. Usually a (perhaps optional) dependency of another add-on.</div></td>""")
|
||||
Unit packs, terrain packs, music packs, etc. Usually a (perhaps optional) dependency of another add-on.</div></td>""")
|
||||
else: w(('<td>%s</td>') % type)
|
||||
w(('<td><img alt="%s" src="%s" width="72px" height="72px"/>'
|
||||
) % (icon, imgurl))
|
||||
|
|
Loading…
Add table
Reference in a new issue