mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01: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:
parent
e11339fb83
commit
0361299a73
8 changed files with 49 additions and 5 deletions
|
|
@ -72,6 +72,7 @@ interface Movie extends ModelBase {
|
||||||
images: Image[];
|
images: Image[];
|
||||||
movieFile: MovieFile;
|
movieFile: MovieFile;
|
||||||
hasFile: boolean;
|
hasFile: boolean;
|
||||||
|
lastSearchTime?: string;
|
||||||
isAvailable: boolean;
|
isAvailable: boolean;
|
||||||
isSaving?: boolean;
|
isSaving?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,12 @@ export const defaultState = {
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: false
|
isVisible: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'movies.lastSearchTime',
|
||||||
|
label: () => translate('LastSearched'),
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'status',
|
name: 'status',
|
||||||
label: () => translate('Status'),
|
label: () => translate('Status'),
|
||||||
|
|
@ -143,6 +149,12 @@ export const defaultState = {
|
||||||
label: () => translate('Languages'),
|
label: () => translate('Languages'),
|
||||||
isVisible: false
|
isVisible: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'movies.lastSearchTime',
|
||||||
|
label: () => translate('LastSearched'),
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'status',
|
name: 'status',
|
||||||
label: () => translate('Status'),
|
label: () => translate('Status'),
|
||||||
|
|
|
||||||
|
|
@ -126,14 +126,16 @@ class CutoffUnmetConnector extends Component {
|
||||||
onSearchSelectedPress = (selected) => {
|
onSearchSelectedPress = (selected) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.MOVIE_SEARCH,
|
name: commandNames.MOVIE_SEARCH,
|
||||||
movieIds: selected
|
movieIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllCutoffUnmetPress = (monitored) => {
|
onSearchAllCutoffUnmetPress = (monitored) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.CUTOFF_UNMET_MOVIES_SEARCH,
|
name: commandNames.CUTOFF_UNMET_MOVIES_SEARCH,
|
||||||
monitored
|
monitored,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ function CutoffUnmetRow(props) {
|
||||||
inCinemas,
|
inCinemas,
|
||||||
digitalRelease,
|
digitalRelease,
|
||||||
physicalRelease,
|
physicalRelease,
|
||||||
|
lastSearchTime,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
onSelectedChange
|
onSelectedChange
|
||||||
|
|
@ -110,6 +111,16 @@ function CutoffUnmetRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'movies.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCell
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
includeSeconds={true}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'status') {
|
if (name === 'status') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell
|
<TableRowCell
|
||||||
|
|
@ -148,6 +159,7 @@ CutoffUnmetRow.propTypes = {
|
||||||
movieFileId: PropTypes.number,
|
movieFileId: PropTypes.number,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
year: PropTypes.number.isRequired,
|
year: PropTypes.number.isRequired,
|
||||||
|
lastSearchTime: PropTypes.string,
|
||||||
titleSlug: PropTypes.string.isRequired,
|
titleSlug: PropTypes.string.isRequired,
|
||||||
inCinemas: PropTypes.string,
|
inCinemas: PropTypes.string,
|
||||||
digitalRelease: PropTypes.string,
|
digitalRelease: PropTypes.string,
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,16 @@ class MissingConnector extends Component {
|
||||||
onSearchSelectedPress = (selected) => {
|
onSearchSelectedPress = (selected) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.MOVIE_SEARCH,
|
name: commandNames.MOVIE_SEARCH,
|
||||||
movieIds: selected
|
movieIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllMissingPress = (monitored) => {
|
onSearchAllMissingPress = (monitored) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.MISSING_MOVIES_SEARCH,
|
name: commandNames.MISSING_MOVIES_SEARCH,
|
||||||
monitored
|
monitored,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ function MissingRow(props) {
|
||||||
inCinemas,
|
inCinemas,
|
||||||
digitalRelease,
|
digitalRelease,
|
||||||
physicalRelease,
|
physicalRelease,
|
||||||
|
lastSearchTime,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
onSelectedChange
|
onSelectedChange
|
||||||
|
|
@ -100,6 +101,16 @@ function MissingRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'movies.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCell
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
includeSeconds={true}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'status') {
|
if (name === 'status') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell
|
<TableRowCell
|
||||||
|
|
@ -138,6 +149,7 @@ MissingRow.propTypes = {
|
||||||
movieFileId: PropTypes.number,
|
movieFileId: PropTypes.number,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
year: PropTypes.number.isRequired,
|
year: PropTypes.number.isRequired,
|
||||||
|
lastSearchTime: PropTypes.string,
|
||||||
titleSlug: PropTypes.string.isRequired,
|
titleSlug: PropTypes.string.isRequired,
|
||||||
inCinemas: PropTypes.string,
|
inCinemas: PropTypes.string,
|
||||||
digitalRelease: PropTypes.string,
|
digitalRelease: PropTypes.string,
|
||||||
|
|
|
||||||
|
|
@ -820,6 +820,7 @@
|
||||||
"Large": "Large",
|
"Large": "Large",
|
||||||
"LastDuration": "Last Duration",
|
"LastDuration": "Last Duration",
|
||||||
"LastExecution": "Last Execution",
|
"LastExecution": "Last Execution",
|
||||||
|
"LastSearched": "Last Searched",
|
||||||
"LastUsed": "Last Used",
|
"LastUsed": "Last Used",
|
||||||
"LastWriteTime": "Last Write Time",
|
"LastWriteTime": "Last Write Time",
|
||||||
"LaunchBrowserHelpText": " Open a web browser and navigate to the {appName} homepage on app start.",
|
"LaunchBrowserHelpText": " Open a web browser and navigate to the {appName} homepage on app start.",
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ public MovieResource()
|
||||||
public MovieFileResource MovieFile { get; set; }
|
public MovieFileResource MovieFile { get; set; }
|
||||||
public MovieCollectionResource Collection { get; set; }
|
public MovieCollectionResource Collection { get; set; }
|
||||||
public float Popularity { get; set; }
|
public float Popularity { get; set; }
|
||||||
|
public DateTime? LastSearchTime { get; set; }
|
||||||
public MovieStatisticsResource Statistics { get; set; }
|
public MovieStatisticsResource Statistics { get; set; }
|
||||||
|
|
||||||
// Hiding this so people don't think its usable (only used to set the initial state)
|
// Hiding this so people don't think its usable (only used to set the initial state)
|
||||||
|
|
@ -161,7 +162,8 @@ public static MovieResource ToResource(this Movie model, int availDelay, MovieTr
|
||||||
YouTubeTrailerId = model.MovieMetadata.Value.YouTubeTrailerId,
|
YouTubeTrailerId = model.MovieMetadata.Value.YouTubeTrailerId,
|
||||||
Studio = model.MovieMetadata.Value.Studio,
|
Studio = model.MovieMetadata.Value.Studio,
|
||||||
Collection = collection,
|
Collection = collection,
|
||||||
Popularity = model.MovieMetadata.Value.Popularity
|
Popularity = model.MovieMetadata.Value.Popularity,
|
||||||
|
LastSearchTime = model.LastSearchTime,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue