Skip to content

Commit

Permalink
Better handle special chapters not leaking encoding on chapter detail…
Browse files Browse the repository at this point in the history
… page
  • Loading branch information
majora2007 committed Sep 20, 2024
1 parent 7beeab2 commit dc935ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions API/Controllers/SettingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public async Task<ActionResult<ServerSettingDto>> UpdateSettings(ServerSettingDt

if (updateBookmarks)
{
BackgroundJob.Enqueue(() => UpdateBookmarkDirectory(originalBookmarkDirectory, bookmarkDirectory));
UpdateBookmarkDirectory(originalBookmarkDirectory, bookmarkDirectory);
}

if (updateSettingsDto.EnableFolderWatching)
Expand All @@ -371,8 +371,8 @@ public async Task<ActionResult<ServerSettingDto>> UpdateSettings(ServerSettingDt
return Ok(updateSettingsDto);
}

// Public for Hangfire
public void UpdateBookmarkDirectory(string originalBookmarkDirectory, string bookmarkDirectory)

private void UpdateBookmarkDirectory(string originalBookmarkDirectory, string bookmarkDirectory)
{
_directoryService.ExistOrCreate(bookmarkDirectory);
_directoryService.CopyDirectoryToDirectory(originalBookmarkDirectory, bookmarkDirectory);
Expand Down
11 changes: 9 additions & 2 deletions UI/Web/src/app/cards/entity-title/entity-title.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@
@case (LibraryType.Manga) {
@if (titleName !== '' && prioritizeTitleName) {
@if (isChapter && includeChapter) {
{{t('chapter') + ' ' + number + ' - ' }}
@if (number === LooseLeafOrSpecial) {
{{t('chapter') + ' - ' }}
} @else {
{{t('chapter') + ' ' + number + ' - ' }}
}

}
{{titleName}}
} @else {
@if (includeVolume && volumeTitle !== '') {
{{number !== LooseLeafOrSpecial ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
@if (number !== LooseLeafOrSpecial && isChapter && includeVolume) {
{{volumeTitle}}
}
}

@if (number !== LooseLeafOrSpecial) {
Expand Down
6 changes: 0 additions & 6 deletions UI/Web/src/app/cards/entity-title/entity-title.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {DefaultValuePipe} from "../../_pipes/default-value.pipe";
})
export class EntityTitleComponent implements OnInit {

protected readonly LooseLeafOrSpecialNumber = LooseLeafOrDefaultNumber;
protected readonly LooseLeafOrSpecial = LooseLeafOrDefaultNumber + "";
protected readonly LibraryType = LibraryType;

Expand Down Expand Up @@ -62,11 +61,6 @@ export class EntityTitleComponent implements OnInit {
this.titleName = c.titleName || '';
this.number = c.range;

// If loose leaf/special
if (this.number === this.LooseLeafOrSpecial) {

}

} else {
const v = this.utilityService.asVolume(this.entity);
this.volumeTitle = v.name || '';
Expand Down

0 comments on commit dc935ba

Please sign in to comment.