mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
add automatic tnde score import
This commit is contained in:
@@ -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"""
|
||||
|
||||
@@ -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:"):
|
||||
|
||||
Reference in New Issue
Block a user