HotOrNot_V3

Here is the PR:

Between this and the major work I did on the SFW plugin the other day im going to take a break for a bit but this release should be pretty fucking solid.

Screenshots

Click to expand

Release Notes

Click to expand

New feature

Performer Ledger (Past Matchups)

I have created and added a performer ledger to the custom fields value of each performer page. To get the best use out of this feature it is meant to be used with the Hot or Not Match history add-on. I will definitely aggregate these in the future, but for now they are separate

What it does

  • Tracks the last 10 performer match ups and their results
  • Color coded for visually distinct win\Losses
  • Each performer match up result is linked to the performer
  • Logic included to handle undo feature

Notes: This is a pretty cool feature and Im excited to put it out there. I tested it quite extensively but it is possible there could be bugs or race conditions I didnt catch. However I did spend a CONSIDERABLE amount of time tuning this and making sure the logic is always reporting the results correctly from the different modules. My main concern is gauntlet mode which took me hours to fully fix and integrate, but it should be stable.

Bug Fixes

Keep in mind this is my first pass on this. There’s still plenty to do. I spent alot of time on this. An ungodly amount. Close to 8 hours across a few days. So im probably going to take a break for a bit as this and SFW plugin took alot out of me, but I will be available for immediate bug fixes. Shoutout to lowgrade for getting the ball going on this. He did a great job of laying a very solid foundation and a fantastic plugin.

Updated math-utils

  • Updated undo logic to include ledger
  • added ledger (limited to 10 matches)
  • Added Undo function to ledger.
  • Adjusted recency performer for ‘weight =’ to .5 to ease the selection of new challengers
    • This logic is also modified as the original would cause the same performers to be shown in batches. For example if you rated performers during a certain time in the day everyday, you are likely to see the same performers
  • Added missing updateImageRating function
  • Use a count query to see how many performers have a higher rating than the current one. This renders performer matchups in the backend much faster.
  • Undo happens in one request vs 2 now
    • If you match Performer A vs B, then quickly Undo, you are guaranteed to restore exactly what was there 5 seconds ago, regardless of any other background tasks Stash might be doing. The reduced call is also a performance increase and less load on your stash DB.
  • Added task to wipe performer custom fields (Hot or not Match History Add-on)
    • WARNING: THIS IS ALPHA!! IT WILL WIPE ALL PERFORMER CUSTOM FIELD DATA. It needs to be more targeted but if you dont have custom field data it’ll work without issue and will wipe ONLY performer custom field data. If you dont trust me back up the DB.

Ui-modal.js + ui dashboard

  • Added escape key function to exit plugin
  • Arrow key functions now locked to modal
    • This also improves performance and responsiveness for the application
  • Updated text formatting surrounding keys to be centered. Now displays correctly
    • By proxy this fixed a few visual errors between card image size discrepancies
  • Updated icon to balance scale, maintains theme of original stash icons.

Updated api-client.js

  • Changes were made to mostly handleComparison for better state and performer win\loss reporting to integrate with the ledger but also to correct logic how these values were being handled by the plugin. Due to inconsistencies with how states were carried null and unknown values were being reported due to malformed data or making the wrong function call.

Match-Handler.js

  • Minor logic adjustments regarding performer win\loss state

Hot Or Not CSS

  • Removed styling for gauntlet mode selection post fork to V3 (took way too long to fix this)
    • Selection now matches the UI of the rest of the plugin and is scaled correctly without UI errors such as no breathing, overlap, and overly scaled\sized images.

Regarding future updates:

I’d very much appreciate if anyone decides to prod an update to include a changelog with reasoning\intent so we can correctly maintain and verify going forward.

1 Like