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>
pull/10411/head
ManiMatter 2 months ago committed by GitHub
parent e11339fb83
commit 0361299a73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
});
};

@ -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,

@ -820,6 +820,7 @@
"Large": "Large",
"LastDuration": "Last Duration",
"LastExecution": "Last Execution",
"LastSearched": "Last Searched",
"LastUsed": "Last Used",
"LastWriteTime": "Last Write Time",
"LaunchBrowserHelpText": " Open a web browser and navigate to the {appName} homepage on app start.",

@ -83,6 +83,7 @@ namespace Radarr.Api.V3.Movies
public MovieFileResource MovieFile { get; set; }
public MovieCollectionResource Collection { get; set; }
public float Popularity { get; set; }
public DateTime? LastSearchTime { get; set; }
public MovieStatisticsResource Statistics { get; set; }
// Hiding this so people don't think its usable (only used to set the initial state)
@ -161,7 +162,8 @@ namespace Radarr.Api.V3.Movies
YouTubeTrailerId = model.MovieMetadata.Value.YouTubeTrailerId,
Studio = model.MovieMetadata.Value.Studio,
Collection = collection,
Popularity = model.MovieMetadata.Value.Popularity
Popularity = model.MovieMetadata.Value.Popularity,
LastSearchTime = model.LastSearchTime,
};
}

Loading…
Cancel
Save