Lidarr/frontend/src/Settings/MediaManagement/MediaManagement.js

495 lines
18 KiB
JavaScript
Raw Normal View History

2017-09-04 02:20:56 +00:00
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FieldSet from 'Components/FieldSet';
import Form from 'Components/Form/Form';
import FormGroup from 'Components/Form/FormGroup';
import FormInputGroup from 'Components/Form/FormInputGroup';
2020-09-07 01:33:10 +00:00
import FormLabel from 'Components/Form/FormLabel';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import PageContent from 'Components/Page/PageContent';
import PageContentBody from 'Components/Page/PageContentBody';
import { inputTypes, sizes } from 'Helpers/Props';
import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector';
2021-10-03 15:01:09 +00:00
import translate from 'Utilities/String/translate';
2017-09-04 02:20:56 +00:00
import NamingConnector from './Naming/NamingConnector';
2020-09-07 01:33:10 +00:00
import RootFoldersConnector from './RootFolder/RootFoldersConnector';
2017-09-04 02:20:56 +00:00
const rescanAfterRefreshOptions = [
{ key: 'always', value: translate('Always') },
{ key: 'afterManual', value: translate('AfterManualRefresh') },
{ key: 'never', value: translate('Never') }
];
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
const allowFingerprintingOptions = [
{ key: 'allFiles', value: translate('Always') },
{ key: 'newFiles', value: translate('ForNewImportsOnly') },
{ key: 'never', value: translate('Never') }
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
];
const downloadPropersAndRepacksOptions = [
{ key: 'preferAndUpgrade', value: translate('PreferAndUpgrade') },
{ key: 'doNotUpgrade', value: translate('DoNotUpgradeAutomatically') },
{ key: 'doNotPrefer', value: translate('DoNotPrefer') }
];
const fileDateOptions = [
{ key: 'none', value: translate('None') },
{ key: 'albumReleaseDate', value: translate('AlbumReleaseDate') }
];
2017-09-04 02:20:56 +00:00
class MediaManagement extends Component {
//
// Render
render() {
const {
advancedSettings,
isFetching,
error,
settings,
hasSettings,
isWindows,
2017-09-04 02:20:56 +00:00
onInputChange,
onSavePress,
...otherProps
} = this.props;
return (
2021-10-03 15:01:09 +00:00
<PageContent title={translate('MediaManagementSettings')}>
2017-09-04 02:20:56 +00:00
<SettingsToolbarConnector
advancedSettings={advancedSettings}
{...otherProps}
onSavePress={onSavePress}
/>
<PageContentBody>
2020-02-09 19:15:43 +00:00
<RootFoldersConnector />
<NamingConnector />
2017-09-04 02:20:56 +00:00
{
isFetching ?
2021-10-03 15:01:09 +00:00
<FieldSet legend={translate('NamingSettings')}>
<LoadingIndicator />
</FieldSet> : null
2017-09-04 02:20:56 +00:00
}
{
!isFetching && error ?
2021-10-03 15:01:09 +00:00
<FieldSet legend={translate('NamingSettings')}>
<div>
{translate('UnableToLoadMediaManagementSettings')}
</div>
</FieldSet> : null
2017-09-04 02:20:56 +00:00
}
{
hasSettings && !isFetching && !error ?
2017-09-04 02:20:56 +00:00
<Form
id="mediaManagementSettings"
{...otherProps}
>
{
advancedSettings ?
2021-10-03 15:01:09 +00:00
<FieldSet legend={translate('Folders')}>
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('CreateEmptyArtistFolders')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="createEmptyArtistFolders"
2021-10-03 15:01:09 +00:00
helpText={translate('CreateEmptyArtistFoldersHelpText')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.createEmptyArtistFolders}
2017-09-04 02:20:56 +00:00
/>
</FormGroup>
2018-03-15 01:28:46 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('DeleteEmptyFolders')}
</FormLabel>
2018-03-15 01:28:46 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="deleteEmptyFolders"
2021-10-03 15:01:09 +00:00
helpText={translate('DeleteEmptyFoldersHelpText')}
2018-03-15 01:28:46 +00:00
onChange={onInputChange}
{...settings.deleteEmptyFolders}
/>
</FormGroup>
</FieldSet> : null
2017-09-04 02:20:56 +00:00
}
{
advancedSettings ?
2017-09-04 02:20:56 +00:00
<FieldSet
2021-10-03 15:01:09 +00:00
legend={translate('Importing')}
2017-09-04 02:20:56 +00:00
>
{
!isWindows &&
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('SkipFreeSpaceCheck')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="skipFreeSpaceCheckWhenImporting"
2021-10-03 15:01:09 +00:00
helpText={translate('SkipFreeSpaceCheckWhenImportingHelpText')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.skipFreeSpaceCheckWhenImporting}
/>
</FormGroup>
}
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('MinimumFreeSpace')}
</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
unit='MB'
name="minimumFreeSpaceWhenImporting"
2021-10-03 15:01:09 +00:00
helpText={translate('MinimumFreeSpaceWhenImportingHelpText')}
onChange={onInputChange}
{...settings.minimumFreeSpaceWhenImporting}
/>
</FormGroup>
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('UseHardlinksInsteadOfCopy')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="copyUsingHardlinks"
2021-10-03 15:01:09 +00:00
helpText={translate('CopyUsingHardlinksHelpText')}
helpTextWarning={translate('CopyUsingHardlinksHelpTextWarning')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.copyUsingHardlinks}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
<FormLabel>{translate('ImportUsingScript')}</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="useScriptImport"
helpText={translate('UseScriptImportHelpText')}
onChange={onInputChange}
{...settings.useScriptImport}
/>
</FormGroup>
{
settings.useScriptImport.value ?
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>{translate('ImportScriptPath')}</FormLabel>
<FormInputGroup
type={inputTypes.PATH}
includeFiles={true}
name="scriptImportPath"
helpText={translate('ScriptImportPathHelpText')}
onChange={onInputChange}
{...settings.scriptImportPath}
/>
</FormGroup> : null
}
2017-09-04 02:20:56 +00:00
<FormGroup size={sizes.MEDIUM}>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('ImportExtraFiles')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="importExtraFiles"
2021-10-03 15:01:09 +00:00
helpText={translate('ImportExtraFilesHelpText')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.importExtraFiles}
/>
</FormGroup>
{
settings.importExtraFiles.value ?
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('ImportExtraFiles')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.TEXT}
name="extraFileExtensions"
helpTexts={[
2021-10-03 15:01:09 +00:00
translate('ExtraFileExtensionsHelpTexts1'),
translate('ExtraFileExtensionsHelpTexts2')
]}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.extraFileExtensions}
/>
</FormGroup> : null
2017-09-04 02:20:56 +00:00
}
</FieldSet> : null
2017-09-04 02:20:56 +00:00
}
<FieldSet
2021-10-03 15:01:09 +00:00
legend={translate('FileManagement')}
2017-09-04 02:20:56 +00:00
>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('PropersAndRepacks')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.SELECT}
name="downloadPropersAndRepacks"
helpTexts={[
2021-10-03 15:01:09 +00:00
translate('DownloadPropersAndRepacksHelpTexts1'),
translate('DownloadPropersAndRepacksHelpTexts2')
]}
helpTextWarning={
settings.downloadPropersAndRepacks.value === 'doNotPrefer' ?
2023-04-29 21:02:00 +00:00
translate('DownloadPropersAndRepacksHelpTextWarning') :
undefined
}
values={downloadPropersAndRepacksOptions}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.downloadPropersAndRepacks}
2017-09-04 02:20:56 +00:00
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('WatchRootFoldersForFileChanges')}
</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="watchLibraryForChanges"
2021-10-03 15:01:09 +00:00
helpText={translate('WatchLibraryForChangesHelpText')}
onChange={onInputChange}
{...settings.watchLibraryForChanges}
/>
</FormGroup>
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('RescanArtistFolderAfterRefresh')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
type={inputTypes.SELECT}
name="rescanAfterRefresh"
2021-10-03 15:01:09 +00:00
helpText={translate('RescanAfterRefreshHelpText')}
helpTextWarning={translate('RescanAfterRefreshHelpTextWarning')}
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
values={rescanAfterRefreshOptions}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
{...settings.rescanAfterRefresh}
2017-09-04 02:20:56 +00:00
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('AllowFingerprinting')}
</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
name="allowFingerprinting"
2021-10-03 15:01:09 +00:00
helpText={translate('AllowFingerprintingHelpText')}
helpTextWarning={translate('AllowFingerprintingHelpTextWarning')}
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
values={allowFingerprintingOptions}
onChange={onInputChange}
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
{...settings.allowFingerprinting}
/>
</FormGroup>
2017-09-04 02:20:56 +00:00
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('ChangeFileDate')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.SELECT}
name="fileDate"
2021-10-03 15:01:09 +00:00
helpText={translate('FileDateHelpText')}
2017-09-04 02:20:56 +00:00
values={fileDateOptions}
onChange={onInputChange}
{...settings.fileDate}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('RecyclingBin')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.PATH}
name="recycleBin"
2021-10-03 15:01:09 +00:00
helpText={translate('RecycleBinHelpText')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.recycleBin}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('RecyclingBinCleanup')}
</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="recycleBinCleanupDays"
2021-10-03 15:01:09 +00:00
helpText={translate('RecycleBinCleanupDaysHelpText')}
helpTextWarning={translate('RecycleBinCleanupDaysHelpTextWarning')}
min={0}
onChange={onInputChange}
{...settings.recycleBinCleanupDays}
/>
</FormGroup>
2017-09-04 02:20:56 +00:00
</FieldSet>
{
advancedSettings && !isWindows ?
2017-09-04 02:20:56 +00:00
<FieldSet
2021-10-03 15:01:09 +00:00
legend={translate('Permissions')}
2017-09-04 02:20:56 +00:00
>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('SetPermissions')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.CHECK}
name="setPermissionsLinux"
2021-10-03 15:01:09 +00:00
helpText={translate('SetPermissionsLinuxHelpText')}
helpTextWarning={translate('SetPermissionsLinuxHelpTextWarning')}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.setPermissionsLinux}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('ChmodFolder')}
</FormLabel>
<FormInputGroup
type={inputTypes.UMASK}
name="chmodFolder"
2021-10-03 15:01:09 +00:00
helpText={translate('ChmodFolderHelpText')}
helpTextWarning={translate('ChmodFolderHelpTextWarning')}
onChange={onInputChange}
{...settings.chmodFolder}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
2021-10-03 15:01:09 +00:00
<FormLabel>
{translate('ChownGroup')}
</FormLabel>
2017-09-04 02:20:56 +00:00
<FormInputGroup
type={inputTypes.TEXT}
name="chownGroup"
2021-10-03 15:01:09 +00:00
helpText={translate('ChownGroupHelpText')}
helpTextWarning={translate('ChownGroupHelpTextWarning')}
values={fileDateOptions}
2017-09-04 02:20:56 +00:00
onChange={onInputChange}
{...settings.chownGroup}
2017-09-04 02:20:56 +00:00
/>
</FormGroup>
</FieldSet> : null
2017-09-04 02:20:56 +00:00
}
</Form> : null
2017-09-04 02:20:56 +00:00
}
</PageContentBody>
2017-09-04 02:20:56 +00:00
</PageContent>
);
}
}
MediaManagement.propTypes = {
advancedSettings: PropTypes.bool.isRequired,
isFetching: PropTypes.bool.isRequired,
error: PropTypes.object,
settings: PropTypes.object.isRequired,
hasSettings: PropTypes.bool.isRequired,
isWindows: PropTypes.bool.isRequired,
2017-09-04 02:20:56 +00:00
onSavePress: PropTypes.func.isRequired,
onInputChange: PropTypes.func.isRequired
};
export default MediaManagement;