Skip to content

Commit

Permalink
Feat: Support for providing Card_Max_Voices_Count (#5)
Browse files Browse the repository at this point in the history
* feat: Support for providing `Card_Max_Voices_Count`

* doc: README.md
  • Loading branch information
GuangChen2333 authored Jan 1, 2025
1 parent 5f7caf9 commit ad48e2a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 20 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# FindUrVoicesPJSK
《世界计划 : 缤纷舞台》角色单独语音一键获取小工具, 基于 Sekai-World 数据库 | A simple tool for getting voices of single character of Project Sekai: Colorful Stage feat. Hatsune Miku based on Sekai-World's database
《世界计划 : 缤纷舞台》单角色语音数据集一键获取小工具, 基于 Sekai-World 数据库 | A simple tool for obtaining the voice datasets of a single character of the Project Sekai: Colorful Stage feat. Hatsune Miku, based on the Sekai-World database。

## 如何使用 Using
[这里](https://github.com/GuangChen2333/FindUrVoicesPJSK/releases/latest)下载二进制文件并执行即可,非常简单。

## 支持的下载内容 Supported content
- 独唱 Solo songs
- 纯音频 Pure voices
- 角色资料音频 Profile voices
- 角色卡片音频 Card voices
29 changes: 21 additions & 8 deletions app/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def download_character_profile_voices(self, character_id: int) -> None:
0
)

def download_character_cards_voices(self, character_id: int) -> None:
def download_character_cards_voices(self, character_id: int, card_voices_count: int) -> None:
# Code C0000
save_path = self._check_dataset_folder(character_id)

Expand Down Expand Up @@ -228,16 +228,20 @@ def download_character_cards_voices(self, character_id: int) -> None:
logger.warning("Get status code 404, perhaps the resource is not exist.")
return

if index_return == (card_voices_count + 1):
logger.success(f"Done with max_count: {card_voices_count}")
return

index = index_return

def download_all(self, character_id: int) -> None:
def download_all(self, character_id: int, card_voices_count: int) -> None:
self.download_solo_songs(character_id)
self.download_character_profile_voices(character_id)
self.download_character_cards_voices(character_id)
self.download_character_cards_voices(character_id, card_voices_count)

def download_pure_voices(self, character_id: int) -> None:
def download_pure_voices(self, character_id: int, card_voices_count: int) -> None:
self.download_character_profile_voices(character_id)
self.download_character_cards_voices(character_id)
self.download_character_cards_voices(character_id, card_voices_count)

def start(self):
mode = questionary.select(
Expand All @@ -254,12 +258,21 @@ def start(self):
character_id = self.select_character()

if mode == 0:
self.download_all(character_id)
card_voices_count = int(
questionary.text("Please input the card max voices count: ", default="800").ask()
)
self.download_all(character_id, card_voices_count)
elif mode == 1:
self.download_pure_voices(character_id)
card_voices_count = int(
questionary.text("Please input the card max voices count: ", default="800").ask()
)
self.download_pure_voices(character_id, card_voices_count)
elif mode == 2:
self.download_solo_songs(character_id)
elif mode == 3:
self.download_character_profile_voices(character_id)
elif mode == 4:
self.download_character_cards_voices(character_id)
card_voices_count = int(
questionary.text("Please input the card max voices count: ", default="800").ask()
)
self.download_character_cards_voices(character_id, card_voices_count)
20 changes: 10 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "FindUrVoicesPJSK"
version = "1.1.0"
version = "1.2.0"
description = "A simple tool for getting voices of single character of Project Sekai: Colorful Stage feat. Hatsune Miku based on Sekai-World's database"
authors = ["GuangChen2333 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit ad48e2a

Please sign in to comment.