Shakeout Testing Part 1 (#1052)
* Have language from epubs populate metadata * series detail needs to reload the underlying volumes when scan event comes in, not just metadata. * Added Id to chapter detail modal (for debugging) * Implement IDisposable on applicable Unit Tests * Removed unused using statements * Fixed a bug where images would flash like crazy during a scan because the code to refresh the underlying image wasn't checking the entity type or Id. * When filtering rating, only apply the filter to your account. * Removed Disposable on tests
This commit is contained in:
parent
1f8f6f6fac
commit
2b0d47d15e
25 changed files with 102 additions and 49 deletions
|
@ -3,5 +3,5 @@
|
|||
*/
|
||||
export interface CoverUpdateEvent {
|
||||
id: number;
|
||||
entityType: 'series' | 'chapter' | 'volume' | 'collection';
|
||||
entityType: 'series' | 'chapter' | 'volume' | 'collectionTag';
|
||||
}
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
|
||||
<!-- Arc Information -->
|
||||
|
||||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
Id: {{chapter.id}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
|
|
|
@ -203,10 +203,7 @@ export class SeriesDetailComponent implements OnInit, OnDestroy {
|
|||
} else if (event.event === EVENTS.ScanSeries) {
|
||||
const seriesCoverUpdatedEvent = event.payload as ScanSeriesEvent;
|
||||
if (seriesCoverUpdatedEvent.seriesId === this.series.id) {
|
||||
this.seriesService.getMetadata(this.series.id).pipe(take(1)).subscribe(metadata => {
|
||||
this.seriesMetadata = metadata;
|
||||
this.createHTML();
|
||||
});
|
||||
this.loadSeries(seriesId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { CoverUpdateEvent } from 'src/app/_models/events/cover-update-event';
|
||||
import { ImageService } from 'src/app/_services/image.service';
|
||||
import { EVENTS, MessageHubService } from 'src/app/_services/message-hub.service';
|
||||
|
||||
|
@ -46,7 +47,13 @@ export class ImageComponent implements OnChanges, OnDestroy {
|
|||
constructor(public imageService: ImageService, private renderer: Renderer2, private hubService: MessageHubService) {
|
||||
this.hubService.messages$.pipe(takeUntil(this.onDestroy)).subscribe(res => {
|
||||
if (res.event === EVENTS.CoverUpdate) {
|
||||
this.imageUrl = this.imageService.randomize(this.imageUrl);
|
||||
const updateEvent = res.payload as CoverUpdateEvent;
|
||||
if (this.imageUrl === undefined || this.imageUrl === null || this.imageUrl === '') return;
|
||||
|
||||
const tokens = this.imageUrl.split(updateEvent.entityType + 'Id=');
|
||||
if (tokens.length > 1 && tokens[1] === (updateEvent.id + '')) {
|
||||
this.imageUrl = this.imageService.randomize(this.imageUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue