Apply suggestions from code review

Co-authored-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
catboxanon
2023-06-02 16:12:24 -04:00
committed by GitHub
parent 4cc0cede6d
commit 9009e25cb1
5 changed files with 13 additions and 7 deletions

View File

@@ -210,10 +210,12 @@ class ExtraNetworksPage:
"""
List of default keys used for sorting in the UI.
"""
pth = Path(path)
stat = pth.stat()
return {
"date_created": int(Path(path).stat().st_ctime or 0),
"date_modified": int(Path(path).stat().st_mtime or 0),
"name": Path(path).name.lower(),
"date_created": int(stat.st_ctime or 0),
"date_modified": int(stat.st_mtime or 0),
"name": pth.name.lower(),
}
def find_preview(self, path):