Skip to content

Commit 58ca9fd

Browse files
authored
Merge pull request #6 from Lurking987/Lurking987-hot-or-not-refactor-draft-v2
Hot or Not Refactor draft v2
2 parents 5aa9abc + a1dc38f commit 58ca9fd

25 files changed

Lines changed: 8214 additions & 0 deletions

plugins/hot_or_not/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/

plugins/hot_or_not/README.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# HotOrNot Plugin
2+
3+
An ELO-based ranking system for performers in [Stash](https://stashapp.cc/). Compare performers head-to-head in an interactive battle interface to build personalized rankings based on your preferences.
4+
5+
## Features
6+
7+
### Battle Modes
8+
9+
The plugin offers three distinct comparison modes:
10+
11+
#### 🎯 Swiss Mode (Default)
12+
- **True ELO with zero-sum property** - Winner gains exactly what loser loses, maintaining rating pool integrity
13+
- Pairs performers with similar ratings for competitive matchups
14+
- Uses weighted random selection to prioritize performers with fewer matches
15+
- Best for building initial rankings and ensuring balanced coverage
16+
17+
#### 🏆 Gauntlet Mode
18+
- **King of the hill style** - One performer stays on as champion while challengers attempt to dethrone them
19+
- Champion works their way up the rankings by defeating increasingly difficult opponents
20+
- Only the active participant (champion) has their rating change
21+
- When the champion loses, they "fall" to find their appropriate position
22+
- Visual streak tracking shows how many wins the current champion has
23+
- Great for quickly identifying top performers
24+
25+
#### 👑 Champion Mode
26+
- **Winner stays on** with reduced rating impact (50% of Swiss mode)
27+
- Both performers get rating updates, but at a slower pace
28+
- Maintains the "winner stays on" excitement while still evolving rankings
29+
- Good for fine-tuning existing rankings
30+
31+
### ELO Rating System
32+
33+
- **Adaptive K-factor** based on:
34+
- Match count (new performers have higher K-factor for faster initial placement)
35+
- Scene count (prolific performers have more stable ratings)
36+
- Current rating distance from default
37+
- **Diminishing returns** at high ratings (harder to reach 100)
38+
- **Skip as draw** - Skipping applies ELO draw mechanics (higher-rated performer loses points to lower-rated)
39+
40+
### Comprehensive Statistics
41+
42+
Each performer tracks:
43+
- Total matches played
44+
- Wins, losses, and draws
45+
- Current streak (positive = winning, negative = losing)
46+
- Best and worst streaks ever
47+
- Last match timestamp
48+
49+
Access the **Stats Modal** to view:
50+
- Rating distribution bar chart (grouped by rating ranges)
51+
- Full leaderboard with all performers
52+
- Win rates and streak information
53+
54+
### URL Filter Support
55+
56+
Respects the current page's filter criteria when launched from a filtered performers page:
57+
- Gender filters
58+
- Tag filters
59+
- Studio filters
60+
- Rating filters
61+
- Favorites filter
62+
- Age, ethnicity, country filters
63+
- And many more...
64+
65+
### User Interface
66+
67+
- **Floating action button** on performer pages to launch the comparison modal
68+
- **Battle rank badge** on individual performer pages showing their rank position (e.g., "#5 of 100")
69+
- **Side-by-side comparison** with performer images and metadata
70+
- **Visual feedback** showing rating changes after each choice
71+
- **Keyboard shortcuts**: Left Arrow (choose left), Right Arrow (choose right), Escape (close)
72+
- **Responsive design** that works on desktop and mobile
73+
74+
### Battle Rank Badge
75+
76+
When viewing a single performer's page, a badge displays their battle rank:
77+
- Shows rank position and total performers (e.g., "Battle Rank #5 of 100")
78+
- Tier-based styling: 👑 Legendary (top 5%), 🥇 Gold (top 20%), 🥈 Silver (top 40%), 🥉 Bronze (top 60%), 🔥 Default
79+
- Hover for tooltip showing exact rating
80+
- Toggle on/off via **Settings → Plugins → HotOrNot → Show Battle Rank Badge** (enabled by default)
81+
82+
## Installation
83+
84+
1. Download the `/plugins/hotornot/` folder to your Stash plugins directory
85+
2. Reload plugins in Stash (Settings → Plugins → Reload)
86+
3. Navigate to the Performers page to see the floating HotOrNot button
87+
88+
## Usage
89+
90+
1. Go to the Performers page in Stash
91+
2. Optionally apply filters to narrow down the performer pool
92+
3. Click the floating HotOrNot button (🔥) in the bottom-right corner
93+
4. Select your preferred battle mode
94+
5. Click on a performer or their "Choose" button to select the winner
95+
6. Continue rating until you're satisfied with your rankings
96+
97+
### Tips
98+
99+
- **First run**: Swiss mode with many comparisons builds a solid ranking foundation
100+
- **Quick ranking**: Gauntlet mode rapidly identifies your top performers
101+
- **Fine-tuning**: Champion mode adjusts rankings with smaller changes
102+
- **Skip strategically**: Use skip when you can't decide - it affects both performers' ratings based on ELO draw mechanics
103+
104+
## Custom Fields
105+
106+
The plugin stores match statistics in a custom field called `hotornot_stats` containing:
107+
```json
108+
{
109+
"total_matches": 42,
110+
"wins": 25,
111+
"losses": 15,
112+
"draws": 2,
113+
"current_streak": 3,
114+
"best_streak": 8,
115+
"worst_streak": -4,
116+
"last_match": "2024-01-15T10:30:00.000Z"
117+
}
118+
```
119+
120+
## Requirements
121+
122+
- Stash v0.27 or later
123+
- Performers must have images for best experience (performers without images are excluded by default)
124+
125+
## Technical Details
126+
127+
### Rating Scale
128+
- Ratings are stored as `rating100` (0-100 scale)
129+
- Displayed as 0.0-10.0 in the UI
130+
- Default rating for unrated performers: 50 (5.0)
131+
132+
### K-Factor Calculation
133+
| Match Count | Base K-Factor |
134+
|-------------|---------------|
135+
| 0-9 matches | 16 |
136+
| 10-29 matches | 12 |
137+
| 30+ matches | 8 |
138+
139+
Scene count multipliers further reduce K-factor for established performers.
140+
141+
### Default Filters
142+
When no URL filters are applied, the plugin automatically:
143+
- Excludes male performers
144+
- Excludes performers without images
145+
146+
## License
147+
148+
See [LICENCE](../../LICENCE) for details.

0 commit comments

Comments
 (0)