Various UI Fixes and Updates

Closes #188
Closes #185
Closes #187
This commit is contained in:
Qstick 2018-01-25 22:01:53 -05:00
parent 3beac03c00
commit 54e9f88648
89 changed files with 2354 additions and 995 deletions

View file

@ -80,7 +80,7 @@ class SignalRConnector extends Component {
componentDidMount() {
console.log('Starting signalR');
this.signalRconnection = $.connection('/signalr', { apiKey: window.Sonarr.apiKey });
this.signalRconnection = $.connection('/signalr', { apiKey: window.Lidarr.apiKey });
this.signalRconnection.stateChanged(this.onStateChanged);
this.signalRconnection.received(this.onReceived);
@ -232,11 +232,12 @@ class SignalRConnector extends Component {
}
handleTrackFile = (body) => {
const section = 'trackFiles';
if (body.action === 'updated') {
this.props.updateItem({
section: 'trackFiles',
...body.resource
});
this.props.updateItem({ section, ...body.resource });
} else if (body.action === 'deleted') {
this.props.removeItem({ section, id: body.resource.id });
}
}
@ -335,7 +336,7 @@ class SignalRConnector extends Component {
}
onReconnecting = () => {
if (window.Sonarr.unloading) {
if (window.Lidarr.unloading) {
return;
}
@ -349,7 +350,7 @@ class SignalRConnector extends Component {
}
onDisconnected = () => {
if (window.Sonarr.unloading) {
if (window.Lidarr.unloading) {
return;
}