0.2.66 - End Credits improvements / Gateway: 0.1.47 - End credits redesign
This commit is contained in:
@@ -270,23 +270,18 @@ func TestMaskMarkersWithholdsOnlyTheDisabledHalf(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The toggle a television is told to obey has to be one this build knows.
|
||||
func TestSpeedUpCreditsIsCatalogued(t *testing.T) {
|
||||
definition, ok := preferenceDefinitionFor("speedUpCredits")
|
||||
if !ok {
|
||||
t.Fatal("speedUpCredits is missing from the preference catalogue")
|
||||
}
|
||||
if definition.Kind != preferenceToggle {
|
||||
t.Fatalf("kind = %v, want a toggle", definition.Kind)
|
||||
}
|
||||
if definition.Default != true {
|
||||
t.Fatalf("default = %v, want true — the feature is that it happens unasked, and it "+
|
||||
"is visible and reversible in a way an automatic seek is not", definition.Default)
|
||||
// The credits pane is not a viewer preference any more, and this pins the removal from both
|
||||
// ends: the key is gone from the catalogue, and a document still carrying it — written by a
|
||||
// television or an operator before the removal — has it dropped rather than round-tripped.
|
||||
// Without the second half a stored `false` would survive every sync and quietly keep the
|
||||
// feature off on the one set that had turned it off.
|
||||
func TestSpeedUpCreditsIsNoLongerAPreference(t *testing.T) {
|
||||
if _, ok := preferenceDefinitionFor("speedUpCredits"); ok {
|
||||
t.Fatal("speedUpCredits is still in the preference catalogue")
|
||||
}
|
||||
|
||||
// An illegal value must come back as the default rather than reaching a player.
|
||||
normalised := normalizePreferences(map[string]any{"speedUpCredits": "sometimes"})
|
||||
if normalised["speedUpCredits"] != true {
|
||||
t.Fatalf("normalised = %v, want true", normalised["speedUpCredits"])
|
||||
normalised := normalizePreferences(map[string]any{"speedUpCredits": false})
|
||||
if _, present := normalised["speedUpCredits"]; present {
|
||||
t.Fatal("a stored speedUpCredits must be dropped, not carried forward")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,17 +163,15 @@ var preferenceCatalogue = []preferenceDefinition{
|
||||
option(skipIntroOff, "Do nothing"),
|
||||
},
|
||||
},
|
||||
{
|
||||
// Default on: the whole feature is that it happens without being asked for, and it
|
||||
// is visible, reversible and over in a minute — a viewer who dislikes it turns it
|
||||
// off having seen exactly what it does. That is a different trade from
|
||||
// skipIntroMode's, which defaults to the button rather than the automatic seek
|
||||
// because a jump nobody can see coming is not recoverable by watching it.
|
||||
Key: "speedUpCredits", Name: "Speed through the credits", Area: "Playback",
|
||||
Description: "When an episode reaches its closing credits, shrink them to one side " +
|
||||
"at double speed and show what is on next beside them.",
|
||||
Kind: preferenceToggle, Default: true,
|
||||
},
|
||||
// `speedUpCredits` was here. It is deliberately not a viewer preference any more: the
|
||||
// closing-credits pane is how this client ends an episode, and an opt-out made it a
|
||||
// feature half the household never saw. The operator's `end_credits` flag remains the
|
||||
// one switch, which is the right level for it — it governs a subsystem that reads media
|
||||
// bytes, and turning it off is a decision about the server rather than about taste.
|
||||
//
|
||||
// Removing the key from the catalogue is also how the stored values are cleaned up:
|
||||
// normalizePreferences drops what it does not recognise, so a viewer who had turned it
|
||||
// off gets the pane back on their next sync with nothing having to migrate anything.
|
||||
{
|
||||
Key: "subtitlesEnabled", Name: "Subtitles", Area: "Playback",
|
||||
Description: "Turn a subtitle track on automatically when the title has one.",
|
||||
|
||||
Reference in New Issue
Block a user