diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88a61be..521dcfb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,36 @@ All notable changes are documented here. Versions follow the Playnite extension
## [Unreleased]
+## [0.8.0] - 2026-09-14
+
+### Added
+
+- Three explicit video-end behaviors: reveal Playnite as soon as it is ready, wait for the video to finish, or loop until Playnite is ready.
+- Transparent WebM compatibility playback through a local MKV alias/cache without transcoding or FFmpeg.
+- Public `Local\PlayniteBootScreen.StartupIntroHandled.v1` integration marker for themes and helper extensions that need to suppress duplicate startup intros.
+- Aniki ReMake extended startup intro as an optional bundled video.
+
+### Changed
+
+- Streaming Preload now primes the decoder while the overlay stays hidden, then pauses and rewinds playback so Continue starts the intro from the beginning.
+- Bundled videos are seeded into the persistent runtime media library without overwriting existing user files.
+- Video settings now use a single mutually exclusive playback selector and explicitly list MP4, MKV, WebM, AVI, and MOV.
+- The streaming Host now abandons a missing Continue command after 10 seconds instead of 30 seconds.
+- Added an early Continue-entry diagnostic log for failed streaming Detached launches.
+- Runtime updated to 1.0.9.
+
+### Fixed
+
+- A video ending before Playnite is ready now keeps its final frame instead of exposing the media element's end-of-stream surface.
+- Wait mode no longer seeks backward to the held final frame when Playnite is already ready and the video finishes naturally.
+- Streaming Preload no longer consumes the beginning of the startup video before the client session continues.
+- Desktop-to-Fullscreen bootstrap is suppressed while a streaming Host already owns the startup overlay, preventing an extra black cover during streaming startup.
+
+### Compatibility
+
+- Existing 0.7.x playback settings are migrated automatically to the new video-end behavior model.
+- Existing custom media, shortcuts, and streaming configuration remain compatible.
+
## [0.7.1] - 2026-09-13
### Fixed
diff --git a/PlayniteBoot/Localization/en_US.xaml b/PlayniteBoot/Localization/en_US.xaml
index 257b6c6..f154314 100644
--- a/PlayniteBoot/Localization/en_US.xaml
+++ b/PlayniteBoot/Localization/en_US.xaml
@@ -6,23 +6,27 @@
Installation and diagnostics
Choose a boot video from the managed media folder or browse to an external file. Playnite can be revealed on any monitor after its Fullscreen window is detected.
- For Sunshine, Apollo and compatible forks: use the first command as Prep and the second as Detached. The video starts before the client stream so the desktop remains covered.
+ For Sunshine, Apollo and compatible forks: use the first command as Prep and the second as Detached. Prep primes the video while the overlay stays black; playback restarts from the beginning when Continue runs.
Video
+ Playback
+ Playnite integration
Screen
Audio and transitions
Streaming commands
Managed runtime
+ Status
Shortcuts
Diagnostics
Video file
+ When to show Playnite
Monitor
Video scaling
Volume
Fade in (ms)
Fade out (ms)
- Minimum display time (ms)
+ Fallback delay (ms)
Playnite window stability (ms)
Playnite startup timeout (s)
Video-ready position (ms)
@@ -38,6 +42,16 @@
Runtime folder
Direct launch command
Shortcut name
+ Extension
+ Runtime
+ Configuration
+
+ Show Playnite as soon as it's ready
+ Keeps the last video frame visible if the video ends first.
+ Wait for the video to finish
+ Keeps playing even if Playnite is already ready.
+ Loop the video until Playnite is ready
+ Restarts the video if it ends while Playnite is still loading.
Wait for the video to finish before revealing Playnite
Loop the video
@@ -50,32 +64,40 @@
Covers Playnite's built-in Desktop to Fullscreen transition with the configured boot video.
Playnite starts in the background immediately, but the overlay fades only after Playnite is ready and the video reaches its natural end.
Looping is unavailable while waiting for the natural end of the video.
- Ignored while waiting for the complete video.
+ Fallback delay used only when the configured video is missing or cannot be played.
+ Accepted formats: {0}
+ Playback depends on the codecs available in Windows. WebM files are handled automatically through compatibility mode.
Follow Playnite reads its Fullscreen display choice in read-only mode. If it cannot be read, the last manual monitor choice is used.
Keep “auto” unless Playnite is installed in a non-standard location.
Refresh list
Open video folder
- Browse external…
+ Browse…
Use default
Restore default settings
Copy
Install/update runtime
+ Repair runtime
Open runtime folder
Open logs
Create/update Desktop shortcut
Create/update Start shortcut
Remove Desktop shortcut
Remove Start shortcut
- Copy diagnostic information
+ Copy diagnostics
+ Create/update
+ Remove
Advanced settings
Advanced streaming settings
+ Manual launch and advanced tools
1. Prep command — Preload
2. Detached command — Continue
No Undo command is required. Continue reuses the video already started by Preload.
- Copies version and feature status only. File paths, credentials and log contents are not included.
+ Copied diagnostics include versions and feature status only. File paths, credentials and log contents are not included.
+ Managed runtime files are installed and synchronized automatically.
+ Runtime: {0}
Match streaming client resolution
Use the monitor selected in General
@@ -93,14 +115,20 @@
Default — {0}
External — {0}
Missing — {0}
- Video library refreshed — {0} supported file(s) found.
+ Video library refreshed — {0} accepted file(s) found.
Could not refresh the video library: {0}
The bundled default video has been selected.
Default settings restored. Custom video files and logs were not deleted.
Runtime installed: {0}; files copied: {1}.
- Runtime ready — version {0}.
- Runtime is only partially installed. Use Install/update runtime.
- Runtime is not installed yet.
+ Runtime repaired: {0}; files synchronized: {1}.
+ ● Runtime ready
+ Runtime needs repair.
+ Runtime is not ready yet. Use Repair runtime if automatic synchronization does not complete.
+ Valid
+ Needs repair
+ ● Installed
+ ○ Not installed
+ Status unavailable
Shortcut “{0}” created or updated in {1}.
Shortcut removed from {0}.
No managed shortcut was found in {0}.
@@ -109,12 +137,15 @@
the Desktop
the Start menu
+ Desktop
+ Start menu
Restore all Playnite Boot Screen settings to their defaults? Custom video files and logs will not be deleted.
Remove the Playnite Boot Screen shortcut from {0}?
The configured video does not exist: {0}
The video path is not valid.
+ The video format is not accepted. Use: {0}.
Volume must be between 0 and 100.
The streaming settings section is not valid.
Loop video and Wait for video end cannot be enabled at the same time.
@@ -131,5 +162,5 @@
PowerShell could not be started to create the shortcut.
The shortcut operation timed out.
Launch Playnite Fullscreen with a custom boot video and no console window.
- Video files|*.mp4;*.mkv;*.webm;*.avi;*.mov|All files|*.*
+ Video files
diff --git a/PlayniteBoot/Localization/it_IT.xaml b/PlayniteBoot/Localization/it_IT.xaml
index b404dba..6f475c2 100644
--- a/PlayniteBoot/Localization/it_IT.xaml
+++ b/PlayniteBoot/Localization/it_IT.xaml
@@ -6,23 +6,27 @@
Installazione e diagnostica
Scegli un video di avvio dalla cartella multimediale gestita oppure seleziona un file esterno. Playnite può essere rilevato su qualsiasi monitor quando la finestra Fullscreen è pronta.
- Per Sunshine, Apollo e fork compatibili: usa il primo comando come Prep e il secondo come Detached. Il video parte prima dello stream e mantiene coperto il desktop.
+ Per Sunshine, Apollo e fork compatibili: usa il primo comando come Prep e il secondo come Detached. Prep prepara il video mantenendo nero l’overlay; la riproduzione riparte dall’inizio quando viene eseguito Continue.
Video
+ Riproduzione
+ Integrazione Playnite
Schermo
Audio e transizioni
Comandi streaming
Runtime gestito
+ Stato
Collegamenti
Diagnostica
File video
+ Quando mostrare Playnite
Monitor
Adattamento video
Volume
Fade-in (ms)
Fade-out (ms)
- Durata minima (ms)
+ Ritardo fallback (ms)
Stabilità finestra Playnite (ms)
Timeout avvio Playnite (s)
Posizione video-ready (ms)
@@ -38,6 +42,16 @@
Cartella runtime
Comando di avvio diretto
Nome collegamento
+ Estensione
+ Runtime
+ Configurazione
+
+ Mostra Playnite appena è pronto
+ Mantiene l'ultimo fotogramma se il video termina prima.
+ Attendi la fine del video
+ Continua il video anche se Playnite è già pronto.
+ Ripeti finché Playnite è pronto
+ Ricomincia il video se termina durante il caricamento.
Attendi la fine del video prima di mostrare Playnite
Ripeti il video
@@ -50,32 +64,40 @@
Copre la transizione integrata di Playnite da Desktop a Fullscreen con il video di avvio configurato.
Playnite parte subito in background, ma l'overlay sfuma solo quando Playnite è pronta e il video raggiunge la fine naturale.
La ripetizione non è disponibile quando si attende la fine naturale del video.
- Ignorata quando si attende il video completo.
+ Ritardo di fallback usato solo quando il video configurato manca o non può essere riprodotto.
+ Formati accettati: {0}
+ La riproduzione dipende dai codec disponibili in Windows. I file WebM vengono gestiti automaticamente tramite modalità di compatibilità.
Segui Playnite legge in sola lettura la scelta del display Fullscreen. Se non è disponibile, viene usata l’ultima scelta manuale del monitor.
Mantieni “auto” salvo installazioni di Playnite in percorsi non standard.
Aggiorna elenco
Apri cartella video
- Sfoglia esterno…
+ Sfoglia…
Usa predefinito
Ripristina impostazioni predefinite
Copia
Installa/aggiorna runtime
+ Ripara runtime
Apri cartella runtime
Apri log
Crea/aggiorna collegamento Desktop
Crea/aggiorna collegamento Start
Rimuovi collegamento Desktop
Rimuovi collegamento Start
- Copia informazioni diagnostiche
+ Copia diagnostica
+ Crea/aggiorna
+ Rimuovi
Impostazioni avanzate
Impostazioni streaming avanzate
+ Avvio manuale e strumenti avanzati
1. Prep command — Preload
2. Detached command — Continue
Non serve alcun comando Undo. Continue riutilizza il video già avviato da Preload.
- Copia soltanto versioni e stato delle funzionalità. Non include percorsi dei file, credenziali o contenuto dei log.
+ La diagnostica copiata include solo versioni e stato delle funzionalità. Non include percorsi dei file, credenziali o contenuto dei log.
+ I file gestiti del runtime vengono installati e sincronizzati automaticamente.
+ Runtime: {0}
Abbina la risoluzione del client streaming
Usa il monitor scelto in Generale
@@ -93,14 +115,20 @@
Predefinito — {0}
Esterno — {0}
Mancante — {0}
- Libreria video aggiornata — trovati {0} file supportati.
+ Libreria video aggiornata — trovati {0} file accettati.
Impossibile aggiornare la libreria video: {0}
È stato selezionato il video predefinito incluso.
Impostazioni predefinite ripristinate. I video personalizzati e i log non sono stati eliminati.
Runtime installato: {0}; file copiati: {1}.
- Runtime pronto — versione {0}.
- Runtime installato solo in parte. Usa Installa/aggiorna runtime.
- Runtime non ancora installato.
+ Runtime riparato: {0}; file sincronizzati: {1}.
+ ● Runtime pronto
+ Il runtime richiede una riparazione.
+ Il runtime non è ancora pronto. Usa Ripara runtime se la sincronizzazione automatica non si completa.
+ Valida
+ Da riparare
+ ● Installato
+ ○ Non installato
+ Stato non disponibile
Collegamento “{0}” creato o aggiornato in {1}.
Collegamento rimosso da {0}.
Nessun collegamento gestito trovato in {0}.
@@ -109,12 +137,15 @@
Desktop
menu Start
+ Desktop
+ Menu Start
Ripristinare tutte le impostazioni di Playnite Boot Screen? I video personalizzati e i log non verranno eliminati.
Rimuovere il collegamento Playnite Boot Screen da {0}?
Il video configurato non esiste: {0}
Il percorso del video non è valido.
+ Il formato video non è accettato. Usa: {0}.
Il volume deve essere compreso tra 0 e 100.
La sezione delle impostazioni streaming non è valida.
Ripeti video e Attendi fine video non possono essere attivi contemporaneamente.
@@ -131,5 +162,5 @@
Impossibile avviare PowerShell per creare il collegamento.
Timeout durante l'operazione sul collegamento.
Avvia Playnite Fullscreen con un video personalizzato e senza finestra console.
- File video|*.mp4;*.mkv;*.webm;*.avi;*.mov|Tutti i file|*.*
+ File video
diff --git a/PlayniteBoot/Models/PlayniteBootSettingsData.cs b/PlayniteBoot/Models/PlayniteBootSettingsData.cs
index e264c72..f485712 100644
--- a/PlayniteBoot/Models/PlayniteBootSettingsData.cs
+++ b/PlayniteBoot/Models/PlayniteBootSettingsData.cs
@@ -3,9 +3,38 @@
namespace PlayniteBoot.Models
{
+ public static class VideoEndBehaviors
+ {
+ public const string Ready = "ready";
+ public const string Wait = "wait";
+ public const string Loop = "loop";
+
+ public static bool IsValid(string value)
+ {
+ return string.Equals(value, Ready, StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(value, Wait, StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(value, Loop, StringComparison.OrdinalIgnoreCase);
+ }
+
+ public static string Normalize(string value)
+ {
+ if (string.Equals(value, Wait, StringComparison.OrdinalIgnoreCase))
+ {
+ return Wait;
+ }
+
+ if (string.Equals(value, Loop, StringComparison.OrdinalIgnoreCase))
+ {
+ return Loop;
+ }
+
+ return Ready;
+ }
+ }
+
public class PlayniteBootSettingsData : ObservableObject
{
- public const int CurrentSettingsVersion = 3;
+ public const int CurrentSettingsVersion = 5;
private int settingsVersion;
private string playniteExecutable = "auto";
@@ -14,8 +43,13 @@ public class PlayniteBootSettingsData : ObservableObject
private string monitor = "playnite";
private string monitorFallback = "primary";
private string videoStretch = "UniformToFill";
+ private string videoEndBehavior = VideoEndBehaviors.Ready;
+
+ // Kept only so settings saved by 0.7.1 and earlier can be migrated safely.
+ // New UI/runtime code uses VideoEndBehavior exclusively.
private bool loopVideo;
private bool waitForVideoEnd;
+
private bool mute = true;
private double volume = 1.0;
private int minimumVideoMilliseconds = 900;
@@ -47,10 +81,9 @@ public static PlayniteBootSettingsData CreateDefault()
public string Monitor { get => monitor; set => SetValue(ref monitor, value); }
public string MonitorFallback { get => monitorFallback; set => SetValue(ref monitorFallback, value); }
public string VideoStretch { get => videoStretch; set => SetValue(ref videoStretch, value); }
- public bool LoopVideo { get => loopVideo; set => SetValue(ref loopVideo, value); }
+ public string VideoEndBehavior { get => videoEndBehavior; set => SetValue(ref videoEndBehavior, value); }
- // When enabled, the overlay remains visible until both Playnite is ready
- // and the configured video reaches its natural end.
+ public bool LoopVideo { get => loopVideo; set => SetValue(ref loopVideo, value); }
public bool WaitForVideoEnd { get => waitForVideoEnd; set => SetValue(ref waitForVideoEnd, value); }
public bool Mute { get => mute; set => SetValue(ref mute, value); }
@@ -72,7 +105,6 @@ public double Volume
}
}
-
public int MinimumVideoMilliseconds { get => minimumVideoMilliseconds; set => SetValue(ref minimumVideoMilliseconds, value); }
public int ReadyStabilityMilliseconds { get => readyStabilityMilliseconds; set => SetValue(ref readyStabilityMilliseconds, value); }
public int StartTimeoutSeconds { get => startTimeoutSeconds; set => SetValue(ref startTimeoutSeconds, value); }
diff --git a/PlayniteBoot/Models/StreamingSettings.cs b/PlayniteBoot/Models/StreamingSettings.cs
index 2e4fd7a..6b51207 100644
--- a/PlayniteBoot/Models/StreamingSettings.cs
+++ b/PlayniteBoot/Models/StreamingSettings.cs
@@ -8,7 +8,7 @@ public class StreamingSettings : ObservableObject
private string monitor = "clientResolution";
private int preloadReadyTimeoutMilliseconds = 6000;
private int continueWaitTimeoutMilliseconds = 10000;
- private int preloadAbandonTimeoutMilliseconds = 30000;
+ private int preloadAbandonTimeoutMilliseconds = 10000;
private string fallbackMode = "standalone";
public bool Enabled { get => enabled; set => SetValue(ref enabled, value); }
diff --git a/PlayniteBoot/PlayniteBoot.csproj b/PlayniteBoot/PlayniteBoot.csproj
index feacc3c..d9708cc 100644
--- a/PlayniteBoot/PlayniteBoot.csproj
+++ b/PlayniteBoot/PlayniteBoot.csproj
@@ -68,6 +68,7 @@
+
diff --git a/PlayniteBoot/PlayniteBootPlugin.cs b/PlayniteBoot/PlayniteBootPlugin.cs
index 2e2dbda..a8f6b37 100644
--- a/PlayniteBoot/PlayniteBootPlugin.cs
+++ b/PlayniteBoot/PlayniteBootPlugin.cs
@@ -32,7 +32,8 @@ public PlayniteBootPlugin(IPlayniteAPI api) : base(api)
Paths = new RuntimePaths(GetPluginUserDataPath(), installPath);
Commands = new CommandGenerator(Paths);
runtimeInstaller = new RuntimeInstaller(Paths);
- configWriter = new RuntimeConfigWriter(Paths, PlayniteApi.Paths.ConfigurationPath);
+ var videoCompatibilityService = new VideoCompatibilityService(Paths);
+ configWriter = new RuntimeConfigWriter(Paths, PlayniteApi.Paths.ConfigurationPath, videoCompatibilityService);
shortcutService = new ShortcutService(Paths);
SettingsViewModel = new PlayniteBootSettingsViewModel(this);
desktopFullscreenSwitchService = new DesktopFullscreenSwitchService(
@@ -99,7 +100,8 @@ public RuntimeInstallResult PrepareRuntime(PlayniteBootSettingsData settings, bo
lock (runtimeOperationLock)
{
var result = runtimeInstaller.EnsureInstalled(forceUpdate);
- configWriter.Write(settings);
+ var compatibilityResult = configWriter.Write(settings);
+ LogVideoCompatibility(compatibilityResult);
logger.Info($"{ProductName} runtime ready at {Paths.RuntimeDirectory}. Version {result.Version}.");
return result;
}
@@ -109,7 +111,8 @@ public void WriteRuntimeConfig(PlayniteBootSettingsData settings)
{
lock (runtimeOperationLock)
{
- configWriter.Write(settings);
+ var compatibilityResult = configWriter.Write(settings);
+ LogVideoCompatibility(compatibilityResult);
}
}
@@ -118,7 +121,8 @@ public string CreateShortcut(PlayniteBootSettingsData settings, ShortcutLocation
lock (runtimeOperationLock)
{
var result = runtimeInstaller.EnsureInstalled(false);
- configWriter.Write(settings);
+ var compatibilityResult = configWriter.Write(settings);
+ LogVideoCompatibility(compatibilityResult);
logger.Info($"{ProductName} runtime ready at {Paths.RuntimeDirectory}. Version {result.Version}.");
return shortcutService.Create(
location,
@@ -135,6 +139,24 @@ public bool RemoveShortcut(PlayniteBootSettingsData settings, ShortcutLocation l
}
}
+ private static void LogVideoCompatibility(VideoCompatibilityResult result)
+ {
+ if (result == null)
+ {
+ return;
+ }
+
+ if (result.CacheCreated)
+ {
+ logger.Info($"{ProductName} prepared the WebM compatibility alias using {result.Strategy}.");
+ }
+
+ if (!string.IsNullOrWhiteSpace(result.Warning))
+ {
+ logger.Warn($"{ProductName} could not prepare the WebM compatibility alias; direct playback will be attempted. {result.Warning}");
+ }
+ }
+
public bool ShortcutExists(PlayniteBootSettingsData settings, ShortcutLocation location)
{
lock (runtimeOperationLock)
diff --git a/PlayniteBoot/PlayniteBootSettings.cs b/PlayniteBoot/PlayniteBootSettings.cs
index 98c5133..80fb6d4 100644
--- a/PlayniteBoot/PlayniteBootSettings.cs
+++ b/PlayniteBoot/PlayniteBootSettings.cs
@@ -12,6 +12,7 @@
using System.Reflection;
using System.Text;
using System.Windows;
+using System.Web.Script.Serialization;
using Forms = System.Windows.Forms;
namespace PlayniteBoot
@@ -23,7 +24,6 @@ public class PlayniteBootSettingsViewModel : ObservableObject, ISettings
private PlayniteBootSettingsData editingClone;
private PlayniteBootSettingsData settings;
private string runtimeStatus;
- private bool synchronizingVideoOptions;
public PlayniteBootSettingsData Settings
{
@@ -43,12 +43,14 @@ public PlayniteBootSettingsData Settings
OnPropertyChanged(nameof(DirectCommand));
OnPropertyChanged(nameof(PreloadCommand));
OnPropertyChanged(nameof(ContinueCommand));
- OnPropertyChanged(nameof(IsLoopVideoEnabled));
- OnPropertyChanged(nameof(IsMinimumVideoDurationEnabled));
+ OnPropertyChanged(nameof(IsVideoEndReady));
+ OnPropertyChanged(nameof(IsVideoEndWait));
+ OnPropertyChanged(nameof(IsVideoEndLoop));
OnPropertyChanged(nameof(IsVolumeEnabled));
OnPropertyChanged(nameof(VolumePercent));
OnPropertyChanged(nameof(SelectedVideoPath));
OnPropertyChanged(nameof(SelectedVideoPathDisplay));
+ NotifyInstallationStatusChanged();
if (videoLibrary != null)
{
@@ -86,8 +88,45 @@ public string SelectedVideoPath
? string.Empty
: GetConfiguredVideoPath();
- public bool IsLoopVideoEnabled => Settings == null || !Settings.WaitForVideoEnd;
- public bool IsMinimumVideoDurationEnabled => Settings == null || !Settings.WaitForVideoEnd;
+ public string AcceptedVideoFormats => F("LOCPlayniteBootAcceptedFormats", VideoLibraryService.AcceptedFormatsDisplay);
+ public string AcceptedVideoFormatsToolTip => L("LOCPlayniteBootTipAcceptedFormats");
+
+ public bool IsVideoEndReady
+ {
+ get => Settings == null || string.Equals(Settings.VideoEndBehavior, VideoEndBehaviors.Ready, StringComparison.OrdinalIgnoreCase);
+ set
+ {
+ if (value)
+ {
+ SetVideoEndBehavior(VideoEndBehaviors.Ready);
+ }
+ }
+ }
+
+ public bool IsVideoEndWait
+ {
+ get => Settings != null && string.Equals(Settings.VideoEndBehavior, VideoEndBehaviors.Wait, StringComparison.OrdinalIgnoreCase);
+ set
+ {
+ if (value)
+ {
+ SetVideoEndBehavior(VideoEndBehaviors.Wait);
+ }
+ }
+ }
+
+ public bool IsVideoEndLoop
+ {
+ get => Settings != null && string.Equals(Settings.VideoEndBehavior, VideoEndBehaviors.Loop, StringComparison.OrdinalIgnoreCase);
+ set
+ {
+ if (value)
+ {
+ SetVideoEndBehavior(VideoEndBehaviors.Loop);
+ }
+ }
+ }
+
public bool IsVolumeEnabled => Settings == null || !Settings.Mute;
public int VolumePercent
@@ -109,6 +148,21 @@ public int VolumePercent
}
public string RuntimeDirectory => plugin.Paths.RuntimeDirectory;
+ public string RuntimeVersionValue => ReadRuntimeVersion();
+ public string RuntimeVersionDisplay => F("LOCPlayniteBootRuntimeVersion", RuntimeVersionValue);
+ public string RuntimeConfigurationStatus => IsRuntimeConfigurationValid()
+ ? L("LOCPlayniteBootStatusConfigurationValid")
+ : L("LOCPlayniteBootStatusConfigurationNeedsRepair");
+ public string DesktopShortcutStatus => GetShortcutStatus(ShortcutLocation.Desktop);
+ public string StartMenuShortcutStatus => GetShortcutStatus(ShortcutLocation.StartMenu);
+ public string ExtensionVersionDisplay
+ {
+ get
+ {
+ var version = Assembly.GetExecutingAssembly().GetName().Version;
+ return version == null ? "unknown" : version.ToString(3);
+ }
+ }
public string DirectCommand => plugin.Commands.DirectCommand;
public string PreloadCommand => plugin.Commands.PreloadCommand;
public string ContinueCommand => plugin.Commands.ContinueCommand;
@@ -123,7 +177,7 @@ public int VolumePercent
public RelayCommand OpenVideoFolderCommand { get; }
public RelayCommand RestoreDefaultVideoCommand { get; }
public RelayCommand ResetSettingsCommand { get; }
- public RelayCommand InstallRuntimeCommand { get; }
+ public RelayCommand RepairRuntimeCommand { get; }
public RelayCommand CreateDesktopShortcutCommand { get; }
public RelayCommand CreateStartMenuShortcutCommand { get; }
public RelayCommand RemoveDesktopShortcutCommand { get; }
@@ -161,7 +215,7 @@ public PlayniteBootSettingsViewModel(PlayniteBootPlugin plugin)
OpenVideoFolderCommand = new RelayCommand(() => ExecuteAction(OpenVideoFolder));
RestoreDefaultVideoCommand = new RelayCommand(RestoreDefaultVideo);
ResetSettingsCommand = new RelayCommand(ResetSettings);
- InstallRuntimeCommand = new RelayCommand(() => ExecuteAction(InstallRuntime));
+ RepairRuntimeCommand = new RelayCommand(() => ExecuteAction(RepairRuntime));
CreateDesktopShortcutCommand = new RelayCommand(() => ExecuteAction(() => CreateShortcut(ShortcutLocation.Desktop)));
CreateStartMenuShortcutCommand = new RelayCommand(() => ExecuteAction(() => CreateShortcut(ShortcutLocation.StartMenu)));
RemoveDesktopShortcutCommand = new RelayCommand(() => ExecuteAction(() => RemoveShortcut(ShortcutLocation.Desktop)));
@@ -220,6 +274,11 @@ public bool VerifySettings(out List errors)
{
errors.Add(F("LOCPlayniteBootValidationVideoMissing", videoPath));
}
+
+ if (!VideoLibraryService.IsAcceptedVideo(videoPath))
+ {
+ errors.Add(F("LOCPlayniteBootValidationVideoFormat", VideoLibraryService.AcceptedFormatsDisplay));
+ }
}
catch (Exception)
{
@@ -251,10 +310,6 @@ public bool VerifySettings(out List errors)
ValidateMinimum(errors, Settings.Streaming.PreloadAbandonTimeoutMilliseconds, 5000, L("LOCPlayniteBootLabelPreloadAbandonTimeout"));
}
- if (Settings.WaitForVideoEnd && Settings.LoopVideo)
- {
- errors.Add(L("LOCPlayniteBootValidationLoopWaitConflict"));
- }
ValidateShortcutName(errors, Settings.ShortcutName);
return errors.Count == 0;
@@ -291,26 +346,35 @@ private void SettingsPropertyChanged(object sender, PropertyChangedEventArgs eve
return;
}
- if (synchronizingVideoOptions || eventArgs.PropertyName != nameof(PlayniteBootSettingsData.WaitForVideoEnd))
+ if (eventArgs.PropertyName == nameof(PlayniteBootSettingsData.VideoEndBehavior))
{
+ OnPropertyChanged(nameof(IsVideoEndReady));
+ OnPropertyChanged(nameof(IsVideoEndWait));
+ OnPropertyChanged(nameof(IsVideoEndLoop));
return;
}
- if (Settings.WaitForVideoEnd && Settings.LoopVideo)
+ if (eventArgs.PropertyName == nameof(PlayniteBootSettingsData.ShortcutName))
{
- try
- {
- synchronizingVideoOptions = true;
- Settings.LoopVideo = false;
- }
- finally
- {
- synchronizingVideoOptions = false;
- }
+ OnPropertyChanged(nameof(DesktopShortcutStatus));
+ OnPropertyChanged(nameof(StartMenuShortcutStatus));
+ }
+ }
+
+ private void SetVideoEndBehavior(string behavior)
+ {
+ if (Settings == null)
+ {
+ return;
+ }
+
+ var normalized = VideoEndBehaviors.Normalize(behavior);
+ if (string.Equals(Settings.VideoEndBehavior, normalized, StringComparison.OrdinalIgnoreCase))
+ {
+ return;
}
- OnPropertyChanged(nameof(IsLoopVideoEnabled));
- OnPropertyChanged(nameof(IsMinimumVideoDurationEnabled));
+ Settings.VideoEndBehavior = normalized;
}
private void EnsureDefaultsAndMigrate()
@@ -348,6 +412,40 @@ private void EnsureDefaultsAndMigrate()
settings.EnableDesktopFullscreenSwitch = true;
}
+ if (settings.SettingsVersion < 4)
+ {
+ // 0.7.1 and earlier stored two booleans. Prefer the stricter wait
+ // behavior if an invalid legacy combination has both enabled.
+ if (settings.WaitForVideoEnd)
+ {
+ settings.VideoEndBehavior = VideoEndBehaviors.Wait;
+ }
+ else if (settings.LoopVideo)
+ {
+ settings.VideoEndBehavior = VideoEndBehaviors.Loop;
+ }
+ else
+ {
+ settings.VideoEndBehavior = VideoEndBehaviors.Ready;
+ }
+
+ settings.WaitForVideoEnd = false;
+ settings.LoopVideo = false;
+ }
+ else
+ {
+ settings.VideoEndBehavior = VideoEndBehaviors.Normalize(settings.VideoEndBehavior);
+ }
+
+ if (settings.SettingsVersion < 5 &&
+ settings.Streaming.PreloadAbandonTimeoutMilliseconds == 30000)
+ {
+ // 0.8.0 shortens the stale preload Host wait so a missing
+ // Detached/Continue launch cannot leave a black overlay for
+ // the previous 30-second default. Preserve custom values.
+ settings.Streaming.PreloadAbandonTimeoutMilliseconds = 10000;
+ }
+
settings.SettingsVersion = PlayniteBootSettingsData.CurrentSettingsVersion;
if (string.IsNullOrWhiteSpace(settings.VideoPath))
@@ -480,7 +578,7 @@ private void BrowseVideo()
initialDirectory = string.Empty;
}
- var filter = L("LOCPlayniteBootVideoFileFilter");
+ var filter = VideoLibraryService.BuildFileDialogFilter(L("LOCPlayniteBootVideoFileFilterLabel"));
var selected = string.IsNullOrWhiteSpace(initialDirectory)
? plugin.PlayniteApi.Dialogs.SelectFile(filter)
: plugin.PlayniteApi.Dialogs.SelectFile(filter, initialDirectory);
@@ -669,10 +767,10 @@ private void ResetSettings()
RuntimeStatus = L("LOCPlayniteBootStatusDefaultsRestored");
}
- private void InstallRuntime()
+ private void RepairRuntime()
{
var result = plugin.PrepareRuntime(Settings, true);
- RuntimeStatus = F("LOCPlayniteBootStatusRuntimeInstalled", result.Version, result.CopiedFiles);
+ RuntimeStatus = F("LOCPlayniteBootStatusRuntimeRepaired", result.Version, result.CopiedFiles);
plugin.PlayniteApi.Dialogs.ShowMessage(RuntimeStatus, PlayniteBootPlugin.ProductName);
}
@@ -757,7 +855,7 @@ private string BuildDiagnostics()
b.AppendLine("Playnite: " + plugin.PlayniteApi.ApplicationInfo.ApplicationVersion);
b.AppendLine("Language: " + plugin.PlayniteApi.ApplicationSettings.Language);
b.AppendLine("Config version: " + RuntimeConfigWriter.CurrentConfigVersion);
- b.AppendLine("Mode: " + (Settings.WaitForVideoEnd ? "waitForVideoEnd" : "readyAndMinimumDuration"));
+ b.AppendLine("Video end behavior: " + VideoEndBehaviors.Normalize(Settings.VideoEndBehavior));
b.AppendLine("Streaming preload: " + (Settings.Streaming != null && Settings.Streaming.Enabled ? "enabled" : "disabled"));
b.AppendLine("Desktop -> Fullscreen boot: " + (Settings.EnableDesktopFullscreenSwitch ? "enabled" : "disabled"));
b.AppendLine("Runtime installed: " + YesNo(File.Exists(plugin.Paths.ScriptPath) && File.Exists(plugin.Paths.ConfigPath)));
@@ -795,6 +893,8 @@ private void ExecuteAction(Action action)
private void RefreshRuntimeStatus(bool overwriteActionStatus = true)
{
+ NotifyInstallationStatusChanged();
+
if (!overwriteActionStatus && !string.IsNullOrWhiteSpace(RuntimeStatus))
{
return;
@@ -802,7 +902,7 @@ private void RefreshRuntimeStatus(bool overwriteActionStatus = true)
if (File.Exists(plugin.Paths.ScriptPath) && File.Exists(plugin.Paths.ConfigPath))
{
- RuntimeStatus = F("LOCPlayniteBootStatusRuntimeReady", ReadRuntimeVersion());
+ RuntimeStatus = L("LOCPlayniteBootStatusRuntimeReady");
}
else if (Directory.Exists(plugin.Paths.RuntimeDirectory))
{
@@ -814,6 +914,62 @@ private void RefreshRuntimeStatus(bool overwriteActionStatus = true)
}
}
+ private void NotifyInstallationStatusChanged()
+ {
+ OnPropertyChanged(nameof(RuntimeVersionValue));
+ OnPropertyChanged(nameof(RuntimeVersionDisplay));
+ OnPropertyChanged(nameof(RuntimeConfigurationStatus));
+ OnPropertyChanged(nameof(DesktopShortcutStatus));
+ OnPropertyChanged(nameof(StartMenuShortcutStatus));
+ OnPropertyChanged(nameof(ExtensionVersionDisplay));
+ }
+
+ private bool IsRuntimeConfigurationValid()
+ {
+ try
+ {
+ if (!File.Exists(plugin.Paths.ConfigPath))
+ {
+ return false;
+ }
+
+ var json = File.ReadAllText(plugin.Paths.ConfigPath);
+ var serializer = new JavaScriptSerializer();
+ var config = serializer.DeserializeObject(json) as IDictionary;
+ if (config == null || !config.TryGetValue("configVersion", out var versionValue))
+ {
+ return false;
+ }
+
+ var configVersion = Convert.ToInt32(versionValue, CultureInfo.InvariantCulture);
+ if (configVersion != RuntimeConfigWriter.CurrentConfigVersion ||
+ !config.TryGetValue("videoEndBehavior", out var behaviorValue))
+ {
+ return false;
+ }
+
+ return VideoEndBehaviors.IsValid(Convert.ToString(behaviorValue, CultureInfo.InvariantCulture));
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ private string GetShortcutStatus(ShortcutLocation location)
+ {
+ try
+ {
+ return plugin.ShortcutExists(Settings, location)
+ ? L("LOCPlayniteBootStatusInstalled")
+ : L("LOCPlayniteBootStatusNotInstalled");
+ }
+ catch
+ {
+ return L("LOCPlayniteBootStatusUnknown");
+ }
+ }
+
private string ReadRuntimeVersion()
{
try
diff --git a/PlayniteBoot/PlayniteBootSettingsView.xaml b/PlayniteBoot/PlayniteBootSettingsView.xaml
index 7168d23..ade39d1 100644
--- a/PlayniteBoot/PlayniteBootSettingsView.xaml
+++ b/PlayniteBoot/PlayniteBootSettingsView.xaml
@@ -24,9 +24,6 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -168,16 +201,13 @@
-
-
-
@@ -330,39 +357,29 @@
-
-
-
+
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -373,34 +390,83 @@
-
-
-
-
-
+ Margin="6,3,0,8" />
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ TextWrapping="Wrap" Opacity="0.75" Margin="0,10,0,0" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PlayniteBoot/Properties/AssemblyInfo.cs b/PlayniteBoot/Properties/AssemblyInfo.cs
index 96e12b4..caa2b4e 100644
--- a/PlayniteBoot/Properties/AssemblyInfo.cs
+++ b/PlayniteBoot/Properties/AssemblyInfo.cs
@@ -8,5 +8,5 @@
[assembly: AssemblyCopyright("Copyright © VirtualGIT20 2026")]
[assembly: ComVisible(false)]
[assembly: Guid("29f3bcc1-12ed-423e-8c61-d0eb0218eec3")]
-[assembly: AssemblyVersion("0.7.1.0")]
-[assembly: AssemblyFileVersion("0.7.1.0")]
+[assembly: AssemblyVersion("0.8.0.0")]
+[assembly: AssemblyFileVersion("0.8.0.0")]
diff --git a/PlayniteBoot/RuntimeTemplate/PlayniteBoot.ps1 b/PlayniteBoot/RuntimeTemplate/PlayniteBoot.ps1
index 5470680..1340176 100644
--- a/PlayniteBoot/RuntimeTemplate/PlayniteBoot.ps1
+++ b/PlayniteBoot/RuntimeTemplate/PlayniteBoot.ps1
@@ -7,9 +7,9 @@
- Standalone: mostra il video, avvia Playnite e dissolve l'overlay quando
la finestra Fullscreen e stabile.
- - Streaming: the Prep command uses Preload to prepare the video on the target
- display; the Detached command uses Continue to launch Playnite directly,
- while the Host keeps the same overlay visible until Playnite is ready.
+ - Streaming: the Prep command uses Preload to prime and rewind the video on
+ the target display; the Detached command uses Continue to launch Playnite
+ and restart playback from the beginning while the Host tracks readiness.
La modalita Host e interna: viene avviata automaticamente da Preload e non
deve essere configurata manualmente.
@@ -182,6 +182,41 @@ function Get-ClampedDouble {
return $Value
}
+function Resolve-VideoEndBehavior {
+ param(
+ [Parameter(Mandatory = $true)]
+ $Config
+ )
+
+ $configuredBehavior = [string](Get-ConfigValue -Config $Config -Name 'videoEndBehavior' -DefaultValue '')
+ if (-not [string]::IsNullOrWhiteSpace($configuredBehavior)) {
+ $normalizedBehavior = $configuredBehavior.Trim().ToLowerInvariant()
+ if ($normalizedBehavior -in @('ready', 'wait', 'loop')) {
+ return $normalizedBehavior
+ }
+
+ Write-Log "Invalid videoEndBehavior '$configuredBehavior'. Falling back to 'ready'." 'WARN'
+ return 'ready'
+ }
+
+ # Config v2 and earlier used two booleans. Prefer wait if an invalid legacy
+ # combination enabled both, matching the settings migration in the plugin.
+ $legacyWait = [bool](Get-ConfigValue -Config $Config -Name 'waitForVideoEnd' -DefaultValue $false)
+ $legacyLoop = [bool](Get-ConfigValue -Config $Config -Name 'loopVideo' -DefaultValue $false)
+ if ($legacyWait) {
+ if ($legacyLoop) {
+ Write-Log 'Legacy config enables both waitForVideoEnd and loopVideo. Using wait behavior.' 'WARN'
+ }
+ return 'wait'
+ }
+
+ if ($legacyLoop) {
+ return 'loop'
+ }
+
+ return 'ready'
+}
+
function Find-PlayniteFullscreenExecutable {
param(
[Parameter(Mandatory = $true)]
@@ -398,7 +433,31 @@ function Write-Log {
}
}
+if ($Mode -eq 'Continue') {
+ Write-Log "Continue mode entered. PID: $PID."
+}
+
$settings = $null
+$startupIntroHandledMarkerName = 'Local\PlayniteBootScreen.StartupIntroHandled.v1'
+
+function Publish-StartupIntroHandledMarker {
+ $createdNew = $false
+ try {
+ $marker = [System.Threading.EventWaitHandle]::new(
+ $true,
+ [System.Threading.EventResetMode]::ManualReset,
+ $startupIntroHandledMarkerName,
+ [ref]$createdNew
+ )
+ [void]$marker.Set()
+ Write-Log "Startup intro integration marker published: $startupIntroHandledMarkerName."
+ return $marker
+ }
+ catch {
+ Write-Log "Could not publish startup intro integration marker '$startupIntroHandledMarkerName': $($_.Exception.Message)" 'WARN'
+ return $null
+ }
+}
$configVersion = [int](Get-ConfigValue -Config $config -Name 'configVersion' -DefaultValue 0)
$streamingConfig = Get-ConfigValue -Config $config -Name 'streaming' -DefaultValue $null
@@ -414,15 +473,15 @@ $streamingSettings = [PSCustomObject]@{
Monitor = [string](Get-ConfigValue -Config $streamingConfig -Name 'monitor' -DefaultValue 'clientResolution')
PreloadReadyTimeoutMilliseconds = $(Get-MinimumInteger -Value ([int](Get-ConfigValue -Config $streamingConfig -Name 'preloadReadyTimeoutMilliseconds' -DefaultValue 6000)) -Minimum 1000 -Fallback 1000)
ContinueWaitTimeoutMilliseconds = $(Get-MinimumInteger -Value ([int](Get-ConfigValue -Config $streamingConfig -Name 'continueWaitTimeoutMilliseconds' -DefaultValue 10000)) -Minimum 1000 -Fallback 1000)
- PreloadAbandonTimeoutMilliseconds = $(Get-MinimumInteger -Value ([int](Get-ConfigValue -Config $streamingConfig -Name 'preloadAbandonTimeoutMilliseconds' -DefaultValue 30000)) -Minimum 5000 -Fallback 5000)
+ PreloadAbandonTimeoutMilliseconds = $(Get-MinimumInteger -Value ([int](Get-ConfigValue -Config $streamingConfig -Name 'preloadAbandonTimeoutMilliseconds' -DefaultValue 10000)) -Minimum 5000 -Fallback 5000)
FallbackMode = [string](Get-ConfigValue -Config $streamingConfig -Name 'fallbackMode' -DefaultValue 'standalone')
}
if ($usingLegacyStreamingSection) {
Write-Log 'Legacy config section vibepollo detected. It is supported for compatibility; save settings in the extension to migrate to streaming.' 'WARN'
}
-if ($configVersion -gt 2) {
- Write-Log "Config version $configVersion is newer than the supported version 2. Unknown options will be ignored." 'WARN'
+if ($configVersion -gt 3) {
+ Write-Log "Config version $configVersion is newer than the supported version 3. Unknown options will be ignored." 'WARN'
}
# =============================================================================
@@ -700,7 +759,7 @@ function Invoke-PreloadCommand {
}
if ($readyEvent.WaitOne($streamingSettings.PreloadReadyTimeoutMilliseconds)) {
- Write-Log 'Preload is ready: the video is visible and advancing. The Prep command can exit.'
+ Write-Log 'Preload is ready: the video decoder is primed and rewound. The Prep command can exit.'
return 0
}
@@ -900,6 +959,7 @@ $hostMutexAcquired = $false
$readyEvent = $null
$continueEvent = $null
$stopEvent = $null
+$startupIntroHandledEvent = $null
$cursorHidden = $false
try {
@@ -1302,6 +1362,11 @@ public static class PlayniteBootNative
Write-Log "Switch bootstrap found Playnite Fullscreen PID $($existingProcess.Id) already starting. It will be adopted by the readiness tracker."
}
+ # Public integration contract for theme/helper plugins. The event is
+ # signaled only while this runtime instance is actively covering Playnite
+ # startup. Consumers must open, check and immediately dispose their handle.
+ $startupIntroHandledEvent = Publish-StartupIntroHandledMarker
+
# Parametri generali. I valori e i limiti sono gli stessi della baseline.
$settings = [PSCustomObject]@{
PlayniteExecutable = [string](Get-ConfigValue -Config $config -Name 'playniteExecutable' -DefaultValue 'auto')
@@ -1311,8 +1376,7 @@ public static class PlayniteBootNative
Monitor = [string](Get-ConfigValue -Config $config -Name 'monitor' -DefaultValue 'playnite')
MonitorFallback = [string](Get-ConfigValue -Config $config -Name 'monitorFallback' -DefaultValue 'primary')
VideoStretch = [string](Get-ConfigValue -Config $config -Name 'videoStretch' -DefaultValue 'UniformToFill')
- LoopVideo = [bool](Get-ConfigValue -Config $config -Name 'loopVideo' -DefaultValue $false)
- WaitForVideoEnd = [bool](Get-ConfigValue -Config $config -Name 'waitForVideoEnd' -DefaultValue $false)
+ VideoEndBehavior = Resolve-VideoEndBehavior -Config $config
Mute = [bool](Get-ConfigValue -Config $config -Name 'mute' -DefaultValue $true)
Volume = $(Get-ClampedDouble -Value ([double](Get-ConfigValue -Config $config -Name 'volume' -DefaultValue 0.0)) -Minimum 0.0 -Maximum 1.0)
@@ -1329,9 +1393,6 @@ public static class PlayniteBootNative
HideMouseCursor = [bool](Get-ConfigValue -Config $config -Name 'hideMouseCursor' -DefaultValue $true)
}
- if ($settings.WaitForVideoEnd -and $settings.LoopVideo) {
- throw 'Invalid configuration: loopVideo and waitForVideoEnd cannot both be enabled.'
- }
$playniteExecutable = $null
if ($Mode -ne 'Switch') {
@@ -1593,6 +1654,8 @@ public static class PlayniteBootNative
VideoReadyTimeoutLogged = $false
VideoPlaybackWatch = [Diagnostics.Stopwatch]::new()
PreloadReadySignaled = $false
+ PreloadPrepared = $false
+ StreamingPlaybackStarted = $false
LaunchStarted = $false
StreamingInitialProcessId = $null
StreamingPidRolloverLogged = $false
@@ -1661,7 +1724,81 @@ public static class PlayniteBootNative
$state.PreloadReadySignaled = $true
[void]$readyEvent.Set()
- Write-Log 'Preload-ready signal sent: the video is visible and advancing.'
+ Write-Log 'Preload-ready signal sent: the video decoder is primed and rewound to the beginning.'
+ }
+
+ $prepareStreamingPreload = {
+ if ($Mode -ne 'Host' -or
+ $state.LaunchStarted -or
+ $state.PreloadPrepared -or
+ -not $videoExists -or
+ $state.VideoFailed -or
+ $state.Closing) {
+ return
+ }
+
+ $preparedAtMilliseconds = [int]$media.Position.TotalMilliseconds
+ try {
+ $media.Pause()
+ $media.BeginAnimation([System.Windows.UIElement]::OpacityProperty, $null)
+ $media.Opacity = 0.0
+ $media.Position = [TimeSpan]::Zero
+
+ $state.PreloadPrepared = $true
+ $state.VideoRevealed = $false
+ $state.VideoRevealedAt = $null
+ $state.VideoEnded = $false
+ $state.VideoEndFrameHeld = $false
+ $state.WaitingForVideoEndLogged = $false
+ $state.WaitingForPlayniteLogged = $false
+ $state.LastMediaPositionMs = -1
+ $state.AdvancingSamples = 0
+ $state.VideoPlaybackWatch.Reset()
+
+ Write-Log "Streaming preload prepared at ${preparedAtMilliseconds} ms; video paused and rewound to 0 ms."
+ & $signalPreloadReady
+ }
+ catch {
+ $state.VideoFailed = $true
+ Write-Log "Could not pause and rewind the streaming preload: $($_.Exception.Message). Continue will use the standalone fallback." 'WARN'
+ }
+ }
+
+ $startStreamingPlayback = {
+ if ($Mode -ne 'Host' -or
+ -not $state.LaunchStarted -or
+ $state.StreamingPlaybackStarted -or
+ -not $videoExists -or
+ $state.VideoFailed -or
+ $state.Closing) {
+ return
+ }
+
+ try {
+ $media.Pause()
+ $media.BeginAnimation([System.Windows.UIElement]::OpacityProperty, $null)
+ $media.Opacity = 0.0
+ $media.Position = [TimeSpan]::Zero
+
+ $state.StreamingPlaybackStarted = $true
+ $state.VideoRevealed = $false
+ $state.VideoRevealedAt = $null
+ $state.VideoEnded = $false
+ $state.VideoEndFrameHeld = $false
+ $state.WaitingForVideoEndLogged = $false
+ $state.WaitingForPlayniteLogged = $false
+ $state.LastMediaPositionMs = -1
+ $state.AdvancingSamples = 0
+ $state.VideoReadyTimeoutLogged = $false
+ $state.VideoPlaybackWatch.Restart()
+
+ $media.Play()
+ Write-Log 'Continue signal received: starting the preloaded video again from 0 ms.'
+ }
+ catch {
+ $state.VideoFailed = $true
+ Write-Log "Could not restart the preloaded video from the beginning: $($_.Exception.Message). Using the Playnite-readiness fallback." 'WARN'
+ }
}
$closeSwitchBootstrapOverlay = {
@@ -1736,7 +1873,7 @@ public static class PlayniteBootNative
$media.Position = $holdPosition
$media.Pause()
$state.VideoEndFrameHeld = $true
- Write-Log "Holding the final video frame at $([int]$holdPosition.TotalMilliseconds) ms while waiting for Playnite."
+ Write-Log "Holding the final video frame at $([int]$holdPosition.TotalMilliseconds) ms."
}
catch {
try { $media.Pause() } catch {}
@@ -1751,28 +1888,43 @@ public static class PlayniteBootNative
})
$media.Add_MediaEnded({
- if ($settings.LoopVideo -and -not $state.Closing) {
+ $state.VideoEnded = $true
+
+ if ($Mode -eq 'Host' -and -not $state.LaunchStarted) {
+ $state.VideoEnded = $false
+ & $prepareStreamingPreload
+ return
+ }
+
+ if ($settings.VideoEndBehavior -eq 'loop' -and
+ -not $state.PlayniteReady -and
+ -not $state.Closing) {
+
+ $state.VideoEnded = $false
+ $state.VideoEndFrameHeld = $false
$media.Position = [TimeSpan]::Zero
$media.Play()
return
}
- if (-not $settings.WaitForVideoEnd) {
- $media.Pause()
+ if ($state.PlayniteReady) {
+ # The decoder reached the natural end while Playnite is already
+ # ready. Do not seek backwards to synthesize a hold frame: that can
+ # re-render the penultimate frame for one UI cycle and look like a
+ # small snap at the end of short console-style intros. Fade the
+ # existing overlay immediately from the natural end instead.
+ Write-Log 'Video ended and Playnite is already ready. Starting fade-out from the natural end.'
+ & $closeOverlayWithFade
return
}
- $state.VideoEnded = $true
& $holdLastVideoFrame
if (-not $state.VideoRevealed -and $videoExists) {
& $revealVideo
}
- if ($state.PlayniteReady) {
- Write-Log 'Video ended and Playnite is already ready. Fade-out will start on the next UI cycle.'
- }
- elseif (-not $state.WaitingForPlayniteLogged) {
+ if (-not $state.WaitingForPlayniteLogged) {
$state.WaitingForPlayniteLogged = $true
Write-Log 'Video ended. Holding the final frame while waiting for Playnite.'
}
@@ -2082,10 +2234,15 @@ public static class PlayniteBootNative
return
}
- # Il video viene rivelato soltanto quando il clock avanza in piu
- # campioni consecutivi: evita di mostrare il primo frame statico mentre
- # Media Foundation inizializza il decoder.
- if ($videoExists -and -not $state.VideoRevealed -and -not $state.VideoEnded) {
+ # Il clock deve avanzare in piu campioni consecutivi prima di mostrare
+ # il video. In Host, durante Prep, usiamo gli stessi campioni solo per
+ # scaldare/validare il decoder: poi mettiamo in pausa e torniamo a 0 ms.
+ # La timeline visibile parte soltanto dopo Continue.
+ $hostWaitingAfterPreload = $Mode -eq 'Host' -and -not $state.LaunchStarted -and $state.PreloadPrepared
+ if ($videoExists -and
+ -not $state.VideoRevealed -and
+ -not $state.VideoEnded -and
+ -not $hostWaitingAfterPreload) {
if ($state.MediaOpened) {
$positionMilliseconds = [int]$media.Position.TotalMilliseconds
$lastPositionMilliseconds = [int]$state.LastMediaPositionMs
@@ -2102,7 +2259,12 @@ public static class PlayniteBootNative
if ($positionMilliseconds -ge $settings.VideoReadyPositionMilliseconds -and
$state.AdvancingSamples -ge $settings.VideoReadyAdvanceSamples) {
- & $revealVideo
+ if ($Mode -eq 'Host' -and -not $state.LaunchStarted) {
+ & $prepareStreamingPreload
+ }
+ else {
+ & $revealVideo
+ }
}
}
@@ -2112,25 +2274,13 @@ public static class PlayniteBootNative
$state.VideoReadyTimeoutLogged = $true
Write-Log "The video did not show reliable advancement within $($settings.VideoReadyTimeoutMilliseconds) ms. Keeping the black background to avoid a frozen frame." 'WARN'
- if ($settings.WaitForVideoEnd) {
+ if ($settings.VideoEndBehavior -eq 'wait') {
$state.VideoFailed = $true
- Write-Log 'Wait-for-video-end was disabled for this run because the decoder did not produce reliable playback.' 'WARN'
+ Write-Log 'Wait behavior was disabled for this run because the decoder did not produce reliable playback.' 'WARN'
}
}
}
- # Preload puo terminare solo dopo che il video e visibile per un breve
- # intervallo, cosi lo stream non riceve un frame non ancora renderizzato.
- if ($Mode -eq 'Host' -and
- $state.VideoRevealed -and
- -not $state.PreloadReadySignaled) {
- $visibleMilliseconds = ([DateTime]::UtcNow - $state.VideoRevealedAt).TotalMilliseconds
- $requiredVisibleMilliseconds = [Math]::Max(100, $settings.FadeInMilliseconds + 50)
- if ($visibleMilliseconds -ge $requiredVisibleMilliseconds) {
- & $signalPreloadReady
- }
- }
-
# In Host il video viene preparato prima. Il Detached command Continue
# avvia Playnite direttamente, cosi il processo nasce dal launcher che
# Windows considera foreground; l'Host si limita ad adottarlo e seguirlo.
@@ -2139,6 +2289,7 @@ public static class PlayniteBootNative
$state.Process = Get-RunningFullscreenProcess
$state.LaunchStarted = $true
$state.StartWatch.Restart()
+ & $startStreamingPlayback
if ($null -ne $state.Process) {
$state.StreamingInitialProcessId = [int]$state.Process.Id
@@ -2217,105 +2368,71 @@ public static class PlayniteBootNative
}
}
- if ($settings.WaitForVideoEnd) {
- # In questa modalita la readiness diventa persistente: una volta
- # riconosciuta Playnite, il timeout si ferma e l overlay puo restare
- # attivo per tutta la durata di un video lungo.
- if (-not $state.PlayniteReady) {
- if ($windowIsReady) {
- if ($null -eq $state.ReadySince -or
- $state.ReadyProcessId -ne $candidateProcessId -or
- $state.ReadyWindowHandle -ne $candidateWindowHandle) {
-
- $state.ReadySince = [DateTime]::UtcNow
- $state.ReadyProcessId = $candidateProcessId
- $state.ReadyWindowHandle = $candidateWindowHandle
- $coveragePercent = [Math]::Round($windowReadiness.Coverage * 100.0, 1)
- $playniteScreenName = $windowReadiness.Screen.DeviceName
- Write-Log "Fullscreen window detected for PID ${candidateProcessId} on ${playniteScreenName}: monitor coverage is ${coveragePercent}%."
- if ($playniteScreenName -ne $selectedScreen.DeviceName) {
- Write-Log "Playnite Fullscreen is on ${playniteScreenName} while the boot overlay is on $($selectedScreen.DeviceName). The overlay will close normally." 'WARN'
- }
- }
-
- $stableMilliseconds = ([DateTime]::UtcNow - $state.ReadySince).TotalMilliseconds
- if ($stableMilliseconds -ge $settings.ReadyStabilityMilliseconds) {
- $state.PlayniteReady = $true
- $state.WindowWasReady = $true
- Write-Log "Playnite is ready: the window was stable for $([int]$stableMilliseconds) ms. The startup timeout is no longer evaluated."
+ # Readiness detection is shared by all video-end policies. Once the
+ # Fullscreen window is stable, only the selected playback policy decides
+ # whether the overlay can fade immediately or must keep covering Playnite.
+ if (-not $state.PlayniteReady) {
+ if ($windowIsReady) {
+ if ($null -eq $state.ReadySince -or
+ $state.ReadyProcessId -ne $candidateProcessId -or
+ $state.ReadyWindowHandle -ne $candidateWindowHandle) {
+
+ $state.ReadySince = [DateTime]::UtcNow
+ $state.ReadyProcessId = $candidateProcessId
+ $state.ReadyWindowHandle = $candidateWindowHandle
+ $coveragePercent = [Math]::Round($windowReadiness.Coverage * 100.0, 1)
+ $playniteScreenName = $windowReadiness.Screen.DeviceName
+ Write-Log "Fullscreen window detected for PID ${candidateProcessId} on ${playniteScreenName}: monitor coverage is ${coveragePercent}%."
+ if ($playniteScreenName -ne $selectedScreen.DeviceName) {
+ Write-Log "Playnite Fullscreen is on ${playniteScreenName} while the boot overlay is on $($selectedScreen.DeviceName). The overlay will close normally." 'WARN'
}
}
- else {
- $state.ReadySince = $null
- $state.ReadyProcessId = $null
- $state.ReadyWindowHandle = [IntPtr]::Zero
+
+ $stableMilliseconds = ([DateTime]::UtcNow - $state.ReadySince).TotalMilliseconds
+ if ($stableMilliseconds -ge $settings.ReadyStabilityMilliseconds) {
+ $state.PlayniteReady = $true
+ $state.WindowWasReady = $true
+ Write-Log "Playnite is ready: the window was stable for $([int]$stableMilliseconds) ms."
}
}
+ else {
+ $state.ReadySince = $null
+ $state.ReadyProcessId = $null
+ $state.ReadyWindowHandle = [IntPtr]::Zero
+ }
+ }
- if ($state.PlayniteReady) {
- $videoCompletionRequired = $videoExists -and -not $state.VideoFailed
- if ($videoCompletionRequired) {
- if ($state.VideoEnded) {
- Write-Log 'Completion conditions met: Playnite is ready and the video has ended.'
- & $closeOverlayWithFade
- return
- }
+ if ($state.PlayniteReady) {
+ $videoPlayable = $videoExists -and -not $state.VideoFailed
- if (-not $state.WaitingForVideoEndLogged) {
- $state.WaitingForVideoEndLogged = $true
- Write-Log 'Playnite is ready. Waiting for the video to end naturally before fade-out.'
- }
- }
- elseif ($state.StartWatch.ElapsedMilliseconds -ge $settings.MinimumVideoMilliseconds) {
+ if (-not $videoPlayable) {
+ if ($state.StartWatch.ElapsedMilliseconds -ge $settings.MinimumVideoMilliseconds) {
Write-Log 'Video is missing or not playable. Applying the Playnite-readiness fallback.' 'WARN'
& $closeOverlayWithFade
return
}
}
+ elseif ($settings.VideoEndBehavior -eq 'wait') {
+ if ($state.VideoEnded) {
+ Write-Log 'Completion conditions met: Playnite is ready and the video has ended.'
+ & $closeOverlayWithFade
+ return
+ }
- if (-not $state.PlayniteReady -and
- $state.StartWatch.Elapsed.TotalSeconds -ge $settings.StartTimeoutSeconds) {
- $state.ExitCode = 2
- Write-Log "Timed out after $($settings.StartTimeoutSeconds) seconds while waiting for the Fullscreen window." 'ERROR'
- & $closeOverlayWithFade
- }
-
- return
- }
-
- # Comportamento storico: rimane identico quando waitForVideoEnd e false.
- if ($windowIsReady) {
- if ($null -eq $state.ReadySince -or
- $state.ReadyProcessId -ne $candidateProcessId -or
- $state.ReadyWindowHandle -ne $candidateWindowHandle) {
-
- $state.ReadySince = [DateTime]::UtcNow
- $state.ReadyProcessId = $candidateProcessId
- $state.ReadyWindowHandle = $candidateWindowHandle
- $coveragePercent = [Math]::Round($windowReadiness.Coverage * 100.0, 1)
- $playniteScreenName = $windowReadiness.Screen.DeviceName
- Write-Log "Fullscreen window detected for PID ${candidateProcessId} on ${playniteScreenName}: monitor coverage is ${coveragePercent}%."
- if ($playniteScreenName -ne $selectedScreen.DeviceName) {
- Write-Log "Playnite Fullscreen is on ${playniteScreenName} while the boot overlay is on $($selectedScreen.DeviceName). The overlay will close normally." 'WARN'
+ if (-not $state.WaitingForVideoEndLogged) {
+ $state.WaitingForVideoEndLogged = $true
+ Write-Log 'Playnite is ready. Waiting for the video to end naturally before fade-out.'
}
}
-
- $stableMilliseconds = ([DateTime]::UtcNow - $state.ReadySince).TotalMilliseconds
- if ($stableMilliseconds -ge $settings.ReadyStabilityMilliseconds -and
- $state.StartWatch.ElapsedMilliseconds -ge $settings.MinimumVideoMilliseconds) {
- $state.WindowWasReady = $true
- Write-Log "Playnite is ready: the window was stable for $([int]$stableMilliseconds) ms."
+ else {
+ Write-Log "Completion conditions met: Playnite is ready; video end behavior is '$($settings.VideoEndBehavior)'."
& $closeOverlayWithFade
return
}
}
- else {
- $state.ReadySince = $null
- $state.ReadyProcessId = $null
- $state.ReadyWindowHandle = [IntPtr]::Zero
- }
- if ($state.StartWatch.Elapsed.TotalSeconds -ge $settings.StartTimeoutSeconds) {
+ if (-not $state.PlayniteReady -and
+ $state.StartWatch.Elapsed.TotalSeconds -ge $settings.StartTimeoutSeconds) {
$state.ExitCode = 2
Write-Log "Timed out after $($settings.StartTimeoutSeconds) seconds while waiting for the Fullscreen window." 'ERROR'
& $closeOverlayWithFade
@@ -2340,13 +2457,13 @@ public static class PlayniteBootNative
$media.Play()
}
- Write-Log "Video: $($settings.VideoPath); adaptive ready position $($settings.VideoReadyPositionMilliseconds) ms; samples $($settings.VideoReadyAdvanceSamples); fade-in $($settings.FadeInMilliseconds) ms; fade-out $($settings.FadeOutMilliseconds) ms; wait for video end $($settings.WaitForVideoEnd)."
+ Write-Log "Video: $($settings.VideoPath); adaptive ready position $($settings.VideoReadyPositionMilliseconds) ms; samples $($settings.VideoReadyAdvanceSamples); fade-in $($settings.FadeInMilliseconds) ms; fade-out $($settings.FadeOutMilliseconds) ms; end behavior $($settings.VideoEndBehavior)."
Write-Log "Monitor: $($selectedScreen.DeviceName), bounds $($screenBounds.Left),$($screenBounds.Top) $($screenBounds.Width)x$($screenBounds.Height); selection '$selectedMonitorMode'."
$timer.Start()
if ($Mode -eq 'Host') {
$state.PreloadWatch.Restart()
- Write-Log "Preload overlay displayed. Waiting for video-ready and then Continue for up to $($streamingSettings.PreloadAbandonTimeoutMilliseconds) ms."
+ Write-Log "Preload overlay displayed. Priming the video decoder, then waiting for Continue for up to $($streamingSettings.PreloadAbandonTimeoutMilliseconds) ms."
}
elseif ($Mode -eq 'Switch') {
# Playnite Desktop owns the transition and launches Fullscreen
@@ -2411,6 +2528,12 @@ finally {
Remove-StreamingHostProcessId
}
+ if ($null -ne $startupIntroHandledEvent) {
+ try { [void]$startupIntroHandledEvent.Reset() } catch {}
+ try { $startupIntroHandledEvent.Dispose() } catch {}
+ $startupIntroHandledEvent = $null
+ }
+
# =========================================================================
# 7. Cleanup
# =========================================================================
diff --git a/PlayniteBoot/RuntimeTemplate/Test-Configuration.ps1 b/PlayniteBoot/RuntimeTemplate/Test-Configuration.ps1
index 7f42293..f287086 100644
--- a/PlayniteBoot/RuntimeTemplate/Test-Configuration.ps1
+++ b/PlayniteBoot/RuntimeTemplate/Test-Configuration.ps1
@@ -50,8 +50,8 @@ Write-Host "Config version: $configVersion"
if ($legacyStreaming) {
Write-Warning 'Legacy vibepollo section detected. Save settings in the extension to migrate to streaming.'
}
-if ($configVersion -gt 2) {
- Write-Warning "Config version $configVersion is newer than the supported version 2."
+if ($configVersion -gt 3) {
+ Write-Warning "Config version $configVersion is newer than the supported version 3."
}
Write-Host ''
@@ -62,10 +62,22 @@ Write-Host "Monitor: $($config.monitor)"
Write-Host "Monitor fallback: $(Get-PropertyValue $config 'monitorFallback' 'primary')"
Write-Host "Playnite config: $(Get-PropertyValue $config 'playniteConfigurationPath' '')"
Write-Host "Arguments: $($config.launchArguments)"
-$loopVideo = [bool](Get-PropertyValue $config 'loopVideo' $false)
-$waitForVideoEnd = [bool](Get-PropertyValue $config 'waitForVideoEnd' $false)
-Write-Host "Loop video: $loopVideo"
-Write-Host "Wait for end: $waitForVideoEnd"
+$videoEndBehavior = [string](Get-PropertyValue $config 'videoEndBehavior' '')
+if ([string]::IsNullOrWhiteSpace($videoEndBehavior)) {
+ $legacyLoopVideo = [bool](Get-PropertyValue $config 'loopVideo' $false)
+ $legacyWaitForVideoEnd = [bool](Get-PropertyValue $config 'waitForVideoEnd' $false)
+ if ($legacyWaitForVideoEnd) {
+ $videoEndBehavior = 'wait'
+ }
+ elseif ($legacyLoopVideo) {
+ $videoEndBehavior = 'loop'
+ }
+ else {
+ $videoEndBehavior = 'ready'
+ }
+}
+$videoEndBehavior = $videoEndBehavior.Trim().ToLowerInvariant()
+Write-Host "End behavior: $videoEndBehavior"
Write-Host "Ready position: $($config.videoReadyPositionMilliseconds) ms"
Write-Host "Ready samples: $($config.videoReadyAdvanceSamples)"
Write-Host "Ready timeout: $($config.videoReadyTimeoutMilliseconds) ms"
@@ -74,13 +86,19 @@ Write-Host "Fade-out: $($config.fadeOutMilliseconds) ms"
Write-Host "Stability: $($config.readyStabilityMilliseconds) ms"
Write-Host 'Coverage: at least 85% of the monitor actually occupied by Playnite (internal threshold)'
-if ($loopVideo -and $waitForVideoEnd) {
- Write-Warning 'Invalid configuration: loopVideo and waitForVideoEnd cannot both be enabled.'
+if ($videoEndBehavior -notin @('ready', 'wait', 'loop')) {
+ Write-Warning "Unsupported videoEndBehavior: $videoEndBehavior. Use ready, wait or loop."
}
-elseif ($waitForVideoEnd) {
+elseif ($videoEndBehavior -eq 'wait') {
Write-Host 'OK: fade-out requires both Playnite readiness and the natural end of the video.' -ForegroundColor Green
- Write-Host 'Note: minimumVideoMilliseconds is ignored while the video remains playable.'
}
+elseif ($videoEndBehavior -eq 'loop') {
+ Write-Host 'OK: the video loops only while Playnite is not ready.' -ForegroundColor Green
+}
+else {
+ Write-Host 'OK: Playnite is revealed as soon as its Fullscreen window is ready.' -ForegroundColor Green
+}
+Write-Host 'Note: minimumVideoMilliseconds is used only as a fallback when the video is missing or not playable.'
$video = Resolve-LocalPath ([string]$config.videoPath)
if (Test-Path -LiteralPath $video -PathType Leaf) {
@@ -119,7 +137,7 @@ else {
$monitor = [string](Get-PropertyValue $streaming 'monitor' 'clientResolution')
$preloadTimeout = [int](Get-PropertyValue $streaming 'preloadReadyTimeoutMilliseconds' 6000)
$continueTimeout = [int](Get-PropertyValue $streaming 'continueWaitTimeoutMilliseconds' 10000)
- $abandonTimeout = [int](Get-PropertyValue $streaming 'preloadAbandonTimeoutMilliseconds' 30000)
+ $abandonTimeout = [int](Get-PropertyValue $streaming 'preloadAbandonTimeoutMilliseconds' 10000)
$fallbackMode = [string](Get-PropertyValue $streaming 'fallbackMode' 'standalone')
Write-Host "Enabled: $enabled"
diff --git a/PlayniteBoot/RuntimeTemplate/VERSION.txt b/PlayniteBoot/RuntimeTemplate/VERSION.txt
index b0f3d96..66c4c22 100644
--- a/PlayniteBoot/RuntimeTemplate/VERSION.txt
+++ b/PlayniteBoot/RuntimeTemplate/VERSION.txt
@@ -1 +1 @@
-1.0.8
+1.0.9
diff --git a/PlayniteBoot/RuntimeTemplate/media/Aniki_Remake_Intro.mp4 b/PlayniteBoot/RuntimeTemplate/media/Aniki_Remake_Intro.mp4
new file mode 100644
index 0000000..2b7af95
Binary files /dev/null and b/PlayniteBoot/RuntimeTemplate/media/Aniki_Remake_Intro.mp4 differ
diff --git a/PlayniteBoot/Services/DesktopFullscreenSwitchService.cs b/PlayniteBoot/Services/DesktopFullscreenSwitchService.cs
index 17b4bdd..9bfdefa 100644
--- a/PlayniteBoot/Services/DesktopFullscreenSwitchService.cs
+++ b/PlayniteBoot/Services/DesktopFullscreenSwitchService.cs
@@ -3,6 +3,8 @@
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
+using System.Security.Cryptography;
+using System.Text;
using System.Threading;
using System.Windows;
@@ -76,9 +78,65 @@ private void Window_Closing(object sender, CancelEventArgs eventArgs)
// rendered; once armed, Playnite is free to close Desktop and launch
// Fullscreen behind the cover.
switchHandled = true;
+
+ // A streaming preload host already owns the target display with its
+ // own boot overlay. Starting SwitchBootstrap as well would briefly
+ // place a second black TopMost window above the running video before
+ // the Switch runtime notices the launcher mutex and exits. Skip the
+ // redundant cover and let the active streaming Host track Fullscreen.
+ if (IsStreamingHostActive())
+ {
+ logger.Info(PlayniteBootPlugin.ProductName + " skipped the Desktop-to-Fullscreen switch cover because a streaming preload host is already active.");
+ return;
+ }
+
TryArmSwitchCover(Process.GetCurrentProcess().Id, DateTime.UtcNow);
}
+ private bool IsStreamingHostActive()
+ {
+ Mutex existingMutex = null;
+ try
+ {
+ existingMutex = Mutex.OpenExisting(GetStreamingHostMutexName(paths.ConfigPath));
+ return true;
+ }
+ catch (WaitHandleCannotBeOpenedException)
+ {
+ return false;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // The named object exists even if this process cannot open it.
+ // Treat that as an active Host so the switch integration fails
+ // open instead of flashing a redundant black cover.
+ return true;
+ }
+ catch (Exception exception)
+ {
+ logger.Warn(PlayniteBootPlugin.ProductName + " could not check the streaming preload host state: " + exception.Message);
+ return false;
+ }
+ finally
+ {
+ if (existingMutex != null)
+ {
+ existingMutex.Dispose();
+ }
+ }
+ }
+
+ private static string GetStreamingHostMutexName(string configPath)
+ {
+ using (var sha = SHA256.Create())
+ {
+ var identityBytes = Encoding.UTF8.GetBytes((configPath ?? string.Empty).ToLowerInvariant());
+ var hashBytes = sha.ComputeHash(identityBytes);
+ var hash = BitConverter.ToString(hashBytes).Replace("-", string.Empty).Substring(0, 16);
+ return "Local\\PlayniteBoot_" + hash + "_Host";
+ }
+ }
+
private bool IsEnabled()
{
try
diff --git a/PlayniteBoot/Services/RuntimeConfigWriter.cs b/PlayniteBoot/Services/RuntimeConfigWriter.cs
index df71e68..98b8b3d 100644
--- a/PlayniteBoot/Services/RuntimeConfigWriter.cs
+++ b/PlayniteBoot/Services/RuntimeConfigWriter.cs
@@ -9,25 +9,34 @@ namespace PlayniteBoot.Services
{
public class RuntimeConfigWriter
{
- public const int CurrentConfigVersion = 2;
+ public const int CurrentConfigVersion = 3;
private readonly RuntimePaths paths;
private readonly string playniteConfigurationPath;
+ private readonly VideoCompatibilityService videoCompatibility;
private readonly JavaScriptSerializer serializer = new JavaScriptSerializer();
- public RuntimeConfigWriter(RuntimePaths paths, string playniteConfigurationPath)
+ public RuntimeConfigWriter(
+ RuntimePaths paths,
+ string playniteConfigurationPath,
+ VideoCompatibilityService videoCompatibility)
{
this.paths = paths;
this.playniteConfigurationPath = playniteConfigurationPath ?? string.Empty;
+ this.videoCompatibility = videoCompatibility ?? throw new ArgumentNullException(nameof(videoCompatibility));
}
- public void Write(PlayniteBootSettingsData settings)
+ public VideoCompatibilityResult Write(PlayniteBootSettingsData settings)
{
Directory.CreateDirectory(paths.RuntimeDirectory);
Directory.CreateDirectory(paths.MediaDirectory);
Directory.CreateDirectory(paths.LogsDirectory);
- var videoPath = NormalizeVideoPath(settings.VideoPath);
+ var sourceVideoPath = string.IsNullOrWhiteSpace(settings.VideoPath)
+ ? Path.GetFullPath(paths.DefaultVideoPath)
+ : Path.GetFullPath(settings.VideoPath);
+ var compatibilityResult = videoCompatibility.Resolve(sourceVideoPath);
+ var videoPath = NormalizeVideoPath(compatibilityResult.PlaybackPath);
var json = BuildJson(settings, videoPath);
var tempPath = paths.ConfigPath + ".tmp";
var backupPath = paths.ConfigPath + ".bak";
@@ -51,23 +60,25 @@ public void Write(PlayniteBootSettingsData settings)
{
File.Move(tempPath, paths.ConfigPath);
}
+
+ return compatibilityResult;
}
- private string NormalizeVideoPath(string configuredPath)
+ private string NormalizeVideoPath(string playbackPath)
{
- var fullPath = string.IsNullOrWhiteSpace(configuredPath)
+ var fullPath = string.IsNullOrWhiteSpace(playbackPath)
? Path.GetFullPath(paths.DefaultVideoPath)
- : Path.GetFullPath(configuredPath);
+ : Path.GetFullPath(playbackPath);
- var mediaRoot = Path.GetFullPath(paths.MediaDirectory)
+ var runtimeRoot = Path.GetFullPath(paths.RuntimeDirectory)
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) +
Path.DirectorySeparatorChar;
- if (fullPath.StartsWith(mediaRoot, StringComparison.OrdinalIgnoreCase))
+ if (fullPath.StartsWith(runtimeRoot, StringComparison.OrdinalIgnoreCase))
{
- var relativeName = fullPath.Substring(mediaRoot.Length)
+ var relativePath = fullPath.Substring(runtimeRoot.Length)
.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
- return @".\media\" + relativeName;
+ return @".\" + relativePath;
}
return fullPath;
@@ -87,8 +98,7 @@ private string BuildJson(PlayniteBootSettingsData s, string videoPath)
Append(b, "monitor", s.Monitor, true);
Append(b, "monitorFallback", s.MonitorFallback, true);
Append(b, "videoStretch", s.VideoStretch, true);
- Append(b, "loopVideo", s.LoopVideo, true);
- Append(b, "waitForVideoEnd", s.WaitForVideoEnd, true);
+ Append(b, "videoEndBehavior", VideoEndBehaviors.Normalize(s.VideoEndBehavior), true);
Append(b, "mute", s.Mute, true);
Append(b, "volume", volume, true);
b.AppendLine();
diff --git a/PlayniteBoot/Services/RuntimeInstaller.cs b/PlayniteBoot/Services/RuntimeInstaller.cs
index 8c265f3..ac63af3 100644
--- a/PlayniteBoot/Services/RuntimeInstaller.cs
+++ b/PlayniteBoot/Services/RuntimeInstaller.cs
@@ -70,12 +70,28 @@ public RuntimeInstallResult EnsureInstalled(bool force = false)
}
}
- // A customized default video must survive extension updates.
- var sourceVideo = Path.Combine(paths.RuntimeTemplateDirectory, "media", "boot-4k60.mp4");
- if (File.Exists(sourceVideo) && !File.Exists(paths.DefaultVideoPath))
+ // Bundled videos seed the managed media library, but runtime media is
+ // user-owned after installation. Never overwrite an existing file,
+ // including during a forced runtime repair.
+ var templateMediaDirectory = Path.Combine(paths.RuntimeTemplateDirectory, "media");
+ if (Directory.Exists(templateMediaDirectory))
{
- File.Copy(sourceVideo, paths.DefaultVideoPath, false);
- copied++;
+ foreach (var sourceVideo in Directory.EnumerateFiles(templateMediaDirectory, "*", SearchOption.TopDirectoryOnly))
+ {
+ if (!VideoLibraryService.IsAcceptedVideo(sourceVideo))
+ {
+ continue;
+ }
+
+ var targetVideo = Path.Combine(paths.MediaDirectory, Path.GetFileName(sourceVideo));
+ if (File.Exists(targetVideo))
+ {
+ continue;
+ }
+
+ File.Copy(sourceVideo, targetVideo, false);
+ copied++;
+ }
}
return new RuntimeInstallResult
diff --git a/PlayniteBoot/Services/RuntimePaths.cs b/PlayniteBoot/Services/RuntimePaths.cs
index 71fac26..4afcd91 100644
--- a/PlayniteBoot/Services/RuntimePaths.cs
+++ b/PlayniteBoot/Services/RuntimePaths.cs
@@ -11,6 +11,7 @@ public RuntimePaths(string pluginDataPath, string extensionInstallPath)
RuntimeTemplateDirectory = Path.Combine(extensionInstallPath, "RuntimeTemplate");
RuntimeDirectory = Path.Combine(pluginDataPath, "Runtime");
MediaDirectory = Path.Combine(RuntimeDirectory, "media");
+ VideoCompatibilityCacheDirectory = Path.Combine(RuntimeDirectory, "cache", "video-compat");
LogsDirectory = Path.Combine(RuntimeDirectory, "logs");
ConfigPath = Path.Combine(RuntimeDirectory, "config.json");
ScriptPath = Path.Combine(RuntimeDirectory, "PlayniteBoot.ps1");
@@ -26,6 +27,7 @@ public RuntimePaths(string pluginDataPath, string extensionInstallPath)
public string RuntimeTemplateDirectory { get; }
public string RuntimeDirectory { get; }
public string MediaDirectory { get; }
+ public string VideoCompatibilityCacheDirectory { get; }
public string LogsDirectory { get; }
public string ConfigPath { get; }
public string ScriptPath { get; }
diff --git a/PlayniteBoot/Services/VideoCompatibilityService.cs b/PlayniteBoot/Services/VideoCompatibilityService.cs
new file mode 100644
index 0000000..3fac83c
--- /dev/null
+++ b/PlayniteBoot/Services/VideoCompatibilityService.cs
@@ -0,0 +1,333 @@
+
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace PlayniteBoot.Services
+{
+ public sealed class VideoCompatibilityResult
+ {
+ public VideoCompatibilityResult(string playbackPath, string strategy, bool cacheCreated, string warning)
+ {
+ PlaybackPath = playbackPath;
+ Strategy = strategy;
+ CacheCreated = cacheCreated;
+ Warning = warning;
+ }
+
+ public string PlaybackPath { get; }
+ public string Strategy { get; }
+ public bool CacheCreated { get; }
+ public string Warning { get; }
+ }
+
+ public class VideoCompatibilityService
+ {
+ public const string DirectStrategy = "direct";
+ public const string CachedStrategy = "cache";
+ public const string HardLinkStrategy = "hardlink";
+ public const string CopyStrategy = "copy";
+
+ private readonly RuntimePaths paths;
+
+ public VideoCompatibilityService(RuntimePaths paths)
+ {
+ this.paths = paths;
+ }
+
+ public VideoCompatibilityResult Resolve(string sourcePath)
+ {
+ if (string.IsNullOrWhiteSpace(sourcePath))
+ {
+ return Direct(sourcePath);
+ }
+
+ string fullSourcePath;
+ try
+ {
+ fullSourcePath = Path.GetFullPath(sourcePath);
+ }
+ catch (Exception exception) when (IsExpectedPathException(exception))
+ {
+ return Direct(sourcePath);
+ }
+
+ if (!string.Equals(Path.GetExtension(fullSourcePath), ".webm", StringComparison.OrdinalIgnoreCase))
+ {
+ CleanupUnusedSourceDirectories(null);
+ return Direct(fullSourcePath);
+ }
+
+ if (!File.Exists(fullSourcePath))
+ {
+ return Direct(fullSourcePath);
+ }
+
+ try
+ {
+ var sourceInfo = new FileInfo(fullSourcePath);
+ sourceInfo.Refresh();
+
+ var sourceDirectory = Path.Combine(
+ paths.VideoCompatibilityCacheDirectory,
+ GetStablePathHash(fullSourcePath));
+ var aliasFileName = string.Format(
+ "{0}-{1}.mkv",
+ sourceInfo.Length,
+ sourceInfo.LastWriteTimeUtc.Ticks);
+ var aliasPath = Path.Combine(sourceDirectory, aliasFileName);
+
+ Directory.CreateDirectory(sourceDirectory);
+
+ if (IsValidAlias(aliasPath, sourceInfo))
+ {
+ CleanupStaleAliases(sourceDirectory, aliasPath);
+ CleanupUnusedSourceDirectories(sourceDirectory);
+ return new VideoCompatibilityResult(aliasPath, CachedStrategy, false, null);
+ }
+
+ TryDelete(aliasPath);
+
+ if (TryCreateHardLink(aliasPath, fullSourcePath) && IsValidAlias(aliasPath, sourceInfo))
+ {
+ CleanupStaleAliases(sourceDirectory, aliasPath);
+ CleanupUnusedSourceDirectories(sourceDirectory);
+ return new VideoCompatibilityResult(aliasPath, HardLinkStrategy, true, null);
+ }
+
+ TryDelete(aliasPath);
+ CopyAtomically(fullSourcePath, aliasPath, sourceInfo.LastWriteTimeUtc);
+
+ if (!IsValidAlias(aliasPath, sourceInfo))
+ {
+ throw new IOException("The compatibility cache copy could not be verified.");
+ }
+
+ CleanupStaleAliases(sourceDirectory, aliasPath);
+ CleanupUnusedSourceDirectories(sourceDirectory);
+ return new VideoCompatibilityResult(aliasPath, CopyStrategy, true, null);
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ return new VideoCompatibilityResult(
+ fullSourcePath,
+ DirectStrategy,
+ false,
+ exception.Message);
+ }
+ }
+
+ private static VideoCompatibilityResult Direct(string sourcePath)
+ {
+ return new VideoCompatibilityResult(sourcePath, DirectStrategy, false, null);
+ }
+
+ private static bool IsValidAlias(string aliasPath, FileInfo sourceInfo)
+ {
+ if (!File.Exists(aliasPath))
+ {
+ return false;
+ }
+
+ try
+ {
+ var aliasInfo = new FileInfo(aliasPath);
+ aliasInfo.Refresh();
+ return aliasInfo.Length == sourceInfo.Length &&
+ aliasInfo.LastWriteTimeUtc == sourceInfo.LastWriteTimeUtc;
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ return false;
+ }
+ }
+
+ private static string GetStablePathHash(string sourcePath)
+ {
+ var normalizedPath = Path.GetFullPath(sourcePath)
+ .Trim()
+ .Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)
+ .ToUpperInvariant();
+
+ using (var sha256 = SHA256.Create())
+ {
+ var bytes = Encoding.UTF8.GetBytes(normalizedPath);
+ var hash = sha256.ComputeHash(bytes);
+ var builder = new StringBuilder(hash.Length * 2);
+ foreach (var value in hash)
+ {
+ builder.Append(value.ToString("x2"));
+ }
+
+ return builder.ToString();
+ }
+ }
+
+ private static void CopyAtomically(string sourcePath, string aliasPath, DateTime sourceLastWriteTimeUtc)
+ {
+ var tempPath = aliasPath + ".tmp-" + Guid.NewGuid().ToString("N");
+ try
+ {
+ File.Copy(sourcePath, tempPath, false);
+ File.SetLastWriteTimeUtc(tempPath, sourceLastWriteTimeUtc);
+ File.Move(tempPath, aliasPath);
+ }
+ finally
+ {
+ TryDelete(tempPath);
+ }
+ }
+
+ private static void CleanupStaleAliases(string directoryPath, string currentAliasPath)
+ {
+ try
+ {
+ foreach (var path in Directory.EnumerateFiles(directoryPath, "*.mkv", SearchOption.TopDirectoryOnly))
+ {
+ if (!string.Equals(path, currentAliasPath, StringComparison.OrdinalIgnoreCase))
+ {
+ TryDelete(path);
+ }
+ }
+
+ foreach (var path in Directory.EnumerateFiles(directoryPath, "*.tmp-*", SearchOption.TopDirectoryOnly))
+ {
+ TryDelete(path);
+ }
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ // Cache cleanup is best effort and must never block playback.
+ }
+ }
+
+ private void CleanupUnusedSourceDirectories(string currentSourceDirectory)
+ {
+ try
+ {
+ if (!Directory.Exists(paths.VideoCompatibilityCacheDirectory))
+ {
+ return;
+ }
+
+ foreach (var directoryPath in Directory.EnumerateDirectories(
+ paths.VideoCompatibilityCacheDirectory,
+ "*",
+ SearchOption.TopDirectoryOnly))
+ {
+ if (!string.IsNullOrWhiteSpace(currentSourceDirectory) &&
+ string.Equals(directoryPath, currentSourceDirectory, StringComparison.OrdinalIgnoreCase))
+ {
+ continue;
+ }
+
+ TryDeleteDirectory(directoryPath);
+ }
+
+ TryDeleteDirectoryIfEmpty(paths.VideoCompatibilityCacheDirectory);
+ TryDeleteDirectoryIfEmpty(Path.GetDirectoryName(paths.VideoCompatibilityCacheDirectory));
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ // Cache cleanup is best effort and must never block playback.
+ }
+ }
+
+ private static void TryDeleteDirectory(string directoryPath)
+ {
+ if (string.IsNullOrWhiteSpace(directoryPath) || !Directory.Exists(directoryPath))
+ {
+ return;
+ }
+
+ try
+ {
+ Directory.Delete(directoryPath, true);
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ // An in-use cache entry can be retried the next time configuration is written.
+ }
+ }
+
+ private static void TryDeleteDirectoryIfEmpty(string directoryPath)
+ {
+ if (string.IsNullOrWhiteSpace(directoryPath) || !Directory.Exists(directoryPath))
+ {
+ return;
+ }
+
+ try
+ {
+ if (Directory.GetFileSystemEntries(directoryPath).Length == 0)
+ {
+ Directory.Delete(directoryPath, false);
+ }
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ // Cache cleanup is best effort and must never block playback.
+ }
+ }
+
+ private static void TryDelete(string path)
+ {
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ return;
+ }
+
+ try
+ {
+ if (File.Exists(path))
+ {
+ File.Delete(path);
+ }
+ }
+ catch (Exception exception) when (IsExpectedCompatibilityException(exception))
+ {
+ // A stale or in-use cache entry can be retried on a later run.
+ }
+ }
+
+ private static bool IsExpectedPathException(Exception exception)
+ {
+ return exception is ArgumentException ||
+ exception is NotSupportedException ||
+ exception is PathTooLongException;
+ }
+
+ private static bool IsExpectedCompatibilityException(Exception exception)
+ {
+ return IsExpectedPathException(exception) ||
+ exception is IOException ||
+ exception is UnauthorizedAccessException ||
+ exception is System.Security.SecurityException;
+ }
+
+ private static bool TryCreateHardLink(string aliasPath, string sourcePath)
+ {
+ try
+ {
+ return CreateHardLink(aliasPath, sourcePath, IntPtr.Zero);
+ }
+ catch (DllNotFoundException)
+ {
+ return false;
+ }
+ catch (EntryPointNotFoundException)
+ {
+ return false;
+ }
+ }
+
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static extern bool CreateHardLink(
+ string fileName,
+ string existingFileName,
+ IntPtr securityAttributes);
+ }
+}
diff --git a/PlayniteBoot/Services/VideoLibraryService.cs b/PlayniteBoot/Services/VideoLibraryService.cs
index 6973122..448ea88 100644
--- a/PlayniteBoot/Services/VideoLibraryService.cs
+++ b/PlayniteBoot/Services/VideoLibraryService.cs
@@ -7,8 +7,17 @@ namespace PlayniteBoot.Services
{
public class VideoLibraryService
{
- private static readonly HashSet SupportedExtensions = new HashSet(
- new[] { ".mp4", ".mkv", ".webm", ".avi", ".mov" },
+ private static readonly string[] AcceptedExtensionList =
+ {
+ ".mp4",
+ ".mkv",
+ ".webm",
+ ".avi",
+ ".mov"
+ };
+
+ private static readonly HashSet AcceptedExtensions = new HashSet(
+ AcceptedExtensionList,
StringComparer.OrdinalIgnoreCase);
private readonly RuntimePaths paths;
@@ -18,22 +27,40 @@ public VideoLibraryService(RuntimePaths paths)
this.paths = paths;
}
+ public static string AcceptedFormatsDisplay => string.Join(", ", AcceptedExtensionList.Select(extension =>
+ string.Equals(extension, ".webm", StringComparison.OrdinalIgnoreCase)
+ ? "WebM"
+ : extension.Substring(1).ToUpperInvariant()));
+
+ public static string AcceptedFormatsWildcard => string.Join(";", AcceptedExtensionList.Select(extension => "*" + extension));
+
+ public static string BuildFileDialogFilter(string videoFilesLabel)
+ {
+ return string.Format("{0}|{1}", videoFilesLabel, AcceptedFormatsWildcard);
+ }
+
public IReadOnlyList GetLibraryVideos()
{
Directory.CreateDirectory(paths.MediaDirectory);
return Directory
.EnumerateFiles(paths.MediaDirectory, "*", SearchOption.TopDirectoryOnly)
- .Where(IsSupportedVideo)
+ .Where(IsAcceptedVideo)
.Select(Path.GetFullPath)
.OrderBy(Path.GetFileName, StringComparer.CurrentCultureIgnoreCase)
.ToList();
}
- public static bool IsSupportedVideo(string filePath)
+ public static bool IsAcceptedVideo(string filePath)
{
return !string.IsNullOrWhiteSpace(filePath) &&
- SupportedExtensions.Contains(Path.GetExtension(filePath));
+ AcceptedExtensions.Contains(Path.GetExtension(filePath));
+ }
+
+ // Compatibility alias for callers compiled against the previous name.
+ public static bool IsSupportedVideo(string filePath)
+ {
+ return IsAcceptedVideo(filePath);
}
}
}
diff --git a/PlayniteBoot/extension.yaml b/PlayniteBoot/extension.yaml
index 5bcd9a9..8f601cb 100644
--- a/PlayniteBoot/extension.yaml
+++ b/PlayniteBoot/extension.yaml
@@ -1,7 +1,7 @@
Id: PlayniteBoot_71b5c099-3c25-4fe7-b26f-1262c7f0e138
Name: Playnite Boot Screen
Author: VirtualGIT20
-Version: 0.7.1
+Version: 0.8.0
Module: PlayniteBoot.dll
Type: GenericPlugin
Icon: icon.png
diff --git a/README.md b/README.md
index 16b8096..38535e4 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Playnite Boot Screen
-[Italiano](README_IT.md) · [Changelog](CHANGELOG.md) · [Troubleshooting](docs/TROUBLESHOOTING.md)
+[Italiano](README_IT.md) · [Changelog](CHANGELOG.md) · [Troubleshooting](docs/TROUBLESHOOTING.md) · [Integration contract](docs/INTEGRATION.md)

@@ -15,11 +15,12 @@ https://github.com/user-attachments/assets/6d77a081-9165-4f0f-a6bb-785642ced0e7
- Managed video list for supported files in the persistent runtime media folder, while external video paths remain supported.
- Follow Playnite's Fullscreen display setting or choose a monitor manually, with safe multi-monitor readiness detection.
- Configurable scaling, fades, mute, and volume from 0 to 100.
-- Reveal Playnite as soon as it is ready, or wait for the video to end naturally.
+- Choose whether to reveal Playnite as soon as it is ready, wait for the video to finish, or loop until Playnite is ready.
- Cover Playnite's built-in Desktop-to-Fullscreen transition with the configured boot video; enabled by default and optional in settings.
- Managed runtime stored outside the replaceable extension installation directory.
- Configurable Desktop and Start menu shortcut name.
- Streaming Preload and Continue commands shown directly in the settings page.
+- Public runtime marker for theme/helper plugins that need to suppress duplicate startup intros.
- English and Italian localization.
- Local diagnostic logs capped at 2 MiB with one backup.
- No telemetry, accounts, or network services.
@@ -67,10 +68,22 @@ Enable streaming preload in the **Streaming** tab, then copy:
1. **Prep command — Preload**;
2. **Detached command — Continue**.
-No Undo command is required. Preload starts a hidden host, selects the streaming display, opens the video, and exits only after the video is visible and advancing. Continue launches or adopts Playnite Fullscreen directly, then signals the host to keep tracking readiness behind the same overlay.
+No Undo command is required. Preload starts a hidden host, selects the streaming display, primes the video decoder, then pauses and rewinds the video while the overlay stays black. Continue launches or adopts Playnite Fullscreen directly and signals the host to restart playback from the beginning while it keeps tracking readiness behind the same overlay.
See [Streaming setup](docs/STREAMING.md) for details and recovery guidance.
+## Theme and helper integration
+
+While Playnite Boot Screen is actively covering startup, it publishes the signaled Windows event `Local\PlayniteBootScreen.StartupIntroHandled.v1`. Theme/helper plugins can use this marker to skip their own startup intro for that launch without reading Playnite Boot Screen settings. The marker is independent from the selected video and playback behavior.
+
+See the [integration contract](docs/INTEGRATION.md) for the exact semantics and a C# consumer example.
+
+### Aniki ReMake / Aniki Helper
+
+Aniki ReMake / Aniki Helper supports the PBS startup marker, so its own startup intro can be skipped while Playnite Boot Screen is already handling the launch. The extended Aniki ReMake intro is also included as an optional bundled video and can be selected from the normal PBS media library.
+
+This integration does not lock PBS to Aniki: the marker is independent from the selected video, and custom videos or other themes continue to work normally.
+
## Runtime data
Persistent files are stored under Playnite's extension data directory:
@@ -80,6 +93,8 @@ Persistent files are stored under Playnite's extension data directory:
├── Runtime\
│ ├── config.json
│ ├── media\
+│ ├── cache\
+│ │ └── video-compat\
│ └── logs\
└── shortcut-state.json
```
@@ -87,7 +102,7 @@ Persistent files are stored under Playnite's extension data directory:
The extension installation directory can be safely replaced during updates without deleting custom media, configuration, or logs.
Managed runtime files are synchronized by content when Playnite starts, while custom media, configuration, and logs remain untouched.
-Place `.mp4`, `.mkv`, `.webm`, `.avi`, or `.mov` files directly in `Runtime\media`, then use **Refresh list** in the settings page. Files outside this folder can still be selected with **Browse external…**.
+Place `.mp4`, `.mkv`, `.webm`, `.avi`, or `.mov` files directly in `Runtime\media`, then use **Refresh list** in the settings page. Files outside this folder can still be selected with **Browse external…**. WebM files are transparently exposed to the Windows media pipeline through a cached `.mkv` compatibility alias; the original file is never renamed or modified. The compatibility cache keeps only the alias for the currently selected WebM source and is cleared when a non-WebM video is selected.
## Build
diff --git a/README_IT.md b/README_IT.md
index c2df154..085d267 100644
--- a/README_IT.md
+++ b/README_IT.md
@@ -1,6 +1,6 @@
# Playnite Boot Screen
-[English](README.md) · [Changelog](CHANGELOG.md) · [Risoluzione problemi](docs/TROUBLESHOOTING.md)
+[English](README.md) · [Changelog](CHANGELOG.md) · [Risoluzione problemi](docs/TROUBLESHOOTING.md) · [Contratto integrazione](docs/INTEGRATION.md)

@@ -15,11 +15,12 @@ https://github.com/user-attachments/assets/fc1d7d9a-7a05-4b44-a43e-959a9b4a4fad
- Elenco gestito dei video supportati nella cartella media persistente, mantenendo anche i percorsi video esterni.
- Possibilità di seguire il display Fullscreen scelto da Playnite oppure selezionare manualmente il monitor, con rilevamento sicuro in configurazioni multi-monitor.
- Adattamento, fade, mute e volume da 0 a 100 configurabili.
-- Possibilità di mostrare Playnite appena pronto oppure attendere la fine naturale del video.
+- Possibilità di mostrare Playnite appena pronto, attendere la fine del video oppure ripeterlo in loop finché Playnite non è pronto.
- Copertura della transizione integrata Desktop → Fullscreen con il video configurato, attiva di default e disattivabile dalle impostazioni.
- Runtime gestito fuori dalla directory sostituita durante gli aggiornamenti dell'estensione.
- Nome personalizzabile per i collegamenti Desktop e menu Start.
- Comandi Preload e Continue nella schermata Streaming.
+- Marker runtime pubblico per temi/helper che devono evitare intro di avvio duplicate.
- Interfaccia in inglese e italiano.
- Log locali limitati a 2 MiB con un solo backup.
- Nessuna telemetria, account o servizio di rete.
@@ -63,7 +64,19 @@ Abilita il preload nella scheda **Streaming** e copia:
1. **Prep command — Preload**;
2. **Detached command — Continue**.
-Non è richiesto un comando Undo. Consulta [Configurazione streaming](docs/STREAMING.md) per i dettagli.
+Non è richiesto un comando Undo. Preload prepara il decoder, quindi mette in pausa e riavvolge il video mantenendo nero l’overlay; Continue fa ripartire la riproduzione dall’inizio mentre l’host segue la readiness di Playnite. Consulta [Configurazione streaming](docs/STREAMING.md) per i dettagli.
+
+## Integrazione con temi e helper
+
+Mentre Playnite Boot Screen sta coprendo attivamente l'avvio, pubblica l'evento Windows segnalato `Local\PlayniteBootScreen.StartupIntroHandled.v1`. Temi e plugin helper possono usare questo marker per evitare di riprodurre una seconda intro nello stesso avvio senza leggere le impostazioni di Playnite Boot Screen. Il marker è indipendente dal video selezionato e dal comportamento di fine video.
+
+Consulta il [contratto di integrazione](docs/INTEGRATION.md) per semantica esatta ed esempio C# lato consumer.
+
+### Aniki ReMake / Aniki Helper
+
+Aniki ReMake / Aniki Helper supporta il marker di avvio di PBS, quindi può evitare la propria intro quando Playnite Boot Screen sta già gestendo l'avvio. L'intro estesa di Aniki ReMake è inoltre inclusa come video opzionale e può essere selezionata dalla normale libreria multimediale di PBS.
+
+L'integrazione non lega PBS ad Aniki: il marker è indipendente dal video selezionato e i video personalizzati o altri temi continuano a funzionare normalmente.
## Dati runtime
@@ -74,6 +87,8 @@ I file persistenti vengono salvati nella directory dati dell’estensione:
├── Runtime\
│ ├── config.json
│ ├── media\
+│ ├── cache\
+│ │ └── video-compat\
│ └── logs\
└── shortcut-state.json
```
@@ -81,7 +96,7 @@ I file persistenti vengono salvati nella directory dati dell’estensione:
La directory di installazione dell’estensione può essere sostituita senza eliminare video personalizzati, configurazione o log.
I file runtime gestiti vengono sincronizzati in base al contenuto all’avvio di Playnite, mentre video personalizzati, configurazione e log restano intatti.
-Copia i file `.mp4`, `.mkv`, `.webm`, `.avi` o `.mov` direttamente in `Runtime\media`, quindi usa **Aggiorna elenco** nelle impostazioni. I file esterni alla cartella restano selezionabili tramite **Sfoglia esterno…**.
+Copia i file `.mp4`, `.mkv`, `.webm`, `.avi` o `.mov` direttamente in `Runtime\media`, quindi usa **Aggiorna elenco** nelle impostazioni. I file esterni alla cartella restano selezionabili tramite **Sfoglia esterno…**. I file WebM vengono esposti in modo trasparente alla pipeline multimediale di Windows tramite un alias `.mkv` in cache; il file originale non viene mai rinominato né modificato. La cache di compatibilità conserva solo l'alias relativo al WebM attualmente selezionato e viene svuotata quando si seleziona un video non WebM.
## Build e pacchetto
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 0c0ccaa..3a35604 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,11 +1,24 @@
-# Playnite Boot Screen 0.7.1
-
-This maintenance hotfix corrects the Desktop-to-Fullscreen bootstrap cover on high-DPI and virtual displays.
-Highlights:
-- the temporary black handoff cover now resolves the selected monitor's physical position and resolution instead of treating DPI-virtualized WinForms bounds as physical pixels;
-- the bootstrap cover is created under a temporary per-monitor DPI context, which is restored before the existing WPF boot overlay continues;
-- this prevents the cover from appearing as a smaller black rectangle in the top-left corner before the video on high-scaling displays, including 4K virtual displays;
-- the normal WPF overlay, video playback, Standalone flow, Sunshine/Apollo streaming flow, monitor selection, foreground handling, and log rotation are unchanged;
-- no additional per-switch logging is introduced by this hotfix;
-- runtime updated to 1.0.8.
-Existing shortcuts, custom media, settings, and streaming configuration remain compatible.
+# Playnite Boot Screen 0.8.0
+
+Version 0.8.0 focuses on predictable video completion, cleaner streaming startup, WebM compatibility, and better cooperation with Fullscreen themes and helpers.
+
+## Highlights
+
+- **New video-end behavior controls** — reveal Playnite as soon as it is ready, wait for the video to finish, or loop until Playnite is ready.
+- **WebM compatibility** — WebM files are exposed to the Windows media pipeline through a local MKV compatibility alias, without transcoding or FFmpeg.
+- **Improved Sunshine / Apollo / VibePollo startup** — Preload primes and rewinds the decoder, then Continue restarts playback from the beginning.
+- **Aniki ReMake / Aniki Helper integration** — compatible helpers can detect when PBS is already handling the startup intro and avoid playing a duplicate intro.
+- **Optional Aniki ReMake intro included** — the extended intro is bundled as a selectable video while custom media remains fully supported.
+- **Safer streaming failure handling** — an abandoned Preload now closes after 10 seconds, and a new Continue-entry log helps diagnose rare Detached launch failures.
+
+## Aniki ReMake integration
+
+Playnite Boot Screen now publishes `Local\PlayniteBootScreen.StartupIntroHandled.v1` while it is actively handling startup. Aniki Helper can use this marker to suppress its own startup intro for that launch, avoiding two intro videos back to back.
+
+The integration is independent from the selected video: the bundled extended Aniki ReMake intro is optional, and PBS continues to work normally with custom videos and other themes.
+
+## Compatibility
+
+Existing 0.7.x playback settings are migrated automatically. Existing shortcuts, custom media, and streaming configuration remain compatible.
+
+Runtime updated to 1.0.9.
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
index 8970e5e..9147a16 100644
--- a/THIRD_PARTY_NOTICES.md
+++ b/THIRD_PARTY_NOTICES.md
@@ -5,3 +5,5 @@ Playnite Boot Screen is an independent community extension and is not affiliated
"Playnite", its logo, and related visual identity belong to their respective owners. Their appearance in the bundled sample boot media is descriptive and intended solely to identify the application being launched. The MIT license for this repository does not grant rights to third-party names, logos, or trademarks.
The project references the Playnite SDK through NuGet. Playnite is distributed under its own license; see the upstream project for details.
+
+"Aniki ReMake" and "Aniki Helper" are third-party community projects and are not part of Playnite Boot Screen. The optional bundled `Aniki_Remake_Intro.mp4` is associated with that integration. Rights to third-party names, artwork, audio, and other media elements remain with their respective owners; the MIT license for this repository does not grant rights to those elements.
diff --git a/distribution/installer.yaml b/distribution/installer.yaml
index e577826..eb52497 100644
--- a/distribution/installer.yaml
+++ b/distribution/installer.yaml
@@ -1,5 +1,14 @@
AddonId: PlayniteBoot_71b5c099-3c25-4fe7-b26f-1262c7f0e138
Packages:
+ - Version: 0.8.0
+ RequiredApiVersion: 6.16.0
+ ReleaseDate: 2026-09-14
+ PackageUrl: https://github.com/VirtualGIT20/Playnite-Boot-Screen/releases/download/v0.8.0/Playnite-Boot-Screen-v0.8.0.pext
+ Changelog:
+ - Add explicit Ready, Wait, and Loop video-end behaviors with automatic migration from 0.7.x.
+ - Add transparent WebM compatibility playback without transcoding or FFmpeg.
+ - Improve Sunshine/Apollo/VibePollo preload so Continue restarts the intro from the beginning.
+ - Add startup-intro integration for compatible helpers such as Aniki Helper, plus an optional bundled Aniki ReMake intro.
- Version: 0.7.1
RequiredApiVersion: 6.16.0
ReleaseDate: 2026-09-13
diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md
new file mode 100644
index 0000000..420860d
--- /dev/null
+++ b/docs/INTEGRATION.md
@@ -0,0 +1,76 @@
+# Theme and helper integration
+
+Playnite Boot Screen exposes a small runtime contract for themes or helper plugins that would otherwise show their own startup intro.
+
+## Startup intro marker
+
+While Playnite Boot Screen is actively covering a Playnite startup, it publishes this named Windows manual-reset event:
+
+```text
+Local\PlayniteBootScreen.StartupIntroHandled.v1
+```
+
+The event is **signaled** while the boot overlay is active and is reset/disposed when Playnite Boot Screen releases the startup overlay. It is published for Standalone, Streaming Host, and Desktop-to-Fullscreen Switch flows.
+
+The marker is intentionally independent from the selected video, video file name, theme, and video-end behavior. It only means:
+
+> Playnite Boot Screen is handling the startup presentation for this launch.
+
+A consumer such as a theme helper can check the marker immediately before starting its own intro. If the event exists and is signaled, the helper should skip its intro for that launch. If the event is missing or not signaled, the helper should keep its normal behavior.
+
+## C# example
+
+Open, check, and dispose the event for each decision. Do not cache the handle.
+
+```csharp
+using System;
+using System.Threading;
+
+private const string StartupIntroHandledEventName =
+ @"Local\PlayniteBootScreen.StartupIntroHandled.v1";
+
+private static bool IsStartupIntroHandledByPlayniteBootScreen()
+{
+ EventWaitHandle marker = null;
+
+ try
+ {
+ marker = EventWaitHandle.OpenExisting(StartupIntroHandledEventName);
+ return marker.WaitOne(0);
+ }
+ catch (WaitHandleCannotBeOpenedException)
+ {
+ return false;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return false;
+ }
+ finally
+ {
+ if (marker != null)
+ {
+ marker.Dispose();
+ }
+ }
+}
+```
+
+Typical usage:
+
+```csharp
+if (startupIntroEnabled && !IsStartupIntroHandledByPlayniteBootScreen())
+{
+ PlayStartupIntro();
+}
+```
+
+## Compatibility contract
+
+The `.v1` suffix is part of the public contract. Compatible changes keep the same name and semantics. Any future breaking change will use a new marker version instead of silently changing `v1`.
+
+The marker does not require another plugin to read Playnite Boot Screen's settings or runtime `config.json`, and Playnite Boot Screen does not need to know which theme/helper consumes it.
+
+## Known integration
+
+Aniki ReMake / Aniki Helper uses this contract to suppress its own startup intro while Playnite Boot Screen is already handling the launch. The integration is independent from the selected PBS video.
diff --git a/docs/RELEASE_CHECKLIST.md b/docs/RELEASE_CHECKLIST.md
index beef3c1..cdc1233 100644
--- a/docs/RELEASE_CHECKLIST.md
+++ b/docs/RELEASE_CHECKLIST.md
@@ -1,4 +1,4 @@
-# Release checklist — 0.7.1
+# Release checklist — 0.8.0
## Code and behavior
@@ -11,7 +11,12 @@
- [ ] Fullscreen → Desktop → Fullscreen can be repeated and the boot transition still works.
- [ ] Disabling the Desktop → Fullscreen option leaves Playnite's native switch untouched.
- [ ] Normal Playnite Desktop exit does not trigger the switch overlay.
-- [ ] Wait-for-video-end mode succeeds.
+- [ ] Ready, Wait, and Loop video-end behaviors each complete with the expected readiness/end semantics.
+- [ ] A video that ends before Playnite is ready holds its final frame instead of revealing Playnite early.
+- [ ] WebM selection resolves through the compatibility alias and still preserves the original source file.
+- [ ] Streaming Preload primes and rewinds the decoder, and Continue restarts playback from the beginning.
+- [ ] The startup-intro marker is signaled while PBS owns the overlay and absent/reset after release.
+- [ ] With Aniki Helper intro enabled, PBS startup suppresses the duplicate Aniki intro; a normal Playnite launch remains outside the PBS marker lifecycle.
- [ ] Alt+F4 closes the overlay and stops the Playnite Fullscreen process started by the boot sequence.
- [ ] Alt+F4 during Preload prevents a later Continue command from using the standalone fallback.
- [ ] Alt+Tab yields the overlay, restores the cursor, and does not cancel Playnite startup.
@@ -26,7 +31,7 @@
- [ ] Desktop and Start shortcuts can be created, renamed, and removed.
- [ ] Invalid or modified shortcut state cannot escape the Desktop or Start menu directories.
- [ ] Runtime log rotates to `PlayniteBoot.log.1` after 2 MiB.
-- [ ] With `VERSION.txt` unchanged at `1.0.8`, modifying a managed installed runtime file is repaired automatically on the next Playnite start.
+- [ ] With `VERSION.txt` unchanged at `1.0.9`, modifying a managed installed runtime file is repaired automatically on the next Playnite start.
## Display matrix
@@ -39,9 +44,10 @@
## Packaging
-- [ ] `scripts/verify-release.ps1 -Version 0.7.1` succeeds.
+- [ ] `scripts/verify-release.ps1 -Version 0.8.0` succeeds.
- [ ] `scripts/pack.ps1 -Configuration Release` creates exactly one expected `.pext`.
- [ ] Build output and `.pext` both contain `RuntimeTemplate\SwitchBootstrap.ps1`.
+- [ ] Build output and `.pext` both contain `RuntimeTemplate\media\Aniki_Remake_Intro.mp4`.
- [ ] Build and package contain no `.pdb`, source, temporary, or stale files.
- [ ] SHA-256 file matches the package.
- [ ] The `.pext` installs on a clean Playnite profile.
@@ -53,12 +59,12 @@
- [ ] Repository description, topics, and license are set.
- [ ] Private vulnerability reporting is enabled.
- [ ] CI workflow succeeds.
-- [ ] Tag `v0.7.1` creates a release with `.pext` and checksum.
-- [ ] Release notes describe the high-DPI bootstrap sizing fix and confirm that the WPF/streaming paths are unchanged.
+- [ ] Tag `v0.8.0` creates a release with `.pext` and checksum.
+- [ ] Release notes highlight the playback model, WebM compatibility, streaming preload improvements, and Aniki ReMake integration.
## Playnite add-on database
- [ ] GitHub release asset URL is live.
- [ ] `distribution/installer.yaml` verifies with Toolbox.
- [ ] `distribution/addon.yaml` verifies with Toolbox.
-- [ ] Published store entry resolves `distribution/installer.yaml` and exposes version `0.7.1`; no database pull request is needed unless central metadata changes.
+- [ ] Published store entry resolves `distribution/installer.yaml` and exposes version `0.8.0`; no database pull request is needed unless central metadata changes.
diff --git a/docs/STREAMING.md b/docs/STREAMING.md
index c5ed6dc..bcca5aa 100644
--- a/docs/STREAMING.md
+++ b/docs/STREAMING.md
@@ -14,11 +14,11 @@ Copy the commands from the extension's **Streaming** tab.
1. Prep starts a hidden PowerShell host.
2. The host selects the target display, preferably matching the client resolution.
-3. The boot video is opened and must show reliable playback advancement.
-4. Prep exits, allowing the streaming session to continue opening.
+3. The boot video is opened and allowed to advance only long enough to validate that the decoder is producing frames.
+4. The host pauses the video, rewinds it to the beginning, and keeps the overlay black; Prep can then exit while the streaming session continues opening.
5. Detached/Continue launches or adopts Playnite Fullscreen directly.
-6. Continue signals the preload host, which adopts the Playnite process and keeps the overlay visible while tracking readiness.
-7. The overlay fades after Playnite passes the configured readiness rules.
+6. Continue signals the preload host, which restarts the video from the beginning, adopts the Playnite process, and keeps the overlay visible while tracking readiness.
+7. The overlay fades after Playnite passes the configured readiness rules and the selected video-end policy allows it.
## Existing Playnite Desktop instance
diff --git a/scripts/pack.ps1 b/scripts/pack.ps1
index 674e06e..6f6d20c 100644
--- a/scripts/pack.ps1
+++ b/scripts/pack.ps1
@@ -68,7 +68,8 @@ $requiredFiles = @(
'RuntimeTemplate\Install-Shortcut.ps1',
'RuntimeTemplate\Test-Configuration.ps1',
'RuntimeTemplate\VERSION.txt',
- 'RuntimeTemplate\media\boot-4k60.mp4'
+ 'RuntimeTemplate\media\boot-4k60.mp4',
+ 'RuntimeTemplate\media\Aniki_Remake_Intro.mp4'
)
$missingFiles = @($requiredFiles | Where-Object { -not (Test-Path -LiteralPath (Join-Path $output $_) -PathType Leaf) })
diff --git a/scripts/verify-source.ps1 b/scripts/verify-source.ps1
index e545849..06b5c44 100644
--- a/scripts/verify-source.ps1
+++ b/scripts/verify-source.ps1
@@ -110,23 +110,39 @@ if ($runtimeScript -notmatch "ValidateSet\('Standalone', 'Preload', 'Continue',
Write-Host 'Desktop-to-Fullscreen integration: OK'
Write-Host 'Checking managed video library integration...'
$videoLibraryPath = Join-Path $root 'PlayniteBoot\Services\VideoLibraryService.cs'
+$videoCompatibilityPath = Join-Path $root 'PlayniteBoot\Services\VideoCompatibilityService.cs'
$configWriterPath = Join-Path $root 'PlayniteBoot\Services\RuntimeConfigWriter.cs'
$settingsViewPath = Join-Path $root 'PlayniteBoot\PlayniteBootSettingsView.xaml'
-foreach ($requiredPath in @($videoLibraryPath, $configWriterPath, $settingsViewPath)) {
+foreach ($requiredPath in @($videoLibraryPath, $videoCompatibilityPath, $configWriterPath, $settingsViewPath)) {
if (-not (Test-Path -LiteralPath $requiredPath -PathType Leaf)) {
throw "Required video library file not found: $requiredPath"
}
}
$videoLibrarySource = Get-Content -LiteralPath $videoLibraryPath -Raw -Encoding UTF8
+$videoCompatibilitySource = Get-Content -LiteralPath $videoCompatibilityPath -Raw -Encoding UTF8
$configWriterSource = Get-Content -LiteralPath $configWriterPath -Raw -Encoding UTF8
$settingsViewSource = Get-Content -LiteralPath $settingsViewPath -Raw -Encoding UTF8
-if ($videoLibrarySource -notmatch 'SearchOption\.TopDirectoryOnly' -or
- $videoLibrarySource -notmatch '\.mp4' -or
- -not $configWriterSource.Contains('return @".\media\"') -or
- $settingsViewSource -notmatch 'RefreshVideoLibraryCommand') {
+$acceptedVideoExtensions = @('\.mp4', '\.mkv', '\.webm', '\.avi', '\.mov')
+$missingVideoExtensions = @($acceptedVideoExtensions | Where-Object { $videoLibrarySource -notmatch $_ })
+$managedVideoChecks = @(
+ @{ Name = 'top-level managed media enumeration'; Pass = $videoLibrarySource -match 'SearchOption\.TopDirectoryOnly' },
+ @{ Name = 'accepted playback formats'; Pass = $missingVideoExtensions.Count -eq 0 },
+ @{ Name = 'WebM compatibility resolver'; Pass = $configWriterSource -match 'videoCompatibility\.Resolve' -and $videoCompatibilitySource -match '\.webm' },
+ @{ Name = 'runtime-relative playback path'; Pass = $configWriterSource.Contains('return @".\" + relativePath;') },
+ @{ Name = 'video library refresh command'; Pass = $settingsViewSource -match 'RefreshVideoLibraryCommand' },
+ @{ Name = 'bundled media seeding'; Pass = $runtimeInstallerSource -match 'Directory\.EnumerateFiles\(templateMediaDirectory' -and $runtimeInstallerSource -match 'VideoLibraryService\.IsAcceptedVideo' }
+)
+
+$failedManagedVideoChecks = @($managedVideoChecks | Where-Object { -not $_.Pass })
+foreach ($check in $managedVideoChecks) {
+ Write-Host ("Managed video {0}: {1}" -f $check.Name, $(if ($check.Pass) { 'OK' } else { 'FAILED' }))
+}
+
+if ($failedManagedVideoChecks.Count -gt 0) {
throw 'Managed video library integration is incomplete.'
}
+Write-Host 'Managed video library integration: OK'
$videoPath = Join-Path $root 'PlayniteBoot\RuntimeTemplate\media\boot-4k60.mp4'
if (-not (Test-Path -LiteralPath $videoPath -PathType Leaf)) {