add automatic tnde score import

This commit is contained in:
Yonokid
2025-08-27 23:53:12 -04:00
parent 770d7f4036
commit ef4fa6de1e
3 changed files with 55 additions and 6 deletions

View File

@@ -33,12 +33,8 @@ class LoadScreen:
def _load_song_hashes(self):
"""Background thread function to load song hashes"""
try:
global_data.song_hashes = build_song_hashes()
self.songs_loaded = True
except Exception as e:
print(f"Error loading song hashes: {e}")
self.songs_loaded = True
global_data.song_hashes = build_song_hashes()
self.songs_loaded = True
def _load_navigator(self):
"""Background thread function to load navigator"""

View File

@@ -1503,6 +1503,10 @@ class FileSystemItem:
'段位道場': 13,
'DIFFICULTY': 14
}
GENRE_MAP_2 = {
'ボーカロイド': 3,
'バラエティ': 5
}
"""Base class for files and directories in the navigation system"""
def __init__(self, path: Path, name: str):
self.path = path
@@ -2003,6 +2007,8 @@ class FileNavigator:
if line.startswith("#GENRE:"):
genre = line.split(":", 1)[1].strip()
texture_index = FileSystemItem.GENRE_MAP.get(genre, 9)
if texture_index == 9:
texture_index = FileSystemItem.GENRE_MAP_2.get(genre, 9)
elif line.startswith("#TITLE:"):
name = line.split(":", 1)[1].strip()
elif line.startswith("#TITLEJA:"):