Skip to content

Commit

Permalink
Fixed a bug from last PR where blank globs could get passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
majora2007 committed Nov 20, 2023
1 parent 31645c8 commit 3625fa2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
3 changes: 2 additions & 1 deletion API/Services/Tasks/Scanner/ParseScannedFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ public async Task ProcessFiles(string folderPath, bool scanDirectoryByDirectory,
if (library.LibraryExcludePatterns.Count != 0)
{
matcher ??= new GlobMatcher();
foreach (var pattern in library.LibraryExcludePatterns)
foreach (var pattern in library.LibraryExcludePatterns.Where(p => !string.IsNullOrEmpty(p.Pattern)))
{

matcher.AddExclude(pattern.Pattern);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,25 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(DoubleRendererComponent, { static: false }) doubleRenderer!: DoubleRendererComponent;
@ViewChild(DoubleReverseRendererComponent, { static: false }) doubleReverseRenderer!: DoubleReverseRendererComponent;
@ViewChild(DoubleNoCoverRendererComponent, { static: false }) doubleNoCoverRenderer!: DoubleNoCoverRendererComponent;

private readonly destroyRef = inject(DestroyRef);
private readonly route = inject(ActivatedRoute);
private readonly router = inject(Router);
private readonly accountService = inject(AccountService);
private readonly formBuilder = inject(FormBuilder);
private readonly navService = inject(NavService);
private readonly modalService = inject(NgbModal);
private readonly cdRef = inject(ChangeDetectorRef);
private readonly toastr = inject(ToastrService);
public readonly readerService = inject(ReaderService);
public readonly utilityService = inject(UtilityService);
public readonly mangaReaderService = inject(ManagaReaderService);

protected readonly KeyDirection = KeyDirection;
protected readonly ReaderMode = ReaderMode;
protected readonly LayoutMode = LayoutMode;
protected readonly ReadingDirection = ReadingDirection;
protected readonly Breakpoint = Breakpoint;

libraryId!: number;
seriesId!: number;
Expand Down Expand Up @@ -207,12 +225,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
*/
canvasImage = new Image();

/**
* Dictates if we use render with canvas or with image.
* @remarks This is only for Splitting.
*/
//renderWithCanvas: boolean = false;

/**
* A circular array of size PREFETCH_PAGES. Maintains prefetched Images around the current page to load from to avoid loading animation.
* @see CircularArray
Expand Down Expand Up @@ -440,12 +452,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
return 'right-side';
}


get KeyDirection() { return KeyDirection; }
get ReaderMode() { return ReaderMode; }
get LayoutMode() { return LayoutMode; }
get ReadingDirection() { return ReadingDirection; }
get Breakpoint() { return Breakpoint; }
get FittingOption() { return this.generalSettingsForm?.get('fittingOption')?.value || FITTING_OPTION.HEIGHT; }
get ReadingAreaWidth() {
return this.readingArea?.nativeElement.scrollWidth - this.readingArea?.nativeElement.clientWidth;
Expand All @@ -455,12 +461,8 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
return this.readingArea?.nativeElement.scrollHeight - this.readingArea?.nativeElement.clientHeight;
}

constructor(private route: ActivatedRoute, private router: Router, private accountService: AccountService,
public readerService: ReaderService, private formBuilder: FormBuilder, private navService: NavService,
private toastr: ToastrService, private memberService: MemberService,
public utilityService: UtilityService, @Inject(DOCUMENT) private document: Document,
private modalService: NgbModal, private readonly cdRef: ChangeDetectorRef,
public mangaReaderService: ManagaReaderService) {

constructor(@Inject(DOCUMENT) private document: Document) {
this.navService.hideNavBar();
this.navService.hideSideNav();
this.cdRef.markForCheck();
Expand Down

0 comments on commit 3625fa2

Please sign in to comment.