Skip to content

Commit

Permalink
keep full name, display name with f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
villares committed Oct 13, 2023
1 parent 620f5c8 commit d35c321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin_scripts/folder_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def draw_browser():
rw = rh = coll_w - margin * 2
name, fp, is_valid_img = files[i]
if len(name) > 25:
name = name[:15] + '…' + name[-8:]
name = f'{name[:15]}{name[-8:]}'
thumb = None
# skipping first element, get thumb dims, if possible
if i != 0 and (thumb := get_picture(fp)):
Expand Down Expand Up @@ -174,7 +174,7 @@ def update_files(folder, sort_key=None):
def list_files(folder, sort_key=None):
try:
items = [
[fp.name[:30], fp, valid_image(fp)]
[fp.name, fp, valid_image(fp)]
for fp in sorted(Path(folder).iterdir(), key=sort_key)
if fp.name[0] != '.' or hidden_files
]
Expand Down

0 comments on commit d35c321

Please sign in to comment.