New: Search Movies on Add for bulk manage collections

Fixes #8670
This commit is contained in:
Bogdan 2024-02-02 17:36:23 +02:00
parent c9da7ee0c9
commit dc81f51d40
24 changed files with 108 additions and 36 deletions

View File

@ -14,6 +14,50 @@ import styles from './CollectionFooter.css';
const NO_CHANGE = 'noChange';
const monitoredOptions = [
{
key: NO_CHANGE,
get value() {
return translate('NoChange');
},
disabled: true
},
{
key: 'monitored',
get value() {
return translate('Monitored');
}
},
{
key: 'unmonitored',
get value() {
return translate('Unmonitored');
}
}
];
const searchOnAddOptions = [
{
key: NO_CHANGE,
get value() {
return translate('NoChange');
},
disabled: true
},
{
key: 'yes',
get value() {
return translate('Yes');
}
},
{
key: 'no',
get value() {
return translate('No');
}
}
];
class CollectionFooter extends Component {
//
@ -23,12 +67,12 @@ class CollectionFooter extends Component {
super(props, context);
this.state = {
monitor: NO_CHANGE,
monitored: NO_CHANGE,
monitor: NO_CHANGE,
qualityProfileId: NO_CHANGE,
minimumAvailability: NO_CHANGE,
rootFolderPath: NO_CHANGE,
destinationRootFolder: null
searchOnAdd: NO_CHANGE
};
}
@ -44,8 +88,9 @@ class CollectionFooter extends Component {
monitored: NO_CHANGE,
monitor: NO_CHANGE,
qualityProfileId: NO_CHANGE,
minimumAvailability: NO_CHANGE,
rootFolderPath: NO_CHANGE,
minimumAvailability: NO_CHANGE
searchOnAdd: NO_CHANGE
});
}
@ -63,11 +108,12 @@ class CollectionFooter extends Component {
onUpdateSelectedPress = () => {
const {
monitor,
monitored,
monitor,
qualityProfileId,
minimumAvailability,
rootFolderPath
rootFolderPath,
searchOnAdd
} = this.state;
const changes = {};
@ -92,6 +138,10 @@ class CollectionFooter extends Component {
changes.rootFolderPath = rootFolderPath;
}
if (searchOnAdd !== NO_CHANGE) {
changes.searchOnAdd = searchOnAdd === 'yes';
}
this.props.onUpdateSelectedPress(changes);
};
@ -109,15 +159,10 @@ class CollectionFooter extends Component {
monitor,
qualityProfileId,
minimumAvailability,
rootFolderPath
rootFolderPath,
searchOnAdd
} = this.state;
const monitoredOptions = [
{ key: NO_CHANGE, value: translate('NoChange'), disabled: true },
{ key: 'monitored', value: translate('Monitored') },
{ key: 'unmonitored', value: translate('Unmonitored') }
];
const selectedCount = selectedIds.length;
return (
@ -125,7 +170,7 @@ class CollectionFooter extends Component {
<div className={styles.inputContainer}>
<CollectionFooterLabel
label={translate('MonitorCollection')}
isSaving={isSaving}
isSaving={isSaving && monitored !== NO_CHANGE}
/>
<SelectInput
@ -140,7 +185,7 @@ class CollectionFooter extends Component {
<div className={styles.inputContainer}>
<CollectionFooterLabel
label={translate('MonitorMovies')}
isSaving={isSaving}
isSaving={isSaving && monitor !== NO_CHANGE}
/>
<SelectInput
@ -198,10 +243,25 @@ class CollectionFooter extends Component {
/>
</div>
<div className={styles.inputContainer}>
<CollectionFooterLabel
label={translate('SearchMoviesOnAdd')}
isSaving={isSaving && searchOnAdd !== NO_CHANGE}
/>
<SelectInput
name="searchOnAdd"
value={searchOnAdd}
values={searchOnAddOptions}
isDisabled={!selectedCount}
onChange={this.onInputChange}
/>
</div>
<div className={styles.buttonContainer}>
<div className={styles.buttonContainerContent}>
<CollectionFooterLabel
label={translate('CollectionsSelectedInterp', [selectedCount])}
label={translate('CountCollectionsSelected', { count: selectedCount })}
isSaving={false}
/>

View File

@ -347,8 +347,9 @@ export const actionHandlers = handleThunks({
monitored,
monitor,
qualityProfileId,
minimumAvailability,
rootFolderPath,
minimumAvailability
searchOnAdd
} = payload;
const response = {};
@ -369,6 +370,10 @@ export const actionHandlers = handleThunks({
response.minimumAvailability = minimumAvailability;
}
if (payload.hasOwnProperty('searchOnAdd')) {
response.searchOnAdd = searchOnAdd;
}
response.rootFolderPath = rootFolderPath;
response.collectionIds = collectionIds;

View File

@ -391,7 +391,7 @@
"CollectionShowOverviewsHelpText": "Mostra la vista general de la col·lecció",
"CloseCurrentModal": "Tanca el modal actual",
"CollectionShowDetailsHelpText": "Mostra l'estat i les propietats de la col·lecció",
"CollectionsSelectedInterp": "{0} Col·lecció(ns) seleccionades",
"CountCollectionsSelected": "{count} Col·lecció(ns) seleccionades",
"ColonReplacement": "Substitució de dos punts",
"ColonReplacementFormatHelpText": "Canvieu com {appName} gestiona la substitució de dos punts",
"Columns": "Columnes",

View File

@ -1081,7 +1081,7 @@
"CollectionShowOverviewsHelpText": "Zobrazit přehledy kolekcí",
"Database": "Databáze",
"Duration": "Trvání",
"CollectionsSelectedInterp": "Vybráno {0} kolekcí",
"CountCollectionsSelected": "Vybráno {0} kolekcí",
"CountImportListsSelected": "{count} vybraných seznamů pro import",
"CollectionShowDetailsHelpText": "Zobrazit stav a vlastnosti kolekce",
"AutoTaggingNegateHelpText": "Pokud je zaškrtnuto, pravidlo automatického označování se nepoužije, pokud odpovídá této podmínce {0}.",

View File

@ -1020,7 +1020,7 @@
"RssSyncIntervalHelpText": "Intervall in Minuten. Zum deaktivieren auf 0 setzen ( Dies wird das automatische Release erfassen deaktivieren )",
"CollectionOptions": "Sammlung Optionen",
"ChooseImportMode": "Wählen Sie den Importmodus aus",
"CollectionsSelectedInterp": "{0} Ausgewählte Sammlung(en)",
"CountCollectionsSelected": "{count} Ausgewählte Sammlung(en)",
"MovieCollectionMissingRoot": "Fehlender Stammordner für die Filmsammlung: {0}",
"EditCollection": "Sammlung bearbeiten",
"MonitoredCollectionHelpText": "Beobachten zur automatischen Aufnahme von Filmen aus dieser Sammlung in die Bibliothek",

View File

@ -975,7 +975,7 @@
"MonitorMovies": "Παρακολούθηση ταινίας",
"NoCollections": "Δεν βρέθηκαν ταινίες, για να ξεκινήσετε θα θέλετε να προσθέσετε μια νέα ταινία ή να εισαγάγετε ορισμένες υπάρχουσες",
"RssSyncIntervalHelpText": "Διάστημα σε λεπτά. Ρυθμίστε στο μηδέν για απενεργοποίηση (αυτό θα σταματήσει όλες τις αυτόματες αρπάξεις απελευθέρωσης)",
"CollectionsSelectedInterp": "Επιλέχθηκαν {0} συλλογές",
"CountCollectionsSelected": "Επιλέχθηκαν {0} συλλογές",
"MovieOnly": "Μόνο ταινία",
"ChooseImportMode": "Επιλέξτε Λειτουργία εισαγωγής",
"Duration": "Διάρκεια",

View File

@ -211,7 +211,6 @@
"CollectionShowOverviewsHelpText": "Show collection overviews",
"CollectionShowPostersHelpText": "Show Collection item posters",
"Collections": "Collections",
"CollectionsSelectedInterp": "{0} Collection(s) Selected",
"ColonReplacement": "Colon Replacement",
"ColonReplacementFormatHelpText": "Change how {appName} handles colon replacement",
"Columns": "Columns",
@ -234,6 +233,7 @@
"CopyUsingHardlinksMovieHelpText": "Hardlinks allow {appName} to import seeding torrents to the movie folder without taking extra disk space or copying the entire contents of the file. Hardlinks will only work if the source and destination are on the same volume",
"CouldNotConnectSignalR": "Could not connect to SignalR, UI won't update",
"CouldNotFindResults": "Couldn't find any results for '{term}'",
"CountCollectionsSelected": "{count} collection(s) selected",
"CountDownloadClientsSelected": "{count} download client(s) selected",
"CountImportListsSelected": "{count} import list(s) selected",
"CountIndexersSelected": "{count} indexer(s) selected",
@ -1461,6 +1461,7 @@
"SearchMissing": "Search Missing",
"SearchMovie": "Search Movie",
"SearchMoviesConfirmationMessageText": "Are you sure you want to run a search for {count} movie(s)?",
"SearchMoviesOnAdd": "Search Movies on Add",
"SearchOnAdd": "Search on Add",
"SearchOnAddCollectionHelpText": "Search for movies on this collection when added to library",
"SearchSelected": "Search Selected",

View File

@ -1027,7 +1027,7 @@
"RefreshMonitoredIntervalHelpText": "Cada cuánto actualizar las descargas monitoreadeas desde los clientes de descarga, mínimo 1 minuto",
"SearchOnAddCollectionHelpText": "Buscar películas en esta colección cuando se añada a la biblioteca",
"TotalMovies": "Películas Totales",
"CollectionsSelectedInterp": "{0} Colección(es) seleccionada(s)",
"CountCollectionsSelected": "{count} Colección(es) seleccionada(s)",
"EditCollection": "Editar Colección",
"MonitorCollection": "Monitorear Colección",
"MonitoredCollectionHelpText": "Monitorear para que las películas de esta colección se añadan automáticamente a la biblioteca",

View File

@ -1033,7 +1033,7 @@
"EditCollection": "Muokkaa kokoelmaa",
"SearchOnAddCollectionHelpText": "Etsi kokoelman elokuvia, kun ne lisätään kirjastoon.",
"ChooseImportMode": "Valitse tuontitila",
"CollectionsSelectedInterp": "{0} kokoelma(a) on valittu",
"CountCollectionsSelected": "{count} kokoelma(a) on valittu",
"MonitorCollection": "Valvo kokoelmaa",
"MonitoredCollectionHelpText": "Valvonta lisää kokoelman elokuvat kirjastoon automaattisesti.",
"MovieAndCollection": "Elokuva ja kokoelma",

View File

@ -1029,7 +1029,7 @@
"MonitorMovies": "Surveiller les films",
"NoCollections": "Aucune collection n'a été trouvée. Pour commencer, vous devez ajouter un nouveau film ou importer des films existants",
"RssSyncIntervalHelpText": "Intervalle en minutes. Régler à zéro pour désactiver (cela arrêtera tous les déclenchements automatiques)",
"CollectionsSelectedInterp": "{0} collection(s) sélectionnée(s)",
"CountCollectionsSelected": "{count} collection(s) sélectionnée(s)",
"ChooseImportMode": "Sélectionnez le mode d'importation",
"CollectionOptions": "Options de collection",
"CollectionShowDetailsHelpText": "Afficher l'état et les propriétés de la collection",

View File

@ -224,7 +224,7 @@
"CollectionShowDetailsHelpText": "Prikaži status i svojstva kolekcije",
"CollectionShowOverviewsHelpText": "Prikaži pregled kolekcije",
"CollectionShowPostersHelpText": "Prikaži Kolekciju postera",
"CollectionsSelectedInterp": "{0} Kolekcija odabrano",
"CountCollectionsSelected": "{count} Kolekcija odabrano",
"ColonReplacement": "Zamjena Zareza",
"ColonReplacementFormatHelpText": "izmijeni kako {appName} upravlja zamjenama zareza",
"Columns": "Stupci",

View File

@ -1039,7 +1039,7 @@
"ScrollMovies": "Filmek görgetése",
"ShowCollectionDetails": "Gyűjtemény állapotának megjelenítése",
"ShowOverview": "Áttekintés megjelenítése",
"CollectionsSelectedInterp": "{0} Gyűjtemény(ek) kiválasztva",
"CountCollectionsSelected": "{count} Gyűjtemény(ek) kiválasztva",
"MonitorCollection": "Gyűjtemény monitorozása",
"SearchOnAddCollectionHelpText": "Ebben a gyűjteményben található filmek keresése, a hozzáadás adás után",
"UnableToLoadCollections": "Nem sikerült betölteni a gyűjteményeket",

View File

@ -1021,7 +1021,7 @@
"Theme": "Tema",
"ShowCollectionDetails": "Mostra stato collezione",
"Waiting": "In attesa",
"CollectionsSelectedInterp": "{0} Collezione(i) Selezionate",
"CountCollectionsSelected": "{count} Collezione(i) Selezionate",
"CollectionShowOverviewsHelpText": "Mostra panoramica della collezione",
"ImdbVotes": "Voti IMDb",
"ImdbRating": "Valutazione IMDb",

View File

@ -138,7 +138,7 @@
"Close": "Lukk",
"Collection": "Samling",
"Collections": "Samlinger",
"CollectionsSelectedInterp": "{0} samling(er) valgt",
"CountCollectionsSelected": "{count} samling(er) valgt",
"ColonReplacement": "Kolon erstatntning",
"Columns": "Kolonner",
"Conditions": "Tilstander",

View File

@ -1019,7 +1019,7 @@
"MonitorMovies": "Monitor film",
"ApplicationURL": "Applicatie URL",
"ApplicationUrlHelpText": "De externe URL van deze applicatie inclusief http(s)://,Port en URL base",
"CollectionsSelectedInterp": "{0} Collectie(s) geselecteerd",
"CountCollectionsSelected": "{count} Collectie(s) geselecteerd",
"ChooseImportMode": "Kies Importmodus",
"CollectionOptions": "Collectieopties",
"CollectionShowDetailsHelpText": "Collectie status en details weergeven",

View File

@ -980,7 +980,7 @@
"OnApplicationUpdate": "Przy aktualizacji aplikacji",
"SelectReleaseGroup": "Wybierz grupę wydającą",
"SizeLimit": "Ograniczenie rozmiaru",
"CollectionsSelectedInterp": "Wybrane kolekcje: {0}",
"CountCollectionsSelected": "Wybrane kolekcje: {0}",
"ImdbVotes": "Głosy IMDb",
"ImdbRating": "Ocena IMDb",
"ImportListMissingRoot": "Brak katalogu głównego dla list importu: {rootFolderInfo}",

View File

@ -1029,7 +1029,7 @@
"MonitorMovies": "Monitorizar filmes",
"NoCollections": "Nenhuma coleção encontrada. Para iniciar, poderás adicionar um novo filme ou importar alguns já existentes",
"MovieAndCollection": "Filme e Coleção",
"CollectionsSelectedInterp": "{0} Coleções Selecionadas",
"CountCollectionsSelected": "{count} Coleções Selecionadas",
"EditCollection": "Editar Coleção",
"ChooseImportMode": "Selecionar Modo de Importação",
"InstanceName": "Nome da Instancia",

View File

@ -1034,7 +1034,7 @@
"MovieOnly": "Somente Filme",
"UnableToLoadCollections": "Não foi possível carregar as coleções",
"ChooseImportMode": "Escolha o modo de importação",
"CollectionsSelectedInterp": "{0} Coleção(ões) Selecionadas",
"CountCollectionsSelected": "{count} Coleção(ões) Selecionadas",
"EditCollection": "Editar Coleção",
"MonitorCollection": "Monitorar Coleção",
"MovieAndCollection": "Filme e Coleção",

View File

@ -1036,7 +1036,7 @@
"RefreshMonitoredIntervalHelpText": "Как часто обновлять отслеживаемые загрузки с клиентов загрузки, минимум 1 минута",
"Never": "Никогда",
"OriginalTitle": "Оригинальное название",
"CollectionsSelectedInterp": "{0} коллекция(ий) выбрано",
"CountCollectionsSelected": "{count} коллекция(ий) выбрано",
"UnableToLoadCollections": "Не удалось загрузить коллекции",
"OnMovieAdded": "Добавлено в фильм",
"OriginalLanguage": "Язык оригинала",

View File

@ -124,7 +124,7 @@
"Columns": "Stĺpce",
"CheckDownloadClientForDetails": "ďalšie podrobnosti nájdete v klientovi na sťahovanie",
"Collections": "Kolekcie",
"CollectionsSelectedInterp": "{0} Označených kolekcií",
"CountCollectionsSelected": "{count} Označených kolekcií",
"AnnouncedMsg": "Film je ohlásený",
"ChooseImportMode": "Zvoliť Import mód",
"ApplicationURL": "URL aplikácie",

View File

@ -563,7 +563,7 @@
"SearchMissing": "Пошук відсутній",
"StartImport": "Розпочати імпорт",
"System": "Система",
"CollectionsSelectedInterp": "Вибрано колекцій: {0}",
"CountCollectionsSelected": "Вибрано колекцій: {0}",
"DeleteNotification": "Видалити сповіщення",
"DeleteFileLabel": "Видалити файл фільму {0}",
"DeleteFilesHelpText": "Видалити файли фільмів і папку фільмів",

View File

@ -1028,7 +1028,7 @@
"UnableToLoadCollections": "不能加载收藏",
"Collections": "集合",
"AllCollectionsHiddenDueToFilter": "由于应用了过滤器,所有集合都被隐藏。",
"CollectionsSelectedInterp": "已选择 {0} 个集合",
"CountCollectionsSelected": "已选择 {0} 个集合",
"ChooseImportMode": "选择导入方式",
"EditCollection": "编辑集合",
"MonitorCollection": "监视集合",

View File

@ -122,6 +122,11 @@ namespace Radarr.Api.V3.Collections
collection.RootFolderPath = resource.RootFolderPath;
}
if (resource.SearchOnAdd.HasValue)
{
collection.SearchOnAdd = resource.SearchOnAdd.Value;
}
if (resource.MonitorMovies.HasValue)
{
var movies = _movieService.GetMoviesByCollectionTmdbId(collection.TmdbId);

View File

@ -8,6 +8,7 @@ namespace Radarr.Api.V3.Collections
public List<int> CollectionIds { get; set; }
public bool? Monitored { get; set; }
public bool? MonitorMovies { get; set; }
public bool? SearchOnAdd { get; set; }
public int? QualityProfileId { get; set; }
public string RootFolderPath { get; set; }
public MovieStatusType? MinimumAvailability { get; set; }