Add wrong download repair option
This commit is contained in:
@@ -71,6 +71,7 @@ PORTAL_ISSUE_TYPES = {
|
|||||||
"transcode",
|
"transcode",
|
||||||
"service_unavailable",
|
"service_unavailable",
|
||||||
"broken_media",
|
"broken_media",
|
||||||
|
"wrong_content",
|
||||||
"audio",
|
"audio",
|
||||||
"subtitle",
|
"subtitle",
|
||||||
"quality",
|
"quality",
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ type DiscoveryResult = {
|
|||||||
|
|
||||||
type IssueCategoryId =
|
type IssueCategoryId =
|
||||||
| 'broken_media'
|
| 'broken_media'
|
||||||
|
| 'wrong_content'
|
||||||
| 'missing_content'
|
| 'missing_content'
|
||||||
| 'audio'
|
| 'audio'
|
||||||
| 'subtitle'
|
| 'subtitle'
|
||||||
@@ -200,6 +201,15 @@ const ISSUE_CATEGORIES: Array<{
|
|||||||
issueType: 'broken_media',
|
issueType: 'broken_media',
|
||||||
titlePrefix: 'Replace 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',
|
id: 'missing_content',
|
||||||
marker: 'MISSING',
|
marker: 'MISSING',
|
||||||
@@ -249,6 +259,7 @@ const ISSUE_CATEGORIES: Array<{
|
|||||||
|
|
||||||
const ISSUE_SYMPTOMS: Record<IssueCategoryId, string[]> = {
|
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'],
|
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'],
|
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'],
|
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'],
|
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',
|
transcode: 'Transcoding',
|
||||||
service_unavailable: 'Server unavailable',
|
service_unavailable: 'Server unavailable',
|
||||||
broken_media: 'Broken media',
|
broken_media: 'Broken media',
|
||||||
|
wrong_content: 'Wrong download',
|
||||||
missing_content: 'Missing content',
|
missing_content: 'Missing content',
|
||||||
audio: 'Audio',
|
audio: 'Audio',
|
||||||
subtitle: 'Subtitles',
|
subtitle: 'Subtitles',
|
||||||
@@ -502,11 +514,13 @@ export default function PortalClient({ workspace }: PortalClientProps) {
|
|||||||
const issueNeedsMediaTitle = Boolean(issueCategory)
|
const issueNeedsMediaTitle = Boolean(issueCategory)
|
||||||
const issueRequiresExistingFile =
|
const issueRequiresExistingFile =
|
||||||
issueCategory === 'broken_media' ||
|
issueCategory === 'broken_media' ||
|
||||||
|
issueCategory === 'wrong_content' ||
|
||||||
issueCategory === 'audio' ||
|
issueCategory === 'audio' ||
|
||||||
issueCategory === 'subtitle' ||
|
issueCategory === 'subtitle' ||
|
||||||
issueCategory === 'playback'
|
issueCategory === 'playback'
|
||||||
const issueSupportsReplacement =
|
const issueSupportsReplacement =
|
||||||
issueCategory === 'broken_media' ||
|
issueCategory === 'broken_media' ||
|
||||||
|
issueCategory === 'wrong_content' ||
|
||||||
issueCategory === 'audio' ||
|
issueCategory === 'audio' ||
|
||||||
(issueCategory === 'playback' && mediaServerStatus?.status !== 'down')
|
(issueCategory === 'playback' && mediaServerStatus?.status !== 'down')
|
||||||
const selectedEpisodeOptions = (issueOptions?.episodes ?? []).filter((episode) =>
|
const selectedEpisodeOptions = (issueOptions?.episodes ?? []).filter((episode) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user