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

* Added lastSearchTime to API & Wanted Screens.
pull/5143/head
ManiMatter 3 weeks ago committed by GitHub
parent f705603211
commit 3381ffc311
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,6 +20,7 @@ interface Album extends ModelBase {
monitored: boolean;
releaseDate: string;
statistics: Statistics;
lastSearchTime?: string;
isSaving?: boolean;
}

@ -52,6 +52,12 @@ export const defaultState = {
isSortable: true,
isVisible: true
},
{
name: 'albums.lastSearchTime',
label: () => translate('LastSearched'),
isSortable: true,
isVisible: false
},
// {
// name: 'status',
// label: 'Status',
@ -131,6 +137,12 @@ export const defaultState = {
// label: 'Status',
// isVisible: true
// },
{
name: 'albums.lastSearchTime',
label: () => translate('LastSearched'),
isSortable: true,
isVisible: false
},
{
name: 'actions',
columnLabel: () => translate('Actions'),

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

@ -20,6 +20,7 @@ function CutoffUnmetRow(props) {
foreignAlbumId,
albumType,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -89,6 +90,15 @@ function CutoffUnmetRow(props) {
);
}
if (name === 'albums.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'status') {
return (
<TableRowCell
@ -132,6 +142,7 @@ CutoffUnmetRow.propTypes = {
foreignAlbumId: PropTypes.string.isRequired,
albumType: 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.ALBUM_SEARCH,
albumIds: selected
albumIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllMissingPress = () => {
this.props.executeCommand({
name: commandNames.MISSING_ALBUM_SEARCH
name: commandNames.MISSING_ALBUM_SEARCH,
commandFinished: this.repopulate
});
};

@ -17,6 +17,7 @@ function MissingRow(props) {
albumType,
foreignAlbumId,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -86,6 +87,15 @@ function MissingRow(props) {
);
}
if (name === 'albums.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'actions') {
return (
<AlbumSearchCellConnector
@ -113,6 +123,7 @@ MissingRow.propTypes = {
foreignAlbumId: PropTypes.string.isRequired,
albumType: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
lastSearchTime: PropTypes.string,
disambiguation: PropTypes.string,
isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,

@ -44,6 +44,7 @@ namespace Lidarr.Api.V1.Albums
public ArtistResource Artist { get; set; }
public List<MediaCover> Images { get; set; }
public List<Links> Links { get; set; }
public DateTime? LastSearchTime { get; set; }
public AlbumStatisticsResource Statistics { get; set; }
public AddAlbumOptions AddOptions { get; set; }
public string RemoteCover { get; set; }
@ -86,7 +87,8 @@ namespace Lidarr.Api.V1.Albums
SecondaryTypes = model.SecondaryTypes.Select(s => s.Name).ToList(),
Releases = model.AlbumReleases?.Value.ToResource() ?? new List<AlbumReleaseResource>(),
Media = selectedRelease?.Media.ToResource() ?? new List<MediumResource>(),
Artist = model.Artist?.Value.ToResource()
Artist = model.Artist?.Value.ToResource(),
LastSearchTime = model.LastSearchTime
};
}

@ -646,6 +646,7 @@
"LastAlbum": "Last Album",
"LastDuration": "Last Duration",
"LastExecution": "Last Execution",
"LastSearched": "Last Searched",
"LastUsed": "Last Used",
"LastWriteTime": "Last Write Time",
"LatestAlbum": "Latest Album",

Loading…
Cancel
Save