From 67234222e39b7bbf0662f8391e9ab486ecefa1b7 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 14 Jul 2023 06:59:02 +0300 Subject: [PATCH] Fixed: Improve quality and episode info output in parse result --- frontend/src/Parse/ParseModalContent.tsx | 5 +- frontend/src/Parse/ParseResult.css | 20 +-- frontend/src/Parse/ParseResult.css.d.ts | 5 +- frontend/src/Parse/ParseResult.tsx | 179 ++++++++++---------- frontend/src/Parse/ParseToolbarButton.tsx | 3 +- src/NzbDrone.Core/Localization/Core/en.json | 38 ++++- 6 files changed, 137 insertions(+), 113 deletions(-) diff --git a/frontend/src/Parse/ParseModalContent.tsx b/frontend/src/Parse/ParseModalContent.tsx index 2e788cd35..cdff08376 100644 --- a/frontend/src/Parse/ParseModalContent.tsx +++ b/frontend/src/Parse/ParseModalContent.tsx @@ -11,6 +11,7 @@ import ModalHeader from 'Components/Modal/ModalHeader'; import { icons } from 'Helpers/Props'; import { clear, fetch } from 'Store/Actions/parseActions'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; +import translate from 'Utilities/String/translate'; import ParseResult from './ParseResult'; import parseStateSelector from './parseStateSelector'; import styles from './ParseModalContent.css'; @@ -58,7 +59,7 @@ function ParseModalContent(props: ParseModalContentProps) { return ( - Test Parsing + {translate('TestParsing')}
@@ -115,7 +116,7 @@ function ParseModalContent(props: ParseModalContentProps) { - + ); diff --git a/frontend/src/Parse/ParseResult.css b/frontend/src/Parse/ParseResult.css index d5de120fa..c49c4e3fa 100644 --- a/frontend/src/Parse/ParseResult.css +++ b/frontend/src/Parse/ParseResult.css @@ -1,20 +1,8 @@ -.item { +.container { display: flex; + flex-wrap: wrap; } -.title { - margin-right: 20px; - width: 250px; - text-align: right; - font-weight: bold; -} - -.description { - /* composes: description from '~Components/DescriptionList/DescriptionListItemTitle.css'; */ -} - -@media (max-width: $breakpointSmall) { - .item { - display: block; - } +.column { + flex: 0 0 50%; } diff --git a/frontend/src/Parse/ParseResult.css.d.ts b/frontend/src/Parse/ParseResult.css.d.ts index 13942714e..653368e06 100644 --- a/frontend/src/Parse/ParseResult.css.d.ts +++ b/frontend/src/Parse/ParseResult.css.d.ts @@ -1,9 +1,8 @@ // This file is automatically generated. // Please do not change this file! interface CssExports { - 'description': string; - 'item': string; - 'title': string; + 'column': string; + 'container': string; } export const cssExports: CssExports; export default cssExports; diff --git a/frontend/src/Parse/ParseResult.tsx b/frontend/src/Parse/ParseResult.tsx index 575b8467f..e5dafc240 100644 --- a/frontend/src/Parse/ParseResult.tsx +++ b/frontend/src/Parse/ParseResult.tsx @@ -5,6 +5,7 @@ import EpisodeFormats from 'Episode/EpisodeFormats'; import SeriesTitleLink from 'Series/SeriesTitleLink'; import translate from 'Utilities/String/translate'; import ParseResultItem from './ParseResultItem'; +import styles from './ParseResult.css'; interface ParseResultProps { item: ParseModel; @@ -45,11 +46,11 @@ function ParseResult(props: ParseResultProps) {
- + 0 ? seriesTitleInfo.allTitles.join(', ') @@ -66,105 +67,113 @@ function ParseResult(props: ParseResultProps) { />
- {/* - - Year - Secondary titles - special episode - - */} +
+
+
+ -
- + - + - + - + +
- +
+ - + - + - - - + +
+
- +
+
+ + 1 && !quality.revision.isRepack + ? 'True' + : '-' + } + /> - 1 ? quality.revision.version : '-'} - /> + +
- +
+ 1 ? quality.revision.version : '-' + } + /> - 1 && !quality.revision.isRepack - ? 'True' - : '-' - } - /> - - + +
+
@@ -176,7 +185,7 @@ function ParseResult(props: ParseResultProps) {
@@ -218,12 +227,12 @@ function ParseResult(props: ParseResultProps) { /> } />
diff --git a/frontend/src/Parse/ParseToolbarButton.tsx b/frontend/src/Parse/ParseToolbarButton.tsx index 66724d852..43b8b959f 100644 --- a/frontend/src/Parse/ParseToolbarButton.tsx +++ b/frontend/src/Parse/ParseToolbarButton.tsx @@ -2,6 +2,7 @@ import React, { Fragment, useCallback, useState } from 'react'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; import { icons } from 'Helpers/Props'; import ParseModal from 'Parse/ParseModal'; +import translate from 'Utilities/String/translate'; function ParseToolbarButton() { const [isParseModalOpen, setIsParseModalOpen] = useState(false); @@ -17,7 +18,7 @@ function ParseToolbarButton() { return ( diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 3afbcaa35..460213e06 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -1,16 +1,19 @@ { + "AbsoluteEpisodeNumbers": "Absolute Episode Number(s)", "Activity": "Activity", "Add": "Add", + "AddNew": "Add New", "Added": "Added", "AddingTag": "Adding tag", - "AddNew": "Add New", + "AirDate": "Air Date", + "AllTitles": "All Titles", "ApiKeyValidationHealthCheckMessage": "Please update your API key to be at least {0} characters long. You can do this via settings or the config file", "AppDataLocationHealthCheckMessage": "Updating will not be possible to prevent deleting AppData on Update", "Apply": "Apply", "ApplyChanges": "Apply Changes", "ApplyTags": "Apply Tags", - "ApplyTagsHelpTextHowToApply": "How to apply tags to the selected indexers", "ApplyTagsHelpTextAdd": "Add: Add the tags the existing list of tags", + "ApplyTagsHelpTextHowToApply": "How to apply tags to the selected indexers", "ApplyTagsHelpTextRemove": "Remove: Remove the entered tags", "ApplyTagsHelpTextReplace": "Replace: Replace the tags with the entered tags (enter no tags to clear all tags)", "AutoAdd": "Auto Add", @@ -34,6 +37,7 @@ "CustomFormatScore": "Custom Format Score", "CustomFormats": "Custom Formats", "CutoffUnmet": "Cutoff Unmet", + "Daily": "Daily", "Delete": "Delete", "DeleteCondition": "Delete Condition", "DeleteConditionMessageText": "Are you sure you want to delete the condition '{0}'?", @@ -45,14 +49,15 @@ "DeleteSelectedImportListsMessageText": "Are you sure you want to delete {count} selected import list(s)?", "DeleteSelectedIndexers": "Delete Indexer(s)", "DeleteSelectedIndexersMessageText": "Are you sure you want to delete {count} selected indexer(s)?", + "Details": "Details", "Disabled": "Disabled", - "DownloadClients": "Download Clients", "DownloadClientCheckNoneAvailableHealthCheckMessage": "No download client is available", "DownloadClientCheckUnableToCommunicateWithHealthCheckMessage": "Unable to communicate with {0}.", "DownloadClientRootFolderHealthCheckMessage": "Download client {0} places downloads in the root folder {1}. You should not download to a root folder.", "DownloadClientSortingHealthCheckMessage": "Download client {0} has {1} sorting enabled for Sonarr's category. You should disable sorting in your download client to avoid import issues.", "DownloadClientStatusAllClientHealthCheckMessage": "All download clients are unavailable due to failures", "DownloadClientStatusSingleClientHealthCheckMessage": "Download clients unavailable due to failures: {0}", + "DownloadClients": "Download Clients", "Edit": "Edit", "EditSelectedDownloadClients": "Edit Selected Download Clients", "EditSelectedImportLists": "Edit Selected Import Lists", @@ -63,23 +68,25 @@ "EnableRSS": "Enable RSS", "Enabled": "Enabled", "Ended": "Ended", + "EpisodeInfo": "Episode Info", + "EpisodeNumbers": "Episode Number(s)", "Events": "Events", "ExistingTag": "Existing tag", "ExportCustomFormat": "Export Custom Format", + "FullSeason": "Full Season", "General": "General", "HiddenClickToShow": "Hidden, click to show", "HideAdvanced": "Hide Advanced", "History": "History", "Implementation": "Implementation", - "ImportLists": "Import Lists", "ImportListRootFolderMissingRootHealthCheckMessage": "Missing root folder for import list(s): {0}", "ImportListRootFolderMultipleMissingRootsHealthCheckMessage": "Multiple root folders are missing for import lists: {0}", "ImportListStatusAllUnavailableHealthCheckMessage": "All lists are unavailable due to failures", "ImportListStatusUnavailableHealthCheckMessage": "Lists unavailable due to failures: {0}", + "ImportLists": "Import Lists", "ImportMechanismEnableCompletedDownloadHandlingIfPossibleHealthCheckMessage": "Enable Completed Download Handling if possible", "ImportMechanismEnableCompletedDownloadHandlingIfPossibleMultiComputerHealthCheckMessage": "Enable Completed Download Handling if possible (Multi-Computer unsupported)", "ImportMechanismHandlingDisabledHealthCheckMessage": "Enable Completed Download Handling", - "Indexers": "Indexers", "IndexerJackettAllHealthCheckMessage": "Indexers using the unsupported Jackett 'all' endpoint: {0}", "IndexerLongTermStatusAllUnavailableHealthCheckMessage": "All indexers are unavailable due to failures for more than 6 hours", "IndexerLongTermStatusUnavailableHealthCheckMessage": "Indexers unavailable due to failures for more than 6 hours: {0}", @@ -90,8 +97,10 @@ "IndexerSearchNoInteractiveHealthCheckMessage": "No indexers available with Interactive Search enabled, Sonarr will not provide any interactive search results", "IndexerStatusAllUnavailableHealthCheckMessage": "All indexers are unavailable due to failures", "IndexerStatusUnavailableHealthCheckMessage": "Indexers unavailable due to failures: {0}", + "Indexers": "Indexers", "Language": "Language", "Language that Sonarr will use for UI": "Language that Sonarr will use for UI", + "Languages": "Languages", "LibraryImport": "Library Import", "LogFiles": "Log Files", "ManageClients": "Manage Clients", @@ -99,12 +108,16 @@ "ManageImportLists": "Manage Import Lists", "ManageIndexers": "Manage Indexers", "ManageLists": "Manage Lists", + "MatchedToEpisodes": "Matched to Episodes", + "MatchedToSeason": "Matched to Season", + "MatchedToSeries": "Matched to Series", "MediaManagement": "Media Management", "Metadata": "Metadata", "MetadataSource": "Metadata Source", "Missing": "Missing", "Monitored": "Monitored", "MountHealthCheckMessage": "Mount containing a series path is mounted read-only: ", + "MultiSeason": "Multi-Season", "Name": "Name", "Negated": "Negated", "Network": "Network", @@ -117,18 +130,25 @@ "NoSeasons": "No seasons", "OneSeason": "1 season", "OriginalLanguage": "Original Language", + "PartialSeason": "Partial Season", "Path": "Path", "PreviousAiring": "Previous Airing", "Priority": "Priority", "Profiles": "Profiles", + "Proper": "Proper", "ProxyBadRequestHealthCheckMessage": "Failed to test proxy. Status Code: {0}", "ProxyFailedToTestHealthCheckMessage": "Failed to test proxy: {0}", "ProxyResolveIpHealthCheckMessage": "Failed to resolve the IP Address for the Configured Proxy Host {0}", "Quality": "Quality", "QualityProfile": "Quality Profile", "Queue": "Queue", + "Real": "Real", "RecycleBinUnableToWriteHealthCheckMessage": "Unable to write to configured recycling bin folder: {0}. Ensure this path exists and is writable by the user running Sonarr", "RefreshSeries": "Refresh Series", + "Release": "Release", + "ReleaseGroup": "Release Group", + "ReleaseHash": "Release Hash", + "ReleaseTitle": "Release Title", "RemotePathMappingBadDockerPathHealthCheckMessage": "You are using docker; download client {0} places downloads in {1} but this is not a valid {2} path. Review your remote path mappings and download client settings.", "RemotePathMappingDockerFolderMissingHealthCheckMessage": "You are using docker; download client {0} places downloads in {1} but this directory does not appear to exist inside the container. Review your remote path mappings and container volume settings.", "RemotePathMappingDownloadPermissionsHealthCheckMessage": "Sonarr can see but not access downloaded episode {0}. Likely permissions error.", @@ -158,6 +178,7 @@ "RemovedSeriesMultipleRemovedHealthCheckMessage": "Series {0} were removed from TheTVDB", "RemovedSeriesSingleRemovedHealthCheckMessage": "Series {0} was removed from TheTVDB", "RemovingTag": "Removing tag", + "Repack": "Repack", "Replace": "Replace", "Required": "Required", "Result": "Result", @@ -165,24 +186,29 @@ "RootFolderMissingHealthCheckMessage": "Missing root folder: {0}", "RootFolderMultipleMissingHealthCheckMessage": "Multiple root folders are missing: {0}", "SearchForMonitoredEpisodes": "Search for monitored episodes", + "SeasonNumber": "Season Number", "Series": "Series", + "SeriesTitle": "Series Title", "SetTags": "Set Tags", "Settings": "Settings", "ShowAdvanced": "Show Advanced", "ShownClickToHide": "Shown, click to hide", "SizeOnDisk": "Size on disk", + "Special": "Special", "System": "System", "SystemTimeHealthCheckMessage": "System time is off by more than 1 day. Scheduled tasks may not run correctly until the time is corrected", "Tags": "Tags", "Tasks": "Tasks", + "TestParsing": "Test Parsing", "UI": "UI", "UI Language": "UI Language", "Unmonitored": "Unmonitored", - "Updates": "Updates", "UpdateAvailableHealthCheckMessage": "New update is available", "UpdateStartupNotWritableHealthCheckMessage": "Cannot install update because startup folder '{0}' is not writable by the user '{1}'.", "UpdateStartupTranslocationHealthCheckMessage": "Cannot install update because startup folder '{0}' is in an App Translocation folder.", "UpdateUINotWritableHealthCheckMessage": "Cannot install update because UI folder '{0}' is not writable by the user '{1}'.", + "Updates": "Updates", + "Version": "Version", "Wanted": "Wanted", "Yes": "Yes" }