New: Last Searched column on Wanted screens

pull/3994/head
ManiMatter 5 days ago committed by GitHub
parent 0ef3d2a5cc
commit 347289b173
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -45,6 +45,12 @@ export const defaultState = {
isSortable: true,
isVisible: true
},
{
name: 'books.lastSearchTime',
label: 'Last Searched',
isSortable: true,
isVisible: false
},
{
name: 'actions',
columnLabel: 'Actions',
@ -108,6 +114,12 @@ export const defaultState = {
isSortable: true,
isVisible: true
},
{
name: 'books.lastSearchTime',
label: 'Last Searched',
isSortable: true,
isVisible: false
},
{
name: 'actions',
columnLabel: 'Actions',

@ -131,13 +131,15 @@ class CutoffUnmetConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.BOOK_SEARCH,
bookIds: selected
bookIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllCutoffUnmetPress = () => {
this.props.executeCommand({
name: commandNames.CUTOFF_UNMET_BOOK_SEARCH
name: commandNames.CUTOFF_UNMET_BOOK_SEARCH,
commandFinished: this.repopulate
});
};

@ -16,6 +16,7 @@ function CutoffUnmetRow(props) {
releaseDate,
titleSlug,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -68,6 +69,15 @@ function CutoffUnmetRow(props) {
);
}
if (name === 'books.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'releaseDate') {
return (
<RelativeDateCellConnector
@ -105,6 +115,7 @@ CutoffUnmetRow.propTypes = {
releaseDate: PropTypes.string.isRequired,
titleSlug: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
lastSearchTime: PropTypes.string,
disambiguation: PropTypes.string,
isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,

@ -121,13 +121,15 @@ class MissingConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.BOOK_SEARCH,
bookIds: selected
bookIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllMissingPress = () => {
this.props.executeCommand({
name: commandNames.MISSING_BOOK_SEARCH
name: commandNames.MISSING_BOOK_SEARCH,
commandFinished: this.repopulate
});
};

@ -16,6 +16,7 @@ function MissingRow(props) {
releaseDate,
titleSlug,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -77,6 +78,15 @@ function MissingRow(props) {
);
}
if (name === 'books.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'actions') {
return (
<BookSearchCellConnector
@ -104,6 +114,7 @@ MissingRow.propTypes = {
releaseDate: PropTypes.string.isRequired,
titleSlug: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
lastSearchTime: PropTypes.string,
disambiguation: PropTypes.string,
isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,

@ -518,6 +518,7 @@
"Large": "Large",
"LastDuration": "Last Duration",
"LastExecution": "Last Execution",
"LastSearched": "Last Searched",
"LastWriteTime": "Last Write Time",
"LatestBook": "Latest Book",
"LaunchBrowserHelpText": " Open a web browser and navigate to Readarr homepage on app start.",

@ -35,6 +35,7 @@ namespace Readarr.Api.V1.Books
public DateTime? Added { get; set; }
public AddBookOptions AddOptions { get; set; }
public string RemoteCover { get; set; }
public DateTime? LastSearchTime { get; set; }
public List<EditionResource> Editions { get; set; }
//Hiding this so people don't think its usable (only used to set the initial state)
@ -80,6 +81,7 @@ namespace Readarr.Api.V1.Books
Links = model.Links.Concat(selectedEdition?.Links ?? new List<Links>()).ToList(),
Ratings = selectedEdition?.Ratings ?? new Ratings(),
Added = model.Added,
LastSearchTime = model.LastSearchTime
};
}

Loading…
Cancel
Save