[skip-ci] SponsorBlock "Hook/Greetings" category
This commit is contained in:
1 parent
7a976bbe3d
commit
62dcc14042
16 files changed
+62
-32
No files matched your search
@@ -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
|
||||
|
||||
|
||||
+3
-3
@@ -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" />
|
||||
|
||||
<ButtonEx
|
||||
@@ -40,13 +40,13 @@
|
||||
iconVisible="false"
|
||||
text="Save"
|
||||
padding="[30,30]"
|
||||
translation="[340,500]" />
|
||||
translation="[340,520]" />
|
||||
<ButtonEx
|
||||
id="closeButton"
|
||||
iconVisible="false"
|
||||
text="Close"
|
||||
padding="[30,30]"
|
||||
translation="[496,500]" />
|
||||
translation="[496,520]" />
|
||||
</Rectangle>
|
||||
</children>
|
||||
</component>
|
||||
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
user prefs saved need to be migrated. If the version is less than the
|
||||
current version, a migration is needed.
|
||||
-->
|
||||
<field id="__version" type="integer" value="6" />
|
||||
<field id="__version" type="integer" value="7" />
|
||||
<field id="prefsModel" type="array" />
|
||||
<field id="preferenceFields" type="assocarray" />
|
||||
<function name="GetUserPreferences" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
|
||||
@@ -166,6 +166,9 @@
|
||||
preview: {
|
||||
option: "manual_skip",
|
||||
},
|
||||
hook: {
|
||||
option: "manual_skip",
|
||||
},
|
||||
filler: {
|
||||
option: "manual_skip",
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -720,14 +720,14 @@
|
||||
<source>Endcards/Credits</source>
|
||||
<translation>Endcard/Abspann</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Vorschau/Rückschau/Hook</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap</source>
|
||||
<translation>Vorschau/Rückschau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Hook/Begrüßungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filler</source>
|
||||
<translation>Füllwörter/ Zeitverschwendung</translation>
|
||||
|
||||
@@ -1060,14 +1060,14 @@
|
||||
<source>Endcards/Credits</source>
|
||||
<translation>Endcards/Credits</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Preview/Recap/Hook</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap</source>
|
||||
<translation>Preview/Recap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Hook/Greetings</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filler Tangent/Jokes</source>
|
||||
<translation>Filler Tangent/Jokes</translation>
|
||||
|
||||
@@ -624,6 +624,10 @@
|
||||
<source>Preview/Recap</source>
|
||||
<translation>Vista previa/Resumen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Gancho/Saludos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Added to queue</source>
|
||||
<translation>Añadir a la cola</translation>
|
||||
@@ -1128,10 +1132,6 @@
|
||||
<source>Endcards/Credits</source>
|
||||
<translation>Tarjeta final/Créditos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Vista previa/Resumen/Gancho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Press and hold Options (*) to open the queue</source>
|
||||
<translation>Mantén pulsado Opciones (*) para abrir la cola</translation>
|
||||
|
||||
@@ -1201,8 +1201,8 @@
|
||||
<translation>Avance/Resumen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Avance/Resumen/Gancho</translation>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Gancho/Saludos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sponsor</source>
|
||||
|
||||
@@ -912,14 +912,14 @@
|
||||
<source>Endcards/Credits</source>
|
||||
<translation>Écrans de fin/Crédits</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Aperçu/Récapitulatif/Accroche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap</source>
|
||||
<translation>Aperçu/Récapitulatif</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Accroche/Salutations</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filler Tangent/Jokes</source>
|
||||
<translation>Digressions/Blagues</translation>
|
||||
|
||||
@@ -788,10 +788,6 @@
|
||||
<source>Endcards/Credits</source>
|
||||
<translation>Cards finais/Créditos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preview/Recap/Hook</source>
|
||||
<translation>Pré-visualização/Recapitulação/Gancho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Intermission/Intro Animation</source>
|
||||
<translation>Intermissão/Animação de introdução</translation>
|
||||
@@ -800,6 +796,10 @@
|
||||
<source>Preview/Recap</source>
|
||||
<translation>Pré-visualização/Recapitulação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hook/Greetings</source>
|
||||
<translation>Gancho/Saudações</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filler Tangent/Jokes</source>
|
||||
<translation>Preenchimento Tangente/Piadas</translation>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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' })
|
||||
|
||||
|
||||
Reference in new issue
Block a user