diff --git a/API/Services/ImageService.cs b/API/Services/ImageService.cs index 6996eff43..05f0a4434 100644 --- a/API/Services/ImageService.cs +++ b/API/Services/ImageService.cs @@ -420,7 +420,7 @@ public class ImageService : IImageService public static string GetWebLinkFormat(string url, EncodeFormat encodeFormat) { - return $"{new Uri(url).Host}{encodeFormat.GetExtension()}"; + return $"{new Uri(url).Host.Replace("www.", string.Empty)}{encodeFormat.GetExtension()}"; } diff --git a/API/Services/SeriesService.cs b/API/Services/SeriesService.cs index dc626481d..f70e6291f 100644 --- a/API/Services/SeriesService.cs +++ b/API/Services/SeriesService.cs @@ -226,7 +226,15 @@ public class SeriesService : ISeriesService await _unitOfWork.CommitAsync(); // Trigger code to cleanup tags, collections, people, etc - await _taskScheduler.CleanupDbEntries(); + try + { + await _taskScheduler.CleanupDbEntries(); + } + catch (Exception ex) + { + _logger.LogError(ex, "There was an issue cleaning up DB entries. This may happen if Komf is spamming updates. Nightly cleanup will work"); + } + if (updateSeriesMetadataDto.CollectionTags == null) return true; foreach (var tag in updateSeriesMetadataDto.CollectionTags) diff --git a/UI/Web/src/app/_services/metadata.service.ts b/UI/Web/src/app/_services/metadata.service.ts index 61eb56a76..2e8214fb9 100644 --- a/UI/Web/src/app/_services/metadata.service.ts +++ b/UI/Web/src/app/_services/metadata.service.ts @@ -25,53 +25,10 @@ import {FilterStatement} from "../_models/metadata/v2/filter-statement"; export class MetadataService { baseUrl = environment.apiUrl; - - private currentThemeSource = new ReplaySubject(1); - - private ageRatingTypes: {[key: number]: string} | undefined = undefined; private validLanguages: Array = []; constructor(private httpClient: HttpClient, private router: Router) { } - // applyFilter(page: Array, filter: FilterField, comparison: FilterComparison, value: string) { - // const dto: SeriesFilterV2 = { - // statements: [this.createDefaultFilterStatement(filter, comparison, value + '')], - // combination: FilterCombination.Or, - // limitTo: 0 - // }; - // // - // // console.log('navigating to: ', this.filterUtilityService.urlFromFilterV2(page.join('/'), dto)); - // // this.router.navigateByUrl(this.filterUtilityService.urlFromFilterV2(page.join('/'), dto)); - // - // // Creates a temp name for the filter - // this.httpClient.post(this.baseUrl + 'filter/create-temp', dto, TextResonse).pipe(map(name => { - // dto.name = name; - // }), switchMap((_) => { - // let params: any = {}; - // params['filterName'] = dto.name; - // return this.router.navigate(page, {queryParams: params}); - // })).subscribe(); - // - // } - - // getFilter(filterName: string) { - // return this.httpClient.get(this.baseUrl + 'filter?name=' + filterName); - // } - - // getAgeRating(ageRating: AgeRating) { - // if (this.ageRatingTypes != undefined && this.ageRatingTypes.hasOwnProperty(ageRating)) { - // return of(this.ageRatingTypes[ageRating]); - // } - // return this.httpClient.get(this.baseUrl + 'series/age-rating?ageRating=' + ageRating, TextResonse).pipe(map(ratingString => { - // if (this.ageRatingTypes === undefined) { - // this.ageRatingTypes = {}; - // } - // - // this.ageRatingTypes[ageRating] = ratingString; - // return this.ageRatingTypes[ageRating]; - // })); - // } - getAllAgeRatings(libraries?: Array) { let method = 'metadata/age-ratings' if (libraries != undefined && libraries.length > 0) { diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts index c5a0fc09a..94b70cd42 100644 --- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts +++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts @@ -115,14 +115,12 @@ export class CardDetailLayoutComponent implements OnInit, OnChanges { } ngOnInit(): void { - console.log('[card-detail-layout] ngOnInit') if (this.trackByIdentity === undefined) { this.trackByIdentity = (_: number, item: any) => `${this.header}_${this.updateApplied}_${item?.libraryId}`; } if (this.filterSettings === undefined) { this.filterSettings = new FilterSettings(); - console.log('[card-detail-layout] creating blank FilterSettings'); this.cdRef.markForCheck(); } @@ -180,7 +178,6 @@ export class CardDetailLayoutComponent implements OnInit, OnChanges { this.applyFilter.emit(event); this.updateApplied++; this.filter = event.filterV2; - console.log('[card-detail-layout] apply filter') this.cdRef.markForCheck(); } diff --git a/UI/Web/src/app/library-detail/library-detail.component.ts b/UI/Web/src/app/library-detail/library-detail.component.ts index 40bf3a81f..f2f71fc71 100644 --- a/UI/Web/src/app/library-detail/library-detail.component.ts +++ b/UI/Web/src/app/library-detail/library-detail.component.ts @@ -135,11 +135,6 @@ export class LibraryDetailComponent implements OnInit { } } - get Debug() { - console.log('rendered section '); - return 0; - } - constructor(private route: ActivatedRoute, private router: Router, private seriesService: SeriesService, private libraryService: LibraryService, private titleService: Title, private actionFactoryService: ActionFactoryService, private actionService: ActionService, public bulkSelectionService: BulkSelectionService, private hubService: MessageHubService, diff --git a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts index ca9bb5cf6..9d0edab7d 100644 --- a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts +++ b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts @@ -196,7 +196,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy { * gets promoted to fullscreen. */ initScrollHandler() { - console.log('Setting up Scroll handler on ', this.isFullscreenMode ? this.readerElemRef.nativeElement : this.document.body); + //console.log('Setting up Scroll handler on ', this.isFullscreenMode ? this.readerElemRef.nativeElement : this.document.body); fromEvent(this.isFullscreenMode ? this.readerElemRef.nativeElement : this.document.body, 'scroll') .pipe(debounceTime(20), takeUntilDestroyed(this.destroyRef)) .subscribe((event) => this.handleScrollEvent(event)); diff --git a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts index b909c0bb3..aae5de538 100644 --- a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts +++ b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts @@ -1376,7 +1376,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { // This will update the value for value except when in webtoon due to how the webtoon reader // responds to page changes if (this.readerMode !== ReaderMode.Webtoon) { - console.log('Setting Page Number as slider drag occurred'); this.setPageNum(context.value); } } @@ -1390,7 +1389,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { this.pagingDirectionSubject.next(PAGING_DIRECTION.BACKWARDS); } - console.log('Setting Page Number as slider page update occurred'); this.setPageNum(this.adjustPagesForDoubleRenderer(page)); this.refreshSlider.emit(); this.goToPageEvent.next(this.pageNum); @@ -1477,7 +1475,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { this.pagingDirectionSubject.next(PAGING_DIRECTION.BACKWARDS); } - console.log('Setting Page Number as goto page'); this.setPageNum(this.adjustPagesForDoubleRenderer(page)); this.goToPageEvent.next(page); this.render(); @@ -1561,7 +1558,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { } handleWebtoonPageChange(updatedPageNum: number) { - console.log('Setting Page Number as webtoon page changed'); this.setPageNum(updatedPageNum); } diff --git a/UI/Web/src/app/metadata-filter/_components/metadata-builder/metadata-builder.component.ts b/UI/Web/src/app/metadata-filter/_components/metadata-builder/metadata-builder.component.ts index 23306dd91..0426fdcd6 100644 --- a/UI/Web/src/app/metadata-filter/_components/metadata-builder/metadata-builder.component.ts +++ b/UI/Web/src/app/metadata-filter/_components/metadata-builder/metadata-builder.component.ts @@ -68,29 +68,24 @@ export class MetadataBuilderComponent implements OnInit { ]; ngOnInit() { - console.log('[builder] ngOnInit'); this.formGroup.addControl('comparison', new FormControl(this.filter?.combination || FilterCombination.Or, [])); this.formGroup.valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef), tap(values => { this.filter.combination = parseInt(this.formGroup.get('comparison')?.value, 10) as FilterCombination; - console.log('[builder] emitting filter from comparison change'); this.update.emit(this.filter); })).subscribe(); } addFilter() { - console.log('[builder] Adding Filter') this.filter.statements = [this.metadataService.createDefaultFilterStatement(), ...this.filter.statements]; this.cdRef.markForCheck(); } removeFilter(index: number) { - console.log('[builder] Removing filter') this.filter.statements = this.filter.statements.slice(0, index).concat(this.filter.statements.slice(index + 1)) this.cdRef.markForCheck(); } updateFilter(index: number, filterStmt: FilterStatement) { - console.log('[builder] updating filter: ', this.filter.statements); this.metadataService.updateFilter(this.filter.statements, index, filterStmt); this.update.emit(this.filter); } diff --git a/UI/Web/src/app/metadata-filter/_components/metadata-filter-row/metadata-filter-row.component.ts b/UI/Web/src/app/metadata-filter/_components/metadata-filter-row/metadata-filter-row.component.ts index 0b19cb339..fc6f0f84c 100644 --- a/UI/Web/src/app/metadata-filter/_components/metadata-filter-row/metadata-filter-row.component.ts +++ b/UI/Web/src/app/metadata-filter/_components/metadata-filter-row/metadata-filter-row.component.ts @@ -123,13 +123,12 @@ export class MetadataFilterRowComponent implements OnInit { private readonly collectionTagService: CollectionTagService) {} ngOnInit() { - console.log('[ngOnInit] creating stmt (' + this.index + '): ', this.preset) this.formGroup.addControl('input', new FormControl(FilterField.SeriesName, [])); this.formGroup.get('input')?.valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe((val: string) => this.handleFieldChange(val)); this.populateFromPreset(); - this.formGroup.get('filterValue')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), tap(v => console.log('filterValue: ', v))).subscribe(); + this.formGroup.get('filterValue')?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(); // Dropdown dynamic option selection this.dropdownOptions$ = this.formGroup.get('input')!.valueChanges.pipe( @@ -156,9 +155,7 @@ export class MetadataFilterRowComponent implements OnInit { stmt.value = stmt.value + ''; } - console.log('Trying to update parent with new stmt: ', stmt.value); if (!stmt.value && stmt.field !== FilterField.SeriesName) return; - console.log('updating parent with new statement: ', stmt.value) this.filterStatement.emit(stmt); }); @@ -170,7 +167,6 @@ export class MetadataFilterRowComponent implements OnInit { populateFromPreset() { const val = this.preset.value === "undefined" || !this.preset.value ? '' : this.preset.value; - console.log('populating preset: ', val); this.formGroup.get('comparison')?.patchValue(this.preset.comparison); this.formGroup.get('input')?.patchValue(this.preset.field); @@ -178,7 +174,6 @@ export class MetadataFilterRowComponent implements OnInit { this.formGroup.get('filterValue')?.patchValue(val); } else if (DropdownFields.includes(this.preset.field)) { if (this.MultipleDropdownAllowed || val.includes(',')) { - console.log('setting multiple values: ', val.split(',').map(d => parseInt(d, 10))); this.formGroup.get('filterValue')?.patchValue(val.split(',').map(d => parseInt(d, 10))); } else { if (this.preset.field === FilterField.Languages) { @@ -253,7 +248,6 @@ export class MetadataFilterRowComponent implements OnInit { handleFieldChange(val: string) { const inputVal = parseInt(val, 10) as FilterField; - console.log('HandleFieldChange: ', val); if (StringFields.includes(inputVal)) { this.validComparisons$.next(StringComparisons); @@ -261,7 +255,6 @@ export class MetadataFilterRowComponent implements OnInit { if (this.loaded) { this.formGroup.get('filterValue')?.patchValue(''); - console.log('setting filterValue to empty string', this.formGroup.get('filterValue')?.value) } return; } diff --git a/UI/Web/src/app/metadata-filter/metadata-filter.component.ts b/UI/Web/src/app/metadata-filter/metadata-filter.component.ts index 22ac3f5c6..713d07877 100644 --- a/UI/Web/src/app/metadata-filter/metadata-filter.component.ts +++ b/UI/Web/src/app/metadata-filter/metadata-filter.component.ts @@ -76,7 +76,6 @@ export class MetadataFilterComponent implements OnInit { allFilterFields = allFields; handleFilters(filter: SeriesFilterV2) { - console.log('[metadata-filter] updating filter'); this.filterV2 = filter; } @@ -87,7 +86,6 @@ export class MetadataFilterComponent implements OnInit { constructor(public toggleService: ToggleService) {} ngOnInit(): void { - console.log('[metadata-filter] ngOnInit') if (this.filterSettings === undefined) { this.filterSettings = new FilterSettings(); this.cdRef.markForCheck(); @@ -139,7 +137,6 @@ export class MetadataFilterComponent implements OnInit { loadFromPresetsAndSetup() { this.fullyLoaded = false; - console.log('[metadata-filter] loading from preset and setting up'); this.filterV2 = this.deepClone(this.filterSettings.presetsV2); this.sortGroup = new FormGroup({ @@ -148,7 +145,6 @@ export class MetadataFilterComponent implements OnInit { }); this.sortGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => { - console.log('[metadata-filter] sortGroup value change'); if (this.filterV2?.sortOptions === null) { this.filterV2.sortOptions = { isAscending: this.isAscendingSort, @@ -176,7 +172,6 @@ export class MetadataFilterComponent implements OnInit { } this.filterV2!.sortOptions!.isAscending = this.isAscendingSort; - console.log('[metadata-filter] updated filter sort order') } clear() { diff --git a/UI/Web/src/app/typeahead/_components/typeahead.component.ts b/UI/Web/src/app/typeahead/_components/typeahead.component.ts index 06a5b1ae0..19ef6e79c 100644 --- a/UI/Web/src/app/typeahead/_components/typeahead.component.ts +++ b/UI/Web/src/app/typeahead/_components/typeahead.component.ts @@ -509,11 +509,8 @@ export class TypeaheadComponent implements OnInit { // Check if this new option will interfere with any existing ones not shown if (typeof this.settings.compareFnForAdd == 'function') { - console.log('filtered options: ', this.optionSelection.selected()); const willDuplicateExist = this.settings.compareFnForAdd(this.optionSelection.selected(), inputText); - console.log('duplicate check: ', willDuplicateExist); if (willDuplicateExist.length > 0) { - console.log("can't show add, duplicates will exist"); return; } } @@ -521,10 +518,7 @@ export class TypeaheadComponent implements OnInit { if (typeof this.settings.compareFn == 'function') { // The problem here is that compareFn can report that duplicate will exist as it does contains not match const matches = this.settings.compareFn(options, inputText); - console.log('matches for ', inputText, ': ', matches); - console.log('matches include input string: ', matches.includes(this.settings.addTransformFn(inputText))); if (matches.length > 0 && matches.includes(this.settings.addTransformFn(inputText))) { - console.log("can't show add, there are still "); return; } } diff --git a/openapi.json b/openapi.json index 2586577e6..e971432ac 100644 --- a/openapi.json +++ b/openapi.json @@ -7,7 +7,7 @@ "name": "GPL-3.0", "url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE" }, - "version": "0.7.7.17" + "version": "0.7.7.19" }, "servers": [ {