Add wrong download repair option
Magent CI/CD / verify (push) Successful in 10m31s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 22s

This commit is contained in:
2026-09-01 22:42:07 +12:00
parent 0b59289a2e
commit 32bfa20ab7
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -71,6 +71,7 @@ PORTAL_ISSUE_TYPES = {
"transcode",
"service_unavailable",
"broken_media",
"wrong_content",
"audio",
"subtitle",
"quality",
+14
View File
@@ -118,6 +118,7 @@ type DiscoveryResult = {
type IssueCategoryId =
| 'broken_media'
| 'wrong_content'
| 'missing_content'
| 'audio'
| 'subtitle'
@@ -200,6 +201,15 @@ const ISSUE_CATEGORIES: Array<{
issueType: 'broken_media',
titlePrefix: 'Replace media',
},
{
id: 'wrong_content',
marker: 'WRONG FILE',
label: 'Wrong thing downloaded',
description: 'The movie, episode, cut, or edition does not match what it should be.',
outcome: 'The incorrectly matched file will be replaced automatically.',
issueType: 'wrong_content',
titlePrefix: 'Wrong download',
},
{
id: 'missing_content',
marker: 'MISSING',
@@ -249,6 +259,7 @@ const ISSUE_CATEGORIES: Array<{
const ISSUE_SYMPTOMS: Record<IssueCategoryId, string[]> = {
broken_media: ['Visual artefacts or corruption', 'Freezes at the same point', 'Stops before the end', 'File will not play'],
wrong_content: ['Different movie or show', 'Wrong episode', 'Episodes are labelled incorrectly', 'Wrong cut or edition'],
missing_content: ['Entire title is missing', 'Season is missing', 'Episode is missing', 'Part or edition is missing'],
audio: ['No audio', 'Wrong language', 'Commentary track only', 'Audio is out of sync', 'Audio is distorted'],
subtitle: ['Subtitles are missing', 'Wrong subtitles', 'Subtitles are out of sync', 'Forced subtitles are missing'],
@@ -264,6 +275,7 @@ const ISSUE_TYPE_LABELS: Record<string, string> = {
transcode: 'Transcoding',
service_unavailable: 'Server unavailable',
broken_media: 'Broken media',
wrong_content: 'Wrong download',
missing_content: 'Missing content',
audio: 'Audio',
subtitle: 'Subtitles',
@@ -502,11 +514,13 @@ export default function PortalClient({ workspace }: PortalClientProps) {
const issueNeedsMediaTitle = Boolean(issueCategory)
const issueRequiresExistingFile =
issueCategory === 'broken_media' ||
issueCategory === 'wrong_content' ||
issueCategory === 'audio' ||
issueCategory === 'subtitle' ||
issueCategory === 'playback'
const issueSupportsReplacement =
issueCategory === 'broken_media' ||
issueCategory === 'wrong_content' ||
issueCategory === 'audio' ||
(issueCategory === 'playback' && mediaServerStatus?.status !== 'down')
const selectedEpisodeOptions = (issueOptions?.episodes ?? []).filter((episode) =>