mirror of
https://github.com/rakuri255/UltraSinger.git
synced 2026-12-02 01:48:10 +09:00
Refactoring
This commit is contained in:
1 parent
5b5e644fe0
commit
849d5b3fb7
24 files changed
+736
-638
No files matched your search
@@ -18,9 +18,9 @@ class ProcessDataPaths:
|
||||
@dataclass
|
||||
class MediaInfo:
|
||||
"""Media Info"""
|
||||
title: Optional[str] = None
|
||||
artist: Optional[str] = None
|
||||
bpm: Optional[float] = None
|
||||
title: str
|
||||
artist: str
|
||||
bpm: float
|
||||
year: Optional[str] = None
|
||||
genre: Optional[str] = None
|
||||
language: Optional[str] = None
|
||||
@@ -42,14 +42,16 @@ def from_ultrastar_txt(ultrastar_txt: UltrastarTxtValue) -> ProcessData:
|
||||
"""Converts an Ultrastar txt to ProcessData"""
|
||||
process_data = ProcessData()
|
||||
process_data.parsed_file = ultrastar_txt
|
||||
# todo: is this the real bpm? or calculate it from file?
|
||||
real_bpm = ultrastar_converter.ultrastar_bpm_to_real_bpm(float(ultrastar_txt.bpm.replace(",", ".")))
|
||||
process_data.media_info = MediaInfo(
|
||||
title=ultrastar_txt.title,
|
||||
artist=ultrastar_txt.artist,
|
||||
year=ultrastar_txt.year,
|
||||
genre=ultrastar_txt.genre,
|
||||
language=ultrastar_txt.language
|
||||
language=ultrastar_txt.language,
|
||||
bpm=real_bpm
|
||||
)
|
||||
process_data.media_info.bpm = ultrastar_converter.ultrastar_bpm_to_real_bpm(float(ultrastar_txt.bpm.replace(",", ".")))
|
||||
process_data.midi_segments = ultrastar_converter.ultrastar_to_midi_segments(ultrastar_txt)
|
||||
|
||||
return process_data
|
||||
Reference in new issue
Block a user