Update file_navigator.py

This commit is contained in:
Anthony Samms
2026-01-14 13:08:18 -05:00
parent 9c846b8b12
commit 0e8e616576

View File

@@ -1451,17 +1451,19 @@ class FileNavigator:
def process_osz(self, dir_path: Path): def process_osz(self, dir_path: Path):
dir_key = str(dir_path) dir_key = str(dir_path)
for file in dir_path.iterdir(): if dir_path.iterdir():
if file.name.endswith('.osu'): name = dir_path.name
with open(file, 'r', encoding='utf-8') as f: for file in dir_path.iterdir():
content = f.readlines() if file.name.endswith('.osu'):
for line in content: with open(file, 'r', encoding='utf-8') as f:
if line.startswith('TitleUnicode:'): content = f.readlines()
title_unicode = line.split(':', 1)[1].strip() for line in content:
name = title_unicode if line.startswith('TitleUnicode:'):
break title_unicode = line.split(':', 1)[1].strip()
else: name = title_unicode
name = dir_path.name if dir_path.name else str(dir_path) break
else:
name = dir_path.name if dir_path.name else str(dir_path)
box_texture = None box_texture = None
collection = None collection = None
back_color = None back_color = None