1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

New: Last Searched column on Wanted screens (#10392)

* Adding lastSearchTime to API and "Last Searched" to Frontend (cutoff unmet & missing)
Picking lastSearchTime from movie instead of movieMetaData

---------

Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com>
This commit is contained in:
ManiMatter
2024-09-08 19:56:11 +02:00
committed by GitHub
parent e11339fb83
commit 0361299a73
8 changed files with 49 additions and 5 deletions
+1
View File
@@ -72,6 +72,7 @@ interface Movie extends ModelBase {
images: Image[];
movieFile: MovieFile;
hasFile: boolean;
lastSearchTime?: string;
isAvailable: boolean;
isSaving?: boolean;
}
@@ -58,6 +58,12 @@ export const defaultState = {
isSortable: true,
isVisible: false
},
{
name: 'movies.lastSearchTime',
label: () => translate('LastSearched'),
isSortable: true,
isVisible: false
},
{
name: 'status',
label: () => translate('Status'),
@@ -143,6 +149,12 @@ export const defaultState = {
label: () => translate('Languages'),
isVisible: false
},
{
name: 'movies.lastSearchTime',
label: () => translate('LastSearched'),
isSortable: true,
isVisible: false
},
{
name: 'status',
label: () => translate('Status'),
@@ -126,14 +126,16 @@ class CutoffUnmetConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.MOVIE_SEARCH,
movieIds: selected
movieIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllCutoffUnmetPress = (monitored) => {
this.props.executeCommand({
name: commandNames.CUTOFF_UNMET_MOVIES_SEARCH,
monitored
monitored,
commandFinished: this.repopulate
});
};
@@ -21,6 +21,7 @@ function CutoffUnmetRow(props) {
inCinemas,
digitalRelease,
physicalRelease,
lastSearchTime,
isSelected,
columns,
onSelectedChange
@@ -110,6 +111,16 @@ function CutoffUnmetRow(props) {
);
}
if (name === 'movies.lastSearchTime') {
return (
<RelativeDateCell
key={name}
date={lastSearchTime}
includeSeconds={true}
/>
);
}
if (name === 'status') {
return (
<TableRowCell
@@ -148,6 +159,7 @@ CutoffUnmetRow.propTypes = {
movieFileId: PropTypes.number,
title: PropTypes.string.isRequired,
year: PropTypes.number.isRequired,
lastSearchTime: PropTypes.string,
titleSlug: PropTypes.string.isRequired,
inCinemas: PropTypes.string,
digitalRelease: PropTypes.string,
@@ -117,14 +117,16 @@ class MissingConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.MOVIE_SEARCH,
movieIds: selected
movieIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllMissingPress = (monitored) => {
this.props.executeCommand({
name: commandNames.MISSING_MOVIES_SEARCH,
monitored
monitored,
commandFinished: this.repopulate
});
};
+12
View File
@@ -20,6 +20,7 @@ function MissingRow(props) {
inCinemas,
digitalRelease,
physicalRelease,
lastSearchTime,
isSelected,
columns,
onSelectedChange
@@ -100,6 +101,16 @@ function MissingRow(props) {
);
}
if (name === 'movies.lastSearchTime') {
return (
<RelativeDateCell
key={name}
date={lastSearchTime}
includeSeconds={true}
/>
);
}
if (name === 'status') {
return (
<TableRowCell
@@ -138,6 +149,7 @@ MissingRow.propTypes = {
movieFileId: PropTypes.number,
title: PropTypes.string.isRequired,
year: PropTypes.number.isRequired,
lastSearchTime: PropTypes.string,
titleSlug: PropTypes.string.isRequired,
inCinemas: PropTypes.string,
digitalRelease: PropTypes.string,