diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8f9a8ad..8d59aa85 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Playlet already supported 4K videos. This adds a support check, and quality selectors in the settings, for the devices that support it.
- Not all 4k supporting devices - only with AV1 support (usually newer devices)
- Not all 4k videos are playable, only AV1 encoded videos
+- SponsorBlock "Hook/Greetings" category
### Fixed
diff --git a/playlet-lib/src/components/Screens/SettingsScreen/SponsorBlockCategories/SponsorBlockCategoriesPreferences.xml b/playlet-lib/src/components/Screens/SettingsScreen/SponsorBlockCategories/SponsorBlockCategoriesPreferences.xml
index de3bfda2..0ba8e2a9 100644
--- a/playlet-lib/src/components/Screens/SettingsScreen/SponsorBlockCategories/SponsorBlockCategoriesPreferences.xml
+++ b/playlet-lib/src/components/Screens/SettingsScreen/SponsorBlockCategories/SponsorBlockCategoriesPreferences.xml
@@ -32,7 +32,7 @@
numColumns="1"
numRows="10"
vertFocusAnimationStyle="floatingFocus"
- translation="[40,100]"
+ translation="[40,90]"
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" />
+ translation="[340,520]" />
+ translation="[496,520]" />
\ No newline at end of file
diff --git a/playlet-lib/src/components/Services/Preferences/Preferences.bs b/playlet-lib/src/components/Services/Preferences/Preferences.bs
index 2953ba06..3571df6f 100644
--- a/playlet-lib/src/components/Services/Preferences/Preferences.bs
+++ b/playlet-lib/src/components/Services/Preferences/Preferences.bs
@@ -178,6 +178,16 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
isDirty = true
end if
+ if userPrefs.__version = 6
+ ' Hook was split out of Preview. Existing users inherit their Preview setting.
+ categories = userPrefs["sponsorblock.categories"]
+ if IsAssociativeArray(categories) and not categories.DoesExist("hook") and IsAssociativeArray(categories["preview"])
+ categories["hook"] = { option: categories["preview"].option }
+ end if
+ userPrefs.__version = 7
+ isDirty = true
+ end if
+
' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded)
#if DEBUG
diff --git a/playlet-lib/src/components/Services/Preferences/Preferences.xml b/playlet-lib/src/components/Services/Preferences/Preferences.xml
index 44ccfc12..5194958d 100644
--- a/playlet-lib/src/components/Services/Preferences/Preferences.xml
+++ b/playlet-lib/src/components/Services/Preferences/Preferences.xml
@@ -5,7 +5,7 @@
user prefs saved need to be migrated. If the version is less than the
current version, a migration is needed.
-->
-
+
diff --git a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockSegmentsJob.bs b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockSegmentsJob.bs
index a4c9163a..7e107276 100644
--- a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockSegmentsJob.bs
+++ b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockSegmentsJob.bs
@@ -92,7 +92,7 @@ end function
function GetOptionForSegment(segment as object, categories as object) as string
category = categories[segment.category]
if not IsAssociativeArray(category)
- return false
+ return SponsorBlock.SegmentAction.Disable
end if
option = category.option
diff --git a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs
index 07297aca..0df8c6ab 100644
--- a/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs
+++ b/playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs
@@ -74,8 +74,8 @@ namespace SponsorBlock
return invalid
end if
- ' categories = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "poi_highlight", "filler", "exclusive_access"]
- categories = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "poi_highlight", "filler"]
+ ' categories = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "hook", "music_offtopic", "poi_highlight", "filler", "exclusive_access"]
+ categories = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "hook", "music_offtopic", "poi_highlight", "filler"]
' actionTypes = ["skip", "mute", "chapter", "full", "poi"]
actionTypes = ["skip", "mute", "poi"]
diff --git a/playlet-lib/src/config/preferences.json5 b/playlet-lib/src/config/preferences.json5
index 7b9dbf8f..0a57778d 100644
--- a/playlet-lib/src/config/preferences.json5
+++ b/playlet-lib/src/config/preferences.json5
@@ -166,6 +166,9 @@
preview: {
option: "manual_skip",
},
+ hook: {
+ option: "manual_skip",
+ },
filler: {
option: "manual_skip",
},
diff --git a/playlet-lib/src/config/sponsorblock_config.json5 b/playlet-lib/src/config/sponsorblock_config.json5
index 6a723425..b3e4de69 100644
--- a/playlet-lib/src/config/sponsorblock_config.json5
+++ b/playlet-lib/src/config/sponsorblock_config.json5
@@ -8,6 +8,7 @@
"intro",
"outro",
"preview",
+ "hook",
"filler",
"music_offtopic",
],
@@ -49,11 +50,17 @@
color: "#0202EDB3",
},
preview: {
- title: "Preview/Recap/Hook",
+ title: "Preview/Recap",
short_title: "Preview/Recap",
options: ["auto_skip", "manual_skip", "show_in_seekbar", "disable"],
color: "#008FD6B3",
},
+ hook: {
+ title: "Hook/Greetings",
+ short_title: "Hook/Greetings",
+ options: ["auto_skip", "manual_skip", "show_in_seekbar", "disable"],
+ color: "#395699B3",
+ },
filler: {
title: "Filler Tangent/Jokes",
short_title: "Filler",
diff --git a/playlet-lib/src/locale/de_DE/translations.ts b/playlet-lib/src/locale/de_DE/translations.ts
index 2abbadc7..2c9bfff1 100644
--- a/playlet-lib/src/locale/de_DE/translations.ts
+++ b/playlet-lib/src/locale/de_DE/translations.ts
@@ -720,14 +720,14 @@
Endcards/Credits
Endcard/Abspann
-
- Preview/Recap/Hook
- Vorschau/Rückschau/Hook
-
Preview/Recap
Vorschau/Rückschau
+
+ Hook/Greetings
+ Hook/Begrüßungen
+
Filler
Füllwörter/ Zeitverschwendung
diff --git a/playlet-lib/src/locale/en_US/translations.ts b/playlet-lib/src/locale/en_US/translations.ts
index 121a427f..18fadf4a 100644
--- a/playlet-lib/src/locale/en_US/translations.ts
+++ b/playlet-lib/src/locale/en_US/translations.ts
@@ -1060,14 +1060,14 @@
Endcards/Credits
Endcards/Credits
-
- Preview/Recap/Hook
- Preview/Recap/Hook
-
Preview/Recap
Preview/Recap
+
+ Hook/Greetings
+ Hook/Greetings
+
Filler Tangent/Jokes
Filler Tangent/Jokes
diff --git a/playlet-lib/src/locale/es_ES/translations.ts b/playlet-lib/src/locale/es_ES/translations.ts
index d57fd60b..fe4478f5 100644
--- a/playlet-lib/src/locale/es_ES/translations.ts
+++ b/playlet-lib/src/locale/es_ES/translations.ts
@@ -624,6 +624,10 @@
Preview/Recap
Vista previa/Resumen
+
+ Hook/Greetings
+ Gancho/Saludos
+
Added to queue
Añadir a la cola
@@ -1128,10 +1132,6 @@
Endcards/Credits
Tarjeta final/Créditos
-
- Preview/Recap/Hook
- Vista previa/Resumen/Gancho
-
Press and hold Options (*) to open the queue
Mantén pulsado Opciones (*) para abrir la cola
diff --git a/playlet-lib/src/locale/es_MX/translations.ts b/playlet-lib/src/locale/es_MX/translations.ts
index 38e5f5de..9f57ab48 100644
--- a/playlet-lib/src/locale/es_MX/translations.ts
+++ b/playlet-lib/src/locale/es_MX/translations.ts
@@ -1201,8 +1201,8 @@
Avance/Resumen
- Preview/Recap/Hook
- Avance/Resumen/Gancho
+ Hook/Greetings
+ Gancho/Saludos
Sponsor
diff --git a/playlet-lib/src/locale/fr_CA/translations.ts b/playlet-lib/src/locale/fr_CA/translations.ts
index 713ae27e..9a9b67ad 100644
--- a/playlet-lib/src/locale/fr_CA/translations.ts
+++ b/playlet-lib/src/locale/fr_CA/translations.ts
@@ -912,14 +912,14 @@
Endcards/Credits
Écrans de fin/Crédits
-
- Preview/Recap/Hook
- Aperçu/Récapitulatif/Accroche
-
Preview/Recap
Aperçu/Récapitulatif
+
+ Hook/Greetings
+ Accroche/Salutations
+
Filler Tangent/Jokes
Digressions/Blagues
diff --git a/playlet-lib/src/locale/pt_BR/translations.ts b/playlet-lib/src/locale/pt_BR/translations.ts
index 059d82e7..996fa8a3 100644
--- a/playlet-lib/src/locale/pt_BR/translations.ts
+++ b/playlet-lib/src/locale/pt_BR/translations.ts
@@ -788,10 +788,6 @@
Endcards/Credits
Cards finais/Créditos
-
- Preview/Recap/Hook
- Pré-visualização/Recapitulação/Gancho
-
Intermission/Intro Animation
Intermissão/Animação de introdução
@@ -800,6 +796,10 @@
Preview/Recap
Pré-visualização/Recapitulação
+
+ Hook/Greetings
+ Gancho/Saudações
+
Filler Tangent/Jokes
Preenchimento Tangente/Piadas
diff --git a/playlet-lib/src/source/utils/Locale.bs b/playlet-lib/src/source/utils/Locale.bs
index 73edd00d..5f61ae3b 100644
--- a/playlet-lib/src/source/utils/Locale.bs
+++ b/playlet-lib/src/source/utils/Locale.bs
@@ -353,8 +353,8 @@ namespace Locale
IntroTitle = "Intermission/Intro Animation"
IntroShortTitle = "Intermission"
OutroTitle = "Endcards/Credits"
- PreviewTitle = "Preview/Recap/Hook"
- PreviewShortTitle = "Preview/Recap"
+ PreviewTitle = "Preview/Recap"
+ HookTitle = "Hook/Greetings"
FillerTitle = "Filler Tangent/Jokes"
FillerShortTitle = "Filler"
ChapterTitle = "Chapter"
diff --git a/tools/bs-plugins/manifest-edit-plugin.ts b/tools/bs-plugins/manifest-edit-plugin.ts
index 8617c7de..cd44d1f2 100644
--- a/tools/bs-plugins/manifest-edit-plugin.ts
+++ b/tools/bs-plugins/manifest-edit-plugin.ts
@@ -29,6 +29,15 @@ export class ManifestEditPlugin implements CompilerPlugin {
private originalManifestContent?: string;
beforeProgramCreate(builder: ProgramBuilder) {
+ // The language server loads this plugin too (VS Code + bsc-lsp), and its revalidate cycle would
+ // restore a stale cached copy of the manifest over genuine build edits. The LSP builds no-emit
+ // with showDiagnosticsInConsole off (it reports over the protocol); builds and bslint leave it
+ // on. So that flag marks the analysis-only editor pass — skip the manifest rewrite there.
+ // @ts-ignore
+ if (builder.options.showDiagnosticsInConsole === false) {
+ return;
+ }
+
const manifestPath = path.join(builder.options.rootDir!, "manifest")
let originalManifestContent = fs.readFileSync(manifestPath, { encoding: 'utf8', flag: 'r' })