mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
Update file_navigator.py
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user