Commit 8ded080
committed
Fix RSS guid collisions and episode titles flagged by Codex review
Codex review on PR #828 found two real bugs and one real stability
issue in the guid/title logic just added:
- Episodes/seasons of the same show share the show's media_id, so the
old tmdb:<media_id> guid fallback collapsed every episode of an
un-enriched show onto one guid.
- Episode Item.title stores the episode's own name (e.g. "Pilot"), not
the show's title, so episode feed titles were unmatchable.
- Guid identity shifted when provider_external_ids gained an imdb_id
after the item was first published, making existing subscribers see
a "new" duplicate entry.
Replace the external-id-preference guid with one built from the item's
own immutable natural key (source:media_type:media_id[:sN[:eN]]) —
unique per episode and stable across metadata enrichment — and prefix
episode/season titles with the parent show's title via a small batched
lookup, mirroring the existing _attach_owner_media_statuses pattern.
Also codify PR monitoring as a repo default in AGENTS.md: proactively
watch any PR opened here to green and verify automated review comments
against the code before acting on them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B92VR5siWNQE2BjGGwbch81 parent f6fc056 commit 8ded080
3 files changed
Lines changed: 89 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
92 | 116 | | |
93 | 117 | | |
94 | 118 | | |
| |||
134 | 158 | | |
135 | 159 | | |
136 | 160 | | |
| 161 | + | |
137 | 162 | | |
138 | 163 | | |
139 | 164 | | |
140 | 165 | | |
141 | 166 | | |
142 | | - | |
| 167 | + | |
143 | 168 | | |
144 | 169 | | |
145 | 170 | | |
| |||
160 | 185 | | |
161 | 186 | | |
162 | 187 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
181 | 192 | | |
182 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
183 | 197 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 198 | + | |
187 | 199 | | |
188 | 200 | | |
189 | 201 | | |
190 | | - | |
| 202 | + | |
191 | 203 | | |
192 | 204 | | |
193 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3361 | 3361 | | |
3362 | 3362 | | |
3363 | 3363 | | |
3364 | | - | |
3365 | | - | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
3366 | 3372 | | |
3367 | | - | |
| 3373 | + | |
3368 | 3374 | | |
3369 | 3375 | | |
3370 | | - | |
| 3376 | + | |
3371 | 3377 | | |
3372 | 3378 | | |
3373 | 3379 | | |
| |||
3378 | 3384 | | |
3379 | 3385 | | |
3380 | 3386 | | |
| 3387 | + | |
3381 | 3388 | | |
3382 | | - | |
3383 | | - | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
3384 | 3419 | | |
3385 | 3420 | | |
3386 | 3421 | | |
| |||
3398 | 3433 | | |
3399 | 3434 | | |
3400 | 3435 | | |
3401 | | - | |
| 3436 | + | |
3402 | 3437 | | |
3403 | 3438 | | |
3404 | | - | |
3405 | | - | |
| 3439 | + | |
| 3440 | + | |
3406 | 3441 | | |
3407 | 3442 | | |
3408 | 3443 | | |
3409 | 3444 | | |
3410 | 3445 | | |
3411 | | - | |
3412 | | - | |
| 3446 | + | |
| 3447 | + | |
3413 | 3448 | | |
3414 | 3449 | | |
3415 | 3450 | | |
| |||
0 commit comments