mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Added lastSearchTime to API & Wanted Screens.
Commented out 'status' on the same since already commented out on wantedactions.js
This commit is contained in:
parent
af6c0cc6f5
commit
2f149ade30
9 changed files with 62 additions and 25 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -132,6 +132,7 @@ setup/Output/
|
|||
bin
|
||||
obj
|
||||
output/*
|
||||
_temp*
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
|
@ -139,12 +140,6 @@ project.fragment.lock.json
|
|||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
#VS outout folders
|
||||
bin
|
||||
obj
|
||||
output/*
|
||||
|
||||
|
||||
# macOS metadata files
|
||||
._*
|
||||
.DS_Store
|
||||
|
|
|
@ -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
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -3,23 +3,24 @@ import React from 'react';
|
|||
import albumEntities from 'Album/albumEntities';
|
||||
import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector';
|
||||
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
||||
import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
||||
// import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
import TableRow from 'Components/Table/TableRow';
|
||||
import styles from './CutoffUnmetRow.css';
|
||||
// import styles from './CutoffUnmetRow.css';
|
||||
|
||||
function CutoffUnmetRow(props) {
|
||||
const {
|
||||
id,
|
||||
trackFileId,
|
||||
// trackFileId,
|
||||
artist,
|
||||
releaseDate,
|
||||
foreignAlbumId,
|
||||
albumType,
|
||||
title,
|
||||
lastSearchTime,
|
||||
disambiguation,
|
||||
isSelected,
|
||||
columns,
|
||||
|
@ -89,21 +90,30 @@ function CutoffUnmetRow(props) {
|
|||
);
|
||||
}
|
||||
|
||||
if (name === 'status') {
|
||||
if (name === 'albums.lastSearchTime') {
|
||||
return (
|
||||
<TableRowCell
|
||||
<RelativeDateCellConnector
|
||||
key={name}
|
||||
className={styles.status}
|
||||
>
|
||||
<EpisodeStatusConnector
|
||||
albumId={id}
|
||||
trackFileId={trackFileId}
|
||||
albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
||||
/>
|
||||
</TableRowCell>
|
||||
date={lastSearchTime}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// if (name === 'status') {
|
||||
// return (
|
||||
// <TableRowCell
|
||||
// key={name}
|
||||
// className={styles.status}
|
||||
// >
|
||||
// <EpisodeStatusConnector
|
||||
// albumId={id}
|
||||
// trackFileId={trackFileId}
|
||||
// albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
||||
// />
|
||||
// </TableRowCell>
|
||||
// );
|
||||
// }
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<AlbumSearchCellConnector
|
||||
|
@ -126,12 +136,13 @@ function CutoffUnmetRow(props) {
|
|||
|
||||
CutoffUnmetRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
trackFileId: PropTypes.number,
|
||||
// trackFileId: PropTypes.number,
|
||||
artist: PropTypes.object.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
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
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -644,6 +644,7 @@
|
|||
"LastAlbum": "Last Album",
|
||||
"LastDuration": "Last Duration",
|
||||
"LastExecution": "Last Execution",
|
||||
"LastSearched": "Last Searched",
|
||||
"LastUsed": "Last Used",
|
||||
"LastWriteTime": "Last Write Time",
|
||||
"LatestAlbum": "Latest Album",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue