mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
New: Last Searched column on Wanted screens
This commit is contained in:
@@ -45,6 +45,12 @@ export const defaultState = {
|
|||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'books.lastSearchTime',
|
||||||
|
label: 'Last Searched',
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
columnLabel: 'Actions',
|
columnLabel: 'Actions',
|
||||||
@@ -108,6 +114,12 @@ export const defaultState = {
|
|||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'books.lastSearchTime',
|
||||||
|
label: 'Last Searched',
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
columnLabel: 'Actions',
|
columnLabel: 'Actions',
|
||||||
|
|||||||
@@ -131,13 +131,15 @@ class CutoffUnmetConnector extends Component {
|
|||||||
onSearchSelectedPress = (selected) => {
|
onSearchSelectedPress = (selected) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.BOOK_SEARCH,
|
name: commandNames.BOOK_SEARCH,
|
||||||
bookIds: selected
|
bookIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllCutoffUnmetPress = () => {
|
onSearchAllCutoffUnmetPress = () => {
|
||||||
this.props.executeCommand({
|
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,
|
releaseDate,
|
||||||
titleSlug,
|
titleSlug,
|
||||||
title,
|
title,
|
||||||
|
lastSearchTime,
|
||||||
disambiguation,
|
disambiguation,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
@@ -68,6 +69,15 @@ function CutoffUnmetRow(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'books.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCellConnector
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'releaseDate') {
|
if (name === 'releaseDate') {
|
||||||
return (
|
return (
|
||||||
<RelativeDateCellConnector
|
<RelativeDateCellConnector
|
||||||
@@ -105,6 +115,7 @@ CutoffUnmetRow.propTypes = {
|
|||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
titleSlug: PropTypes.string.isRequired,
|
titleSlug: PropTypes.string.isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
|
lastSearchTime: PropTypes.string,
|
||||||
disambiguation: PropTypes.string,
|
disambiguation: PropTypes.string,
|
||||||
isSelected: PropTypes.bool,
|
isSelected: PropTypes.bool,
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
|||||||
@@ -121,13 +121,15 @@ class MissingConnector extends Component {
|
|||||||
onSearchSelectedPress = (selected) => {
|
onSearchSelectedPress = (selected) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.BOOK_SEARCH,
|
name: commandNames.BOOK_SEARCH,
|
||||||
bookIds: selected
|
bookIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllMissingPress = () => {
|
onSearchAllMissingPress = () => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.MISSING_BOOK_SEARCH
|
name: commandNames.MISSING_BOOK_SEARCH,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ function MissingRow(props) {
|
|||||||
releaseDate,
|
releaseDate,
|
||||||
titleSlug,
|
titleSlug,
|
||||||
title,
|
title,
|
||||||
|
lastSearchTime,
|
||||||
disambiguation,
|
disambiguation,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
@@ -77,6 +78,15 @@ function MissingRow(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'books.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCellConnector
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'actions') {
|
if (name === 'actions') {
|
||||||
return (
|
return (
|
||||||
<BookSearchCellConnector
|
<BookSearchCellConnector
|
||||||
@@ -104,6 +114,7 @@ MissingRow.propTypes = {
|
|||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
titleSlug: PropTypes.string.isRequired,
|
titleSlug: PropTypes.string.isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
|
lastSearchTime: PropTypes.string,
|
||||||
disambiguation: PropTypes.string,
|
disambiguation: PropTypes.string,
|
||||||
isSelected: PropTypes.bool,
|
isSelected: PropTypes.bool,
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
|||||||
@@ -518,6 +518,7 @@
|
|||||||
"Large": "Large",
|
"Large": "Large",
|
||||||
"LastDuration": "Last Duration",
|
"LastDuration": "Last Duration",
|
||||||
"LastExecution": "Last Execution",
|
"LastExecution": "Last Execution",
|
||||||
|
"LastSearched": "Last Searched",
|
||||||
"LastWriteTime": "Last Write Time",
|
"LastWriteTime": "Last Write Time",
|
||||||
"LatestBook": "Latest Book",
|
"LatestBook": "Latest Book",
|
||||||
"LaunchBrowserHelpText": " Open a web browser and navigate to Readarr homepage on app start.",
|
"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 DateTime? Added { get; set; }
|
||||||
public AddBookOptions AddOptions { get; set; }
|
public AddBookOptions AddOptions { get; set; }
|
||||||
public string RemoteCover { get; set; }
|
public string RemoteCover { get; set; }
|
||||||
|
public DateTime? LastSearchTime { get; set; }
|
||||||
public List<EditionResource> Editions { get; set; }
|
public List<EditionResource> Editions { 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)
|
||||||
@@ -80,6 +81,7 @@ namespace Readarr.Api.V1.Books
|
|||||||
Links = model.Links.Concat(selectedEdition?.Links ?? new List<Links>()).ToList(),
|
Links = model.Links.Concat(selectedEdition?.Links ?? new List<Links>()).ToList(),
|
||||||
Ratings = selectedEdition?.Ratings ?? new Ratings(),
|
Ratings = selectedEdition?.Ratings ?? new Ratings(),
|
||||||
Added = model.Added,
|
Added = model.Added,
|
||||||
|
LastSearchTime = model.LastSearchTime
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user