Skip to content

Commit 51c692b

Browse files
authored
add png.view
fix #2
1 parent 960ca3b commit 51c692b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

view2webp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def unhashContent(hashKey, indexData):
7575
picDict = {}
7676
n = 1
7777
for pic in picData:
78-
picName = os.path.basename(pic).replace('.jpg', '.jpg.view')
78+
picName = os.path.basename(pic).replace('.png', '.png.view').replace('.jpg','.jpg.view')
7979
picDict[picName] = str(n)+'.webp'
8080
n = n+1
8181
return picDict
@@ -106,7 +106,7 @@ def main():
106106
else:
107107
path = dirs[0]
108108
fileList = [entry.path for entry in os.scandir(
109-
path) if entry.name.endswith("jpg.view")]
109+
path) if entry.name.endswith(".view")]
110110
filePath = sorted(fileList, key=lambda x: os.path.getmtime(x))
111111

112112
if os.path.exists(os.path.join(path, 'index.dat')):

0 commit comments

Comments
 (0)