1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-29 23:12:39 +01:00

New: Search library by TheTVDB, TV Maze or IMDB IDs

This commit is contained in:
Bogdan 2023-06-21 05:29:15 +03:00 committed by GitHub
parent 0a05781aca
commit 377e5f7fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View File

@ -18,6 +18,9 @@ function createCleanSeriesSelector() {
sortTitle,
images,
alternateTitles = [],
tvdbId,
tvMazeId,
imdbId,
tags = []
} = series;
@ -27,6 +30,9 @@ function createCleanSeriesSelector() {
sortTitle,
images,
alternateTitles,
tvdbId,
tvMazeId,
imdbId,
firstCharacter: title.charAt(0).toLowerCase(),
tags: tags.reduce((acc, id) => {
const matchingTag = allTags.find((tag) => tag.id === id);

View File

@ -11,6 +11,9 @@ function SeriesSearchResult(props) {
title,
images,
alternateTitles,
tvdbId,
tvMazeId,
imdbId,
tags
} = props;
@ -46,6 +49,30 @@ function SeriesSearchResult(props) {
null
}
{
match.key === 'tvdbId' && tvdbId ?
<div className={styles.alternateTitle}>
TvdbId: {tvdbId}
</div> :
null
}
{
match.key === 'tvMazeId' && tvMazeId ?
<div className={styles.alternateTitle}>
TvMazeId: {tvMazeId}
</div> :
null
}
{
match.key === 'imdbId' && imdbId ?
<div className={styles.alternateTitle}>
ImdbId: {imdbId}
</div> :
null
}
{
tag ?
<div className={styles.tagContainer}>
@ -67,6 +94,9 @@ SeriesSearchResult.propTypes = {
title: PropTypes.string.isRequired,
images: PropTypes.arrayOf(PropTypes.object).isRequired,
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
tvdbId: PropTypes.number,
tvMazeId: PropTypes.number,
imdbId: PropTypes.string,
tags: PropTypes.arrayOf(PropTypes.object).isRequired,
match: PropTypes.object.isRequired
};

View File

@ -10,6 +10,9 @@ const fuseOptions = {
keys: [
'title',
'alternateTitles.title',
'tvdbId',
'tvMazeId',
'imdbId',
'tags.label'
]
};