Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Lidarr/commit/e41f884153e9e082a8e8dd742f8b0693d915e0b3
You should set ROOT_URL correctly, otherwise the web may not work correctly.
16 changed files with
57 additions and
73 deletions
@ -1,10 +1,9 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import { registerPagePopulator , unregisterPagePopulator } from 'Utilities/pagePopulator' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import * as blacklistActions from 'Store/Actions/blacklistActions' ;
import { executeCommand } from 'Store/Actions/commandActions' ;
import * as commandNames from 'Commands/commandNames' ;
@ -13,10 +12,8 @@ import Blacklist from './Blacklist';
function createMapStateToProps ( ) {
return createSelector (
( state ) => state . blacklist ,
createCommandsSelector ( ) ,
( blacklist , commands ) => {
const isClearingBlacklistExecuting = _ . some ( commands , { name : commandNames . CLEAR _BLACKLIST } ) ;
createCommandExecutingSelector ( commandNames . CLEAR _BLACKLIST ) ,
( blacklist , isClearingBlacklistExecuting ) => {
return {
isClearingBlacklistExecuting ,
... blacklist
@ -6,7 +6,7 @@ import { createSelector } from 'reselect';
import { registerPagePopulator , unregisterPagePopulator } from 'Utilities/pagePopulator' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems' ;
import selectUniqueIds from 'Utilities/Object/selectUniqueIds' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import { executeCommand } from 'Store/Actions/commandActions' ;
import * as queueActions from 'Store/Actions/queueActions' ;
import { fetchAlbums , clearAlbums } from 'Store/Actions/albumActions' ;
@ -17,10 +17,8 @@ function createMapStateToProps() {
return createSelector (
( state ) => state . albums ,
( state ) => state . queue . paged ,
createCommandsSelector ( ) ,
( albums , queue , commands ) => {
const isCheckForFinishedDownloadExecuting = _ . some ( commands , { name : commandNames . CHECK _FOR _FINISHED _DOWNLOAD } ) ;
createCommandExecutingSelector ( commandNames . CHECK _FOR _FINISHED _DOWNLOAD ) ,
( albums , queue , isCheckForFinishedDownloadExecuting ) => {
return {
isAlbumsFetching : albums . isFetching ,
isAlbumsPopulated : albums . isPopulated ,
@ -1,6 +1,6 @@
import _ from 'lodash' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import { isCommandExecuting } from 'Utilities/Command' ;
import createArtistSelector from 'Store/Selectors/createArtistSelector' ;
import createCommandsSelector from 'Store/Selectors/createCommandsSelector' ;
import { executeCommand } from 'Store/Actions/commandActions' ;
@ -13,14 +13,17 @@ function createMapStateToProps() {
createArtistSelector ( ) ,
createCommandsSelector ( ) ,
( albumId , artist , commands ) => {
const isSearching = _. some ( commands , ( command ) => {
const isSearching = commands. some ( ( command ) => {
const albumSearch = command . name === commandNames . ALBUM _SEARCH ;
if ( ! albumSearch ) {
return false ;
}
return command . body . albumIds . indexOf ( albumId ) > - 1 ;
return (
isCommandExecuting ( command ) &&
command . body . albumIds . indexOf ( albumId ) > - 1
) ;
} ) ;
return {
@ -3,17 +3,13 @@ import { connect } from 'react-redux';
import { createSelector } from 'reselect' ;
import createArtistSelector from 'Store/Selectors/createArtistSelector' ;
import createTrackFileSelector from 'Store/Selectors/createTrackFileSelector' ;
import createCommandsSelector from 'Store/Selectors/createCommandsSelector' ;
import AlbumRow from './AlbumRow' ;
function createMapStateToProps ( ) {
return createSelector (
( state , { id } ) => id ,
( state , { sceneSeasonNumber } ) => sceneSeasonNumber ,
createArtistSelector ( ) ,
createTrackFileSelector ( ) ,
createCommandsSelector ( ) ,
( id , sceneSeasonNumber , artist , trackFile , commands ) => {
( artist , trackFile ) => {
return {
foreignArtistId : artist . foreignArtistId ,
artistMonitored : artist . monitored ,
@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import { isCommandExecuting } from 'Utilities/Command' ;
import createArtistSelector from 'Store/Selectors/createArtistSelector' ;
import createCommandsSelector from 'Store/Selectors/createCommandsSelector' ;
import createQualityProfileSelector from 'Store/Selectors/createQualityProfileSelector' ;
@ -20,9 +21,12 @@ function createMapStateToProps() {
createMetadataProfileSelector ( ) ,
createCommandsSelector ( ) ,
( artist , qualityProfile , languageProfile , metadataProfile , commands ) => {
const isRefreshingArtist = _ . some ( commands , ( command ) => {
return command . name === commandNames . REFRESH _ARTIST &&
command . body . artistId === artist . id ;
const isRefreshingArtist = commands . some ( ( command ) => {
return (
command . name === commandNames . REFRESH _ARTIST &&
command . body . artistId === artist . id &&
isCommandExecuting ( command )
) ;
} ) ;
const latestAlbum = _ . maxBy ( artist . albums , ( album ) => album . releaseDate ) ;
@ -6,6 +6,10 @@
color : inherit ;
}
. info {
color : $ infoColor ;
}
. success {
color : $ successColor ;
}
@ -1,10 +1,9 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import createSettingsSectionSelector from 'Store/Selectors/createSettingsSectionSelector' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import createSystemStatusSelector from 'Store/Selectors/createSystemStatusSelector' ;
import { setGeneralSettingsValue , saveGeneralSettings , fetchGeneralSettings } from 'Store/Actions/settingsActions' ;
import { clearPendingChanges } from 'Store/Actions/baseActions' ;
@ -19,11 +18,9 @@ function createMapStateToProps() {
return createSelector (
( state ) => state . settings . advancedSettings ,
createSettingsSectionSelector ( SECTION ) ,
createCommand sSelector( ) ,
createCommand ExecutingSelector( commandNames . RESET _API _KEY ) ,
createSystemStatusSelector ( ) ,
( advancedSettings , sectionSettings , commands , systemStatus ) => {
const isResettingApiKey = _ . some ( commands , { name : commandNames . RESET _API _KEY } ) ;
( advancedSettings , sectionSettings , isResettingApiKey , systemStatus ) => {
return {
advancedSettings ,
isResettingApiKey ,
@ -1,12 +1,11 @@
import { createSelector } from 'reselect' ;
import { findCommand, isCommandExecuting } from 'Utilities/Command' ;
import createCommand s Selector from './createCommand s Selector';
import { isCommandExecuting } from 'Utilities/Command' ;
import createCommand Selector from './createCommand Selector';
function createCommandExecutingSelector ( name , contraints = { } ) {
return createSelector (
createCommandsSelector ( ) ,
( commands ) => {
const command = findCommand ( commands , { name , ... contraints } ) ;
createCommandSelector ( name , contraints ) ,
( command ) => {
return isCommandExecuting ( command ) ;
}
) ;
@ -6,7 +6,7 @@ function createCommandSelector(name, contraints = {}) {
return createSelector (
createCommandsSelector ( ) ,
( commands ) => {
return ! ! findCommand ( commands , { name , ... contraints } ) ;
return findCommand ( commands , { name , ... contraints } ) ;
}
) ;
}
@ -1,9 +1,8 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import { fetchBackups , deleteBackup } from 'Store/Actions/systemActions' ;
import { executeCommand } from 'Store/Actions/commandActions' ;
import * as commandNames from 'Commands/commandNames' ;
@ -12,8 +11,8 @@ import Backups from './Backups';
function createMapStateToProps ( ) {
return createSelector (
( state ) => state . system . backups ,
createCommand sSelector( ) ,
( backups , commands ) => {
createCommand ExecutingSelector( commandNames . BACKUP ) ,
( backups , backupExecuting ) => {
const {
isFetching ,
isPopulated ,
@ -21,8 +20,6 @@ function createMapStateToProps() {
items
} = backups ;
const backupExecuting = _ . some ( commands , { name : commandNames . BACKUP } ) ;
return {
isFetching ,
isPopulated ,
@ -1,9 +1,8 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import { executeCommand } from 'Store/Actions/commandActions' ;
import * as systemActions from 'Store/Actions/systemActions' ;
import * as commandNames from 'Commands/commandNames' ;
@ -12,10 +11,8 @@ import LogsTable from './LogsTable';
function createMapStateToProps ( ) {
return createSelector (
( state ) => state . system . logs ,
createCommandsSelector ( ) ,
( logs , commands ) => {
const clearLogExecuting = _ . some ( commands , { name : commandNames . CLEAR _LOGS } ) ;
createCommandExecutingSelector ( commandNames . CLEAR _LOGS ) ,
( logs , clearLogExecuting ) => {
return {
clearLogExecuting ,
... logs
@ -1,10 +1,9 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import combinePath from 'Utilities/String/combinePath' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import { executeCommand } from 'Store/Actions/commandActions' ;
import { fetchLogFiles } from 'Store/Actions/systemActions' ;
import * as commandNames from 'Commands/commandNames' ;
@ -14,8 +13,8 @@ function createMapStateToProps() {
return createSelector (
( state ) => state . system . logFiles ,
( state ) => state . system . status . item ,
createCommand sSelector( ) ,
( logFiles , status , comman ds) => {
createCommand ExecutingSelector( commandNames . DELETE _LOG _FILES ) ,
( logFiles , status , deleteFile sExecuting ) => {
const {
isFetching ,
items
@ -26,8 +25,6 @@ function createMapStateToProps() {
isWindows
} = status ;
const deleteFilesExecuting = _ . some ( commands , { name : commandNames . DELETE _LOG _FILES } ) ;
return {
isFetching ,
items ,
@ -1,10 +1,9 @@
import _ from 'lodash' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import combinePath from 'Utilities/String/combinePath' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import { executeCommand } from 'Store/Actions/commandActions' ;
import { fetchUpdateLogFiles } from 'Store/Actions/systemActions' ;
import * as commandNames from 'Commands/commandNames' ;
@ -14,15 +13,13 @@ function createMapStateToProps() {
return createSelector (
( state ) => state . system . updateLogFiles ,
( state ) => state . system . status . item ,
createCommand sSelector( ) ,
( updateLogFiles , status , comman ds) => {
createCommand ExecutingSelector( commandNames . DELETE _UPDATE _LOG _FILES ) ,
( updateLogFiles , status , deleteFile sExecuting ) => {
const {
isFetching ,
items
} = updateLogFiles ;
const deleteFilesExecuting = _ . some ( commands , { name : commandNames . DELETE _UPDATE _LOG _FILES } ) ;
const {
appData ,
isWindows
@ -7,7 +7,7 @@ import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePo
import getFilterValue from 'Utilities/Filter/getFilterValue' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems' ;
import selectUniqueIds from 'Utilities/Object/selectUniqueIds' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import * as wantedActions from 'Store/Actions/wantedActions' ;
import { executeCommand } from 'Store/Actions/commandActions' ;
import { fetchQueueDetails , clearQueueDetails } from 'Store/Actions/queueActions' ;
@ -18,9 +18,8 @@ import CutoffUnmet from './CutoffUnmet';
function createMapStateToProps ( ) {
return createSelector (
( state ) => state . wanted . cutoffUnmet ,
createCommandsSelector ( ) ,
( cutoffUnmet , commands ) => {
const isSearchingForCutoffUnmetAlbums = _ . some ( commands , { name : commandNames . CUTOFF _UNMET _ALBUM _SEARCH } ) ;
createCommandExecutingSelector ( commandNames . CUTOFF _UNMET _ALBUM _SEARCH ) ,
( cutoffUnmet , isSearchingForCutoffUnmetAlbums ) => {
return {
isSearchingForCutoffUnmetAlbums ,
@ -7,7 +7,7 @@ import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePo
import getFilterValue from 'Utilities/Filter/getFilterValue' ;
import hasDifferentItems from 'Utilities/Object/hasDifferentItems' ;
import selectUniqueIds from 'Utilities/Object/selectUniqueIds' ;
import createCommand sSelector from 'Store/Selectors/createCommands Selector';
import createCommand ExecutingSelector from 'Store/Selectors/createCommandExecuting Selector';
import * as wantedActions from 'Store/Actions/wantedActions' ;
import { executeCommand } from 'Store/Actions/commandActions' ;
import { fetchQueueDetails , clearQueueDetails } from 'Store/Actions/queueActions' ;
@ -17,9 +17,8 @@ import Missing from './Missing';
function createMapStateToProps ( ) {
return createSelector (
( state ) => state . wanted . missing ,
createCommandsSelector ( ) ,
( missing , commands ) => {
const isSearchingForMissingAlbums = _ . some ( commands , { name : commandNames . MISSING _ALBUM _SEARCH } ) ;
createCommandExecutingSelector ( commandNames . MISSING _ALBUM _SEARCH ) ,
( missing , isSearchingForMissingAlbums ) => {
return {
isSearchingForMissingAlbums ,
@ -79,15 +79,9 @@ namespace Lidarr.Api.V1.Commands
{
_pendingUpdates [ message . Command . Id ] = message . Command . ToResource ( ) ;
}
_debouncer . Execute ( ) ;
}
if ( message . Command . Name = = typeof ( MessagingCleanupCommand ) . Name . Replace ( "Command" , "" ) & &
message . Command . Status = = CommandStatus . Completed )
{
BroadcastResourceChange ( ModelAction . Sync ) ;
_debouncer . Execute ( ) ;
}
}
private void SendUpdates ( )
@ -100,6 +94,12 @@ namespace Lidarr.Api.V1.Commands
foreach ( var pendingUpdate in pendingUpdates )
{
BroadcastResourceChange ( ModelAction . Updated , pendingUpdate ) ;
if ( pendingUpdate . Name = = typeof ( MessagingCleanupCommand ) . Name . Replace ( "Command" , "" ) & &
pendingUpdate . Status = = CommandStatus . Completed )
{
BroadcastResourceChange ( ModelAction . Sync ) ;
}
}
}
}