When the DB fails to save, log out all the series the user should look into for constraint issues and push a message to the admins connected to webui. (#687)

This commit is contained in:
Joseph Milazzo 2021-10-18 08:45:39 -07:00 committed by GitHub
parent 8b03e1d240
commit 6adf092668
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 2 deletions

View file

@ -18,7 +18,8 @@ export enum EVENTS {
SeriesAdded = 'SeriesAdded',
ScanLibraryProgress = 'ScanLibraryProgress',
OnlineUsers = 'OnlineUsers',
SeriesAddedToCollection = 'SeriesAddedToCollection'
SeriesAddedToCollection = 'SeriesAddedToCollection',
ScanLibraryError = 'ScanLibraryError'
}
export interface Message<T> {
@ -93,6 +94,16 @@ export class MessageHubService {
});
});
this.hubConnection.on(EVENTS.ScanLibraryError, resp => {
this.messagesSource.next({
event: EVENTS.ScanLibraryError,
payload: resp.body
});
if (this.isAdmin) {
this.toastr.error('Library Scan had a critical error. Some series were not saved. Check logs');
}
});
this.hubConnection.on(EVENTS.SeriesAdded, resp => {
this.messagesSource.next({
event: EVENTS.SeriesAdded,