mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -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
|
bin
|
||||||
obj
|
obj
|
||||||
output/*
|
output/*
|
||||||
|
_temp*
|
||||||
|
|
||||||
# .NET Core
|
# .NET Core
|
||||||
project.lock.json
|
project.lock.json
|
||||||
|
@ -139,12 +140,6 @@ project.fragment.lock.json
|
||||||
artifacts/
|
artifacts/
|
||||||
**/Properties/launchSettings.json
|
**/Properties/launchSettings.json
|
||||||
|
|
||||||
#VS outout folders
|
|
||||||
bin
|
|
||||||
obj
|
|
||||||
output/*
|
|
||||||
|
|
||||||
|
|
||||||
# macOS metadata files
|
# macOS metadata files
|
||||||
._*
|
._*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
@ -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
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,23 +3,24 @@ import React from 'react';
|
||||||
import albumEntities from 'Album/albumEntities';
|
import albumEntities from 'Album/albumEntities';
|
||||||
import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector';
|
import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector';
|
||||||
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
import AlbumTitleLink from 'Album/AlbumTitleLink';
|
||||||
import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
// import EpisodeStatusConnector from 'Album/EpisodeStatusConnector';
|
||||||
import ArtistNameLink from 'Artist/ArtistNameLink';
|
import ArtistNameLink from 'Artist/ArtistNameLink';
|
||||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import styles from './CutoffUnmetRow.css';
|
// import styles from './CutoffUnmetRow.css';
|
||||||
|
|
||||||
function CutoffUnmetRow(props) {
|
function CutoffUnmetRow(props) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
trackFileId,
|
// trackFileId,
|
||||||
artist,
|
artist,
|
||||||
releaseDate,
|
releaseDate,
|
||||||
foreignAlbumId,
|
foreignAlbumId,
|
||||||
albumType,
|
albumType,
|
||||||
title,
|
title,
|
||||||
|
lastSearchTime,
|
||||||
disambiguation,
|
disambiguation,
|
||||||
isSelected,
|
isSelected,
|
||||||
columns,
|
columns,
|
||||||
|
@ -89,21 +90,30 @@ function CutoffUnmetRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === 'status') {
|
if (name === 'albums.lastSearchTime') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell
|
<RelativeDateCellConnector
|
||||||
key={name}
|
key={name}
|
||||||
className={styles.status}
|
date={lastSearchTime}
|
||||||
>
|
|
||||||
<EpisodeStatusConnector
|
|
||||||
albumId={id}
|
|
||||||
trackFileId={trackFileId}
|
|
||||||
albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (name === 'status') {
|
||||||
|
// return (
|
||||||
|
// <TableRowCell
|
||||||
|
// key={name}
|
||||||
|
// className={styles.status}
|
||||||
|
// >
|
||||||
|
// <EpisodeStatusConnector
|
||||||
|
// albumId={id}
|
||||||
|
// trackFileId={trackFileId}
|
||||||
|
// albumEntity={albumEntities.WANTED_CUTOFF_UNMET}
|
||||||
|
// />
|
||||||
|
// </TableRowCell>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
if (name === 'actions') {
|
if (name === 'actions') {
|
||||||
return (
|
return (
|
||||||
<AlbumSearchCellConnector
|
<AlbumSearchCellConnector
|
||||||
|
@ -126,12 +136,13 @@ function CutoffUnmetRow(props) {
|
||||||
|
|
||||||
CutoffUnmetRow.propTypes = {
|
CutoffUnmetRow.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
trackFileId: PropTypes.number,
|
// trackFileId: PropTypes.number,
|
||||||
artist: PropTypes.object.isRequired,
|
artist: PropTypes.object.isRequired,
|
||||||
releaseDate: PropTypes.string.isRequired,
|
releaseDate: PropTypes.string.isRequired,
|
||||||
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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -644,6 +644,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