Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions plugins/english/dreamyTranslations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Plugin } from '@/types/plugin';
import { Filters } from '@libs/filterInputs';
import { defaultCover } from '@libs/defaultCover';
import { NovelStatus } from '@libs/novelStatus';
import { storage } from '@libs/storage';

type SeriesProject = {
id: number;
Expand Down Expand Up @@ -49,7 +50,7 @@ class DreamyTranslationsPlugin implements Plugin.PluginBase {
name = 'Dreamy Translations';
icon = 'src/en/dreamyTranslations/icon.png';
site = 'https://dreamy-translations.com';
version = '1.1.0';
version = '1.1.1';

filters: Filters | undefined = undefined;
imageRequestInit?: Plugin.ImageRequestInit | undefined = undefined;
Expand Down Expand Up @@ -396,7 +397,8 @@ class DreamyTranslationsPlugin implements Plugin.PluginBase {
};

// Filter locked chapters if the user enabled the setting
const shouldHideLocked = this.pluginSettings.hideLocked.value;
const raw = storage.get('hideLocked');
const shouldHideLocked = raw === true || raw === 'true';

const chaptersToShow = shouldHideLocked
? data.chapters.filter(ch => ch.free)
Expand All @@ -418,7 +420,8 @@ class DreamyTranslationsPlugin implements Plugin.PluginBase {

if (!data.hasAccess) {
throw new Error(
'This chapter requires premium access and cannot be read here.',
'This chapter requires premium access and cannot be read here. ' +
'You can enable "Hide locked chapters" in the plugin settings to filter out locked chapters.',
Comment on lines +423 to +424

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Misleading advice for cached chapters When a locked chapter is already cached in a reader’s library, this error can still appear after they enable the setting. LNReader retains chapters that disappear from the plugin’s response, so the suggested toggle will not remove that chapter. Please qualify the advice for existing library entries.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

);
}

Expand Down
Loading