forked from Hay1tsme/artemis
IDAC: Improvements
- Fixed play stamp event name not shown - Fixed broken cars such as: LEVIN SR (AE85), SKYLINE 25GT TURBO (ER34), S2000 (AP1), GR SUPRA (DB42), SWIFT Sport (ZC33S), LANCER RS EVOLUTION Ⅴ (CP9A), LANCER GSR EVOLUTION Ⅵ TMEDITION (CP9A) - Fixed bunta/special mode not properly updating - Fixed frontend (for real this time)
This commit is contained in:
parent
8ccb7f08f2
commit
d55ada2538
@ -2,12 +2,13 @@ import os
|
|||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
|
||||||
def prepare_images(image_folder="./images"):
|
def prepare_images(image_folder="titles/idac/data/images"):
|
||||||
print(f"Preparing image delivery files in {image_folder}...")
|
print(f"Preparing image delivery files in {image_folder}...")
|
||||||
|
|
||||||
for file in os.listdir(image_folder):
|
for file in os.listdir(image_folder):
|
||||||
if file.endswith(".png") or file.endswith(".jpg"):
|
if file.endswith(".png") or file.endswith(".jpg"):
|
||||||
dpg_name = "adv-" + file[:-4].upper()
|
# dpg_name = "adv-" + file[:-4].upper()
|
||||||
|
dpg_name = file[:-4]
|
||||||
if file.endswith(".png"):
|
if file.endswith(".png"):
|
||||||
dpg_name += ".dpg"
|
dpg_name += ".dpg"
|
||||||
else:
|
else:
|
||||||
@ -22,10 +23,11 @@ def prepare_images(image_folder="./images"):
|
|||||||
original_image = original_image_file.read()
|
original_image = original_image_file.read()
|
||||||
image_hash = hashlib.md5(original_image).hexdigest()
|
image_hash = hashlib.md5(original_image).hexdigest()
|
||||||
print(
|
print(
|
||||||
f"DPG for {file} not found, creating with hash {image_hash}..."
|
f"DPG for {file} not found, creating with hash {image_hash.upper()} ..."
|
||||||
)
|
)
|
||||||
md5_buf = bytes.fromhex(image_hash)
|
md5_buf = bytes.fromhex(image_hash)
|
||||||
dpg_buf = md5_buf + original_image
|
dpg_buf = md5_buf + original_image
|
||||||
|
dpg_name = "adv-" + image_hash.upper() + dpg_name[:-4]
|
||||||
with open(os.path.join(image_folder, dpg_name), "wb") as dpg_file:
|
with open(os.path.join(image_folder, dpg_name), "wb") as dpg_file:
|
||||||
dpg_file.write(dpg_buf)
|
dpg_file.write(dpg_buf)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"m_stamp_event_id": 25,
|
"m_stamp_event_id": 25,
|
||||||
"stamp_event_nm": "*フランドール・スカーレットスタンプ",
|
"stamp_event_nm": "フランドール・スカーレットスタンプ",
|
||||||
"url": "https://info-initialdac.sega.jp/2290/",
|
"url": "https://info-initialdac.sega.jp/2290/",
|
||||||
"start_dt": "2023-10-01",
|
"start_dt": "2023-10-01",
|
||||||
"end_dt": "2029-01-01",
|
"end_dt": "2029-01-01",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"m_stamp_event_id": 24,
|
"m_stamp_event_id": 24,
|
||||||
"stamp_event_nm": "*レミリア・スカーレットスタンプ",
|
"stamp_event_nm": "レミリア・スカーレットスタンプ",
|
||||||
"url": "https://info-initialdac.sega.jp/2096/",
|
"url": "https://info-initialdac.sega.jp/2096/",
|
||||||
"start_dt": "2023-10-01",
|
"start_dt": "2023-10-01",
|
||||||
"end_dt": "2029-01-01",
|
"end_dt": "2029-01-01",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"m_stamp_event_id": 26,
|
"m_stamp_event_id": 26,
|
||||||
"stamp_event_nm": "*十六夜咲夜スタンプ",
|
"stamp_event_nm": "十六夜咲夜スタンプ",
|
||||||
"url": "https://info-initialdac.sega.jp/2306/",
|
"url": "https://info-initialdac.sega.jp/2306/",
|
||||||
"start_dt": "2023-10-01",
|
"start_dt": "2023-10-01",
|
||||||
"end_dt": "2029-01-01",
|
"end_dt": "2029-01-01",
|
||||||
|
@ -38,6 +38,12 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 12,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 259,
|
"style_car_id": 259,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -50,6 +56,12 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 264,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 265,
|
"style_car_id": 265,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -116,18 +128,6 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"style_car_id": 1285,
|
|
||||||
"release_status": 1,
|
|
||||||
"recommend": 0,
|
|
||||||
"new_status": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"style_car_id": 1286,
|
|
||||||
"release_status": 1,
|
|
||||||
"recommend": 0,
|
|
||||||
"new_status": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"style_car_id": 1536,
|
"style_car_id": 1536,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -152,6 +152,12 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 65538,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 65539,
|
"style_car_id": 65539,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -224,6 +230,12 @@
|
|||||||
"recommend": 1,
|
"recommend": 1,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 66051,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 66304,
|
"style_car_id": 66304,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -266,6 +278,24 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 66821,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 66822,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 67073,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 67328,
|
"style_car_id": 67328,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -422,6 +452,18 @@
|
|||||||
"recommend": 0,
|
"recommend": 0,
|
||||||
"new_status": 0
|
"new_status": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 132358,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"style_car_id": 132608,
|
||||||
|
"release_status": 1,
|
||||||
|
"recommend": 0,
|
||||||
|
"new_status": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"style_car_id": 132864,
|
"style_car_id": 132864,
|
||||||
"release_status": 1,
|
"release_status": 1,
|
||||||
@ -779,8 +821,7 @@
|
|||||||
"timerelease_chapter": 28
|
"timerelease_chapter": 28
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"annaunce_image": [
|
"annaunce_image": [],
|
||||||
],
|
|
||||||
"vs_balance_car": [
|
"vs_balance_car": [
|
||||||
{
|
{
|
||||||
"style_car_id": 0,
|
"style_car_id": 0,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="mb-3">頭文字D THE ARCADE</h1>
|
<h1 class="mb-3">頭文字D THE ARCADE</h1>
|
||||||
|
|
||||||
{% if sesh is defined and sesh["user_id"] > 0 %}
|
{% if sesh is defined and sesh["userId"] > 0 %}
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
@ -27,6 +27,8 @@
|
|||||||
<hr class="mt-0 mb-4">
|
<hr class="mt-0 mb-4">
|
||||||
<h6>Username</h6>
|
<h6>Username</h6>
|
||||||
<p class="text-muted">{{ profile.username }}</p>
|
<p class="text-muted">{{ profile.username }}</p>
|
||||||
|
<h6>Cash</h6>
|
||||||
|
<p class="text-muted">{{ profile.cash }} D</p>
|
||||||
<h6>Grade</h6>
|
<h6>Grade</h6>
|
||||||
<h4>
|
<h4>
|
||||||
{% set grade = rank.grade %}
|
{% set grade = rank.grade %}
|
||||||
@ -37,7 +39,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
Unknown
|
Unknown
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h6>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-md-6 mb-3">
|
<div class="col-lg-4 col-md-6 mb-3">
|
||||||
<h6>Mileage</h6>
|
<h6>Mileage</h6>
|
||||||
<p class="text-muted">{{ profile.mileage }} m</p>
|
<p class="text-muted">{{ profile.mileage / 1000}} km</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if tickets is defined and tickets|length > 0 %}
|
{% if tickets is defined and tickets|length > 0 %}
|
||||||
|
@ -619,19 +619,36 @@ class IDACItemData(BaseData):
|
|||||||
def get_best_challenges_by_vs_type(
|
def get_best_challenges_by_vs_type(
|
||||||
self, aime_id: int, story_type: int = 4
|
self, aime_id: int, story_type: int = 4
|
||||||
) -> Optional[List[Row]]:
|
) -> Optional[List[Row]]:
|
||||||
sql = (
|
subquery = (
|
||||||
select(
|
select(
|
||||||
challenge.c.story_type,
|
challenge.c.story_type,
|
||||||
|
challenge.c.user,
|
||||||
challenge.c.vs_type,
|
challenge.c.vs_type,
|
||||||
func.max(challenge.c.cleared_difficulty).label("max_clear_lv"),
|
|
||||||
func.max(challenge.c.play_difficulty).label("last_play_lv"),
|
func.max(challenge.c.play_difficulty).label("last_play_lv"),
|
||||||
challenge.c.course_id,
|
|
||||||
challenge.c.play_count,
|
|
||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
and_(challenge.c.user == aime_id, challenge.c.story_type == story_type)
|
and_(challenge.c.user == aime_id, challenge.c.story_type == story_type)
|
||||||
)
|
)
|
||||||
.group_by(challenge.c.vs_type, challenge.c.course_id, challenge.c.play_count)
|
.group_by(challenge.c.vs_type)
|
||||||
|
)
|
||||||
|
|
||||||
|
sql = (
|
||||||
|
select(
|
||||||
|
challenge.c.story_type,
|
||||||
|
challenge.c.vs_type,
|
||||||
|
challenge.c.cleared_difficulty.label("max_clear_lv"),
|
||||||
|
challenge.c.play_difficulty.label("last_play_lv"),
|
||||||
|
challenge.c.course_id,
|
||||||
|
challenge.c.play_count,
|
||||||
|
)
|
||||||
|
.where(
|
||||||
|
and_(
|
||||||
|
challenge.c.user == subquery.c.user,
|
||||||
|
challenge.c.vs_type == subquery.c.vs_type,
|
||||||
|
challenge.c.play_difficulty == subquery.c.last_play_lv,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.order_by(challenge.c.vs_type)
|
||||||
)
|
)
|
||||||
|
|
||||||
result = self.execute(sql)
|
result = self.execute(sql)
|
||||||
|
@ -146,9 +146,9 @@ class IDACSeason2(IDACBase):
|
|||||||
"round_event_exp": [],
|
"round_event_exp": [],
|
||||||
"stamp_info": self.stamp_info,
|
"stamp_info": self.stamp_info,
|
||||||
# 0 = use default data, 1+ = server version of timereleasedata response
|
# 0 = use default data, 1+ = server version of timereleasedata response
|
||||||
"timerelease_no": 1,
|
"timerelease_no": 2,
|
||||||
# 0 = use default data, 1+ = server version of gachadata response
|
# 0 = use default data, 1+ = server version of gachadata response
|
||||||
"timerelease_avatar_gacha_no": 1,
|
"timerelease_avatar_gacha_no": 2,
|
||||||
"takeover_reward": [],
|
"takeover_reward": [],
|
||||||
"subcard_judge": [
|
"subcard_judge": [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user