forked from Hay1tsme/artemis
chuni: fix encrypted hash, update unlock challenge req
This commit is contained in:
@ -60,8 +60,8 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
"length": len(game_course_level_list),
|
||||
"gameCourseLevelList": game_course_level_list,
|
||||
}
|
||||
|
||||
async def handle_get_game_uc_condition_api_request(self, data: Dict) -> Dict:
|
||||
|
||||
async def handle_get_game_u_c_condition_api_request(self, data: Dict) -> Dict:
|
||||
unlock_challenges = await self.data.static.get_unlock_challenges(self.version)
|
||||
game_unlock_challenge_condition_list = []
|
||||
|
||||
@ -84,8 +84,8 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
unlock_condition = conditions.get(
|
||||
unlock_challenge_id,
|
||||
{
|
||||
"type": 3, # always unlocked
|
||||
"conditionId": 0,
|
||||
"type": MapAreaConditionType.ALWAYS_UNLOCKED.value, # always unlocked
|
||||
"conditionId": -1,
|
||||
},
|
||||
)
|
||||
|
||||
@ -114,7 +114,7 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
"gameUnlockChallengeConditionList": game_unlock_challenge_condition_list,
|
||||
}
|
||||
|
||||
async def handle_get_user_uc_api_request(self, data: Dict) -> Dict:
|
||||
async def handle_get_user_u_c_api_request(self, data: Dict) -> Dict:
|
||||
user_id = data["userId"]
|
||||
|
||||
user_unlock_challenges = await self.data.item.get_unlock_challenges(
|
||||
@ -167,7 +167,9 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
|
||||
# try adding recommendations in order of: title → artist → genre
|
||||
for field in ("title", "artist", "genre"):
|
||||
await self._add_recommendations(field, user_rec_music_set, music_info_list, rec_limit)
|
||||
await self._add_recommendations(
|
||||
field, user_rec_music_set, music_info_list, rec_limit
|
||||
)
|
||||
if len(user_rec_music_set) >= rec_limit:
|
||||
break
|
||||
|
||||
@ -220,9 +222,7 @@ class ChuniVerse(ChuniLuminousPlus):
|
||||
excluding music IDs already in the user's recent ratings and recommendations.
|
||||
"""
|
||||
# Collect all existing songId to exclude from recommendations
|
||||
existing_music_ids = {
|
||||
info["songId"] for info in music_info_list
|
||||
}
|
||||
existing_music_ids = {info["songId"] for info in music_info_list}
|
||||
|
||||
for music_info in music_info_list:
|
||||
if len(user_rec_music_set) >= limit:
|
||||
|
Reference in New Issue
Block a user