{"id":37,"date":"2024-06-22T17:14:22","date_gmt":"2024-06-22T17:14:22","guid":{"rendered":"https:\/\/blogs.scummvm.org\/chico\/?p=37"},"modified":"2024-06-22T17:14:22","modified_gmt":"2024-06-22T17:14:22","slug":"week4-implement","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/chico\/2024\/06\/22\/week4-implement\/","title":{"rendered":"Week4 &#8211; Implement"},"content":{"rendered":"<p>This week, I mainly focused on completing the automatic and manual merging of filesets. During my discussion with Sev, I realized that I had not fully understood the purpose and origin of the Megakey before, so I am documenting it here.<\/p>\n<p><strong>First, what is a Megakey:<\/strong><br \/>\nMegakey is a combined key, coming from the detection entry.<\/p>\n<p><strong>Why do we need a Megakey:<\/strong><br \/>\nThe purpose of the Megakey is to understand that we are dealing with the same detection entry. &#8220;You need this for updating the metadata in the DB since, over time, we will accumulate full sets, but still, we add game entries to the games on a regular basis.<\/p>\n<p>Also, we do occasional target renames, so we cannot use that for the Megakey either.&#8221;<\/p>\n<p><strong>Where does it come from:<\/strong><br \/>\nWhen you see that this is a detection set, then you need to compute the Megakey (on the Python side).<\/p>\n<p>For example:<br \/>\nFor any fileset, there should be a possibility to merge manually. So, let\u2019s say we change the language of an entry from en to en-us. This will create a new fileset with en-us because the Megakey is different, but a developer could go to the log, click on the fileset reference, and merge it.<\/p>\n<p>Or, say, a new file is added to the detection entry. The Megakey will not match, so you will again create a new entry, but the developer who made this change knows what they\u2019re doing and can go and merge manually.<\/p>\n<p>Additionally, I improved the query operations on the fileset page, as I mistakenly performed many redundant calculations before.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-38\" src=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000-300x65.jpg\" alt=\"\" width=\"706\" height=\"153\" srcset=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000-300x65.jpg 300w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000-1024x221.jpg 1024w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000-768x166.jpg 768w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000-1200x259.jpg 1200w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011000.jpg 1457w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/p>\n<p>I enhanced the comparison page during the merge process by highlighting the items with differences.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-41\" src=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011258-300x216.jpg\" alt=\"\" width=\"719\" height=\"518\" srcset=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011258-300x216.jpg 300w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/20240623011258.jpg 735w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>So far, both automatic and manual merging are functioning correctly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-39\" src=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2-300x115.png\" alt=\"\" width=\"697\" height=\"267\" srcset=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2-300x115.png 300w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2-1024x394.png 1024w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2-1536x591.png 1536w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2-1200x462.png 1200w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image-2.png 1650w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-40\" src=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-300x117.png\" alt=\"\" width=\"711\" height=\"277\" srcset=\"https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-300x117.png 300w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-1024x400.png 1024w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-768x300.png 768w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-1536x600.png 1536w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2-1200x468.png 1200w, https:\/\/blogs.scummvm.org\/chico\/wp-content\/uploads\/sites\/74\/2024\/06\/image1-2.png 1655w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, I mainly focused on completing the automatic and manual merging of filesets. During my discussion with Sev, I realized that I had not fully understood the purpose and origin of the Megakey before, so I am documenting it here. First, what is a Megakey: Megakey is a combined key, coming from the detection [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-cli"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/posts\/37\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/chico\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}