We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 960ca3b commit 51c692bCopy full SHA for 51c692b
view2webp.py
@@ -75,7 +75,7 @@ def unhashContent(hashKey, indexData):
75
picDict = {}
76
n = 1
77
for pic in picData:
78
- picName = os.path.basename(pic).replace('.jpg', '.jpg.view')
+ picName = os.path.basename(pic).replace('.png', '.png.view').replace('.jpg','.jpg.view')
79
picDict[picName] = str(n)+'.webp'
80
n = n+1
81
return picDict
@@ -106,7 +106,7 @@ def main():
106
else:
107
path = dirs[0]
108
fileList = [entry.path for entry in os.scandir(
109
- path) if entry.name.endswith("jpg.view")]
+ path) if entry.name.endswith(".view")]
110
filePath = sorted(fileList, key=lambda x: os.path.getmtime(x))
111
112
if os.path.exists(os.path.join(path, 'index.dat')):
0 commit comments