mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
New: Last Searched column on Wanted screens (#5084)
* Added lastSearchTime to API & Wanted Screens.
This commit is contained in:
parent
f705603211
commit
3381ffc311
8 changed files with 47 additions and 5 deletions
|
@ -20,6 +20,7 @@ interface Album extends ModelBase {
|
||||||
monitored: boolean;
|
monitored: boolean;
|
||||||
releaseDate: string;
|
releaseDate: string;
|
||||||
statistics: Statistics;
|
statistics: Statistics;
|
||||||
|
lastSearchTime?: string;
|
||||||
isSaving?: boolean;
|
isSaving?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,12 @@ export const defaultState = {
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'albums.lastSearchTime',
|
||||||
|
label: () => translate('LastSearched'),
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name: 'status',
|
// name: 'status',
|
||||||
// label: 'Status',
|
// label: 'Status',
|
||||||
|
@ -131,6 +137,12 @@ export const defaultState = {
|
||||||
// label: 'Status',
|
// label: 'Status',
|
||||||
// isVisible: true
|
// isVisible: true
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
name: 'albums.lastSearchTime',
|
||||||
|
label: () => translate('LastSearched'),
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
columnLabel: () => translate('Actions'),
|
columnLabel: () => translate('Actions'),
|
||||||
|
|
|
@ -131,13 +131,15 @@ class CutoffUnmetConnector extends Component {
|
||||||
onSearchSelectedPress = (selected) => {
|
onSearchSelectedPress = (selected) => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.ALBUM_SEARCH,
|
name: commandNames.ALBUM_SEARCH,
|
||||||
albumIds: selected
|
albumIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllCutoffUnmetPress = () => {
|
onSearchAllCutoffUnmetPress = () => {
|
||||||
this.props.executeCommand({
|
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,
|
foreignAlbumId,
|
||||||
albumType,
|
albumType,
|
||||||
title,
|
title,
|
||||||
|
lastSearchTime,
|
||||||
disambiguation,
|
disambiguation,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
|
@ -89,6 +90,15 @@ function CutoffUnmetRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'albums.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCellConnector
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'status') {
|
if (name === 'status') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell
|
<TableRowCell
|
||||||
|
@ -132,6 +142,7 @@ CutoffUnmetRow.propTypes = {
|
||||||
foreignAlbumId: PropTypes.string.isRequired,
|
foreignAlbumId: PropTypes.string.isRequired,
|
||||||
albumType: PropTypes.string.isRequired,
|
albumType: 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.ALBUM_SEARCH,
|
name: commandNames.ALBUM_SEARCH,
|
||||||
albumIds: selected
|
albumIds: selected,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchAllMissingPress = () => {
|
onSearchAllMissingPress = () => {
|
||||||
this.props.executeCommand({
|
this.props.executeCommand({
|
||||||
name: commandNames.MISSING_ALBUM_SEARCH
|
name: commandNames.MISSING_ALBUM_SEARCH,
|
||||||
|
commandFinished: this.repopulate
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ function MissingRow(props) {
|
||||||
albumType,
|
albumType,
|
||||||
foreignAlbumId,
|
foreignAlbumId,
|
||||||
title,
|
title,
|
||||||
|
lastSearchTime,
|
||||||
disambiguation,
|
disambiguation,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
|
@ -86,6 +87,15 @@ function MissingRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'albums.lastSearchTime') {
|
||||||
|
return (
|
||||||
|
<RelativeDateCellConnector
|
||||||
|
key={name}
|
||||||
|
date={lastSearchTime}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'actions') {
|
if (name === 'actions') {
|
||||||
return (
|
return (
|
||||||
<AlbumSearchCellConnector
|
<AlbumSearchCellConnector
|
||||||
|
@ -113,6 +123,7 @@ MissingRow.propTypes = {
|
||||||
foreignAlbumId: PropTypes.string.isRequired,
|
foreignAlbumId: PropTypes.string.isRequired,
|
||||||
albumType: PropTypes.string.isRequired,
|
albumType: 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,
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace Lidarr.Api.V1.Albums
|
||||||
public ArtistResource Artist { get; set; }
|
public ArtistResource Artist { get; set; }
|
||||||
public List<MediaCover> Images { get; set; }
|
public List<MediaCover> Images { get; set; }
|
||||||
public List<Links> Links { get; set; }
|
public List<Links> Links { get; set; }
|
||||||
|
public DateTime? LastSearchTime { get; set; }
|
||||||
public AlbumStatisticsResource Statistics { get; set; }
|
public AlbumStatisticsResource Statistics { get; set; }
|
||||||
public AddAlbumOptions AddOptions { get; set; }
|
public AddAlbumOptions AddOptions { get; set; }
|
||||||
public string RemoteCover { get; set; }
|
public string RemoteCover { get; set; }
|
||||||
|
@ -86,7 +87,8 @@ namespace Lidarr.Api.V1.Albums
|
||||||
SecondaryTypes = model.SecondaryTypes.Select(s => s.Name).ToList(),
|
SecondaryTypes = model.SecondaryTypes.Select(s => s.Name).ToList(),
|
||||||
Releases = model.AlbumReleases?.Value.ToResource() ?? new List<AlbumReleaseResource>(),
|
Releases = model.AlbumReleases?.Value.ToResource() ?? new List<AlbumReleaseResource>(),
|
||||||
Media = selectedRelease?.Media.ToResource() ?? new List<MediumResource>(),
|
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",
|
"LastAlbum": "Last Album",
|
||||||
"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",
|
||||||
"LatestAlbum": "Latest Album",
|
"LatestAlbum": "Latest Album",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue