Skip to content

INTEGRITY: Continuing set.dat's processing #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jul 18, 2025

Conversation

ShivangNagta
Copy link

No description provided.

@ShivangNagta ShivangNagta changed the title Continuing set.dat's processing INTEGRITY: Continuing set.dat's processing Jul 4, 2025
@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from 93d01e2 to 1fee585 Compare July 7, 2025 17:42
@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from 094d152 to 898ffd0 Compare July 10, 2025 11:03
Copy link

@rvanlaar rvanlaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have less and less feedback, good job.

Parameterize all your sql queries, and limit the line length :-)

db_functions.py Outdated
@@ -144,7 +163,7 @@ def insert_fileset(
return (existing_entry, True)

# $game and $key should not be parsed as a mysql string, hence no quotes
query = f"INSERT INTO fileset (game, status, src, `key`, megakey, `timestamp`) VALUES ({game}, '{status}', '{src}', {key}, {megakey}, FROM_UNIXTIME(@fileset_time_last))"
query = f"INSERT INTO fileset (game, status, src, `key`, megakey, `timestamp`, set_dat_metadata) VALUES ({game}, '{status}', '{src}', {key}, {megakey}, FROM_UNIXTIME(@fileset_time_last), '{escape_string(set_dat_metadata)}')"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said before, use parameterized queries and don't let the lines get too long.
Where's the formatter?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I do use parameterized queries whenever I write a new one. I'll definitely fix the older ones one day. Though I did run the formatter on this file.

db_functions.py Outdated
cursor.execute(
"SELECT status FROM fileset WHERE id = %s", (matched_fileset_id,)
)
status = cursor.fetchone()["status"]
if status == "detection":
update_fileset_status(cursor, matched_fileset_id, "partial")
update_fileset_status(cursor, matched_fileset_id, "parital")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be partial? not parital?

@ShivangNagta
Copy link
Author

Hi, I have less and less feedback, good job.

Parameterize all your sql queries, and limit the line length :-)

Thank you, and yes, some of the older queries are still left to be parametrised.

@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from feab22d to a303645 Compare July 17, 2025 12:05
@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from 3ef16e8 to 26c4fe2 Compare July 17, 2025 16:36
@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from 26c4fe2 to 57df340 Compare July 17, 2025 17:44
@ShivangNagta ShivangNagta force-pushed the integrity_gsoc_2025_2 branch from 0d7698a to d1e8466 Compare July 17, 2025 23:07
@rvanlaar
Copy link

Looks fine. Green light from me.

@sev-
Copy link
Member

sev- commented Jul 18, 2025

Merging, thank you!

@sev- sev- merged commit 3ac672a into scummvm:integrity Jul 18, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants